Skip to content

Fix Missing pysocks Dependency #530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trustsafe
Copy link

When starting toot tui with HTTPS_PROXY set to a socks5h uri, an exception is thrown.

execute:
HTTPS_PROXY="socks5h://localhost:9050" toot tui

result:

  File "/home/account/.local/venv/test/lib/python3.11/site-packages/requests/adapters.py", line 483, in get_connection_with_tls_context
    proxy_manager = self.proxy_manager_for(proxy)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/account/.local/venv/test/lib/python3.11/site-packages/requests/adapters.py", line 282, in proxy_manager_for
    manager = self.proxy_manager[proxy] = SOCKSProxyManager(
                                          ^^^^^^^^^^^^^^^^^^
  File "/home/account/.local/venv/test/lib/python3.11/site-packages/requests/adapters.py", line 64, in SOCKSProxyManager
    raise InvalidSchema("Missing dependencies for SOCKS support.")
requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.

requests needs the pysocks library to function in this case. This PR adds the dependency. This shouldn't be a big issue downstream, as pysocks is already commonly packaged in Linux distributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant