Skip to content

Vendor PySocks? #6668

@iamthad

Description

@iamthad

What's the problem this feature will solve?
pip works with a SOCKS proxy if PySocks is installed. On a host which can access the internet only via a SOCKS proxy, it's possible to download get-pip.py e.g. through curl. However, since PySocks is not vendored in pip, running get-pip.py fails with requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support..

Describe the solution you'd like
Consider vendoring PySocks along with urllib3 and Requests to allow better behavior when internet access is only available via a SOCKS proxy.

Alternative Solutions
It is possible to download the necessary packages on an internet-connected host using pip download, tar them up, copy them over via flash drive or scp, and then run get-pip.py with the --no-index and --find-links arguments pointing at these packages. I was able to get a working pip using this process after a couple of attempts.

It's probably also possible to download the necessary wheels manually through PyPI's web interface, but I did not attempt this.

Additional context
While the issue relates to the get-pip bootstrap, it seemed to be appropriate to report the issue on this repository since get-pip.py is just a self-extracting version of pip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: proxyDealing with proxies and networkingproject: vendored dependencyRelated to a vendored dependencystate: blockedCan not be done until something else is donetype: enhancementImprovements to functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions