Skip to content

Conversation

@Elchinchel
Copy link

This was discussed at #6668.
The primary concern was a win_inet_pton dependency for Python 2.
However, since Python 2 is no longer supported, I guess it's time to try again.

I'm not sure what to do with the sockshandler.py file: it's unnecessary and could be safely deleted,
but even with a delete patch sockshandler.pyi is created anyway.

There is no tests, they will require a SOCKS server.
For HTTP proxy tests proxy.py is used, but it lacks SOCKS support
(there is an implementation at proxy.socks, sadly unfinished).

@notatallshaw
Copy link
Member

Typically with a new vendoring we ask the project maintainers if they are comfortable with pip vendoring the project.

I think this step will be problematic because PySocks appears to be unmaintained: https://github.com/Anorov/PySocks / https://pypi.org/project/PySocks/#history

@Elchinchel
Copy link
Author

So, I see the following options:

  1. Contact the repository owner (likely via email) and inquire about his opinion on the vendoring.
  2. ¿Create PySocks fork specifically for vendoring into pip?
  3. Use some other library and write compatibility layer for urllib3 (though I haven't found any suitable alternative so far).

@notatallshaw
Copy link
Member

notatallshaw commented Nov 29, 2025

If the maintainer is not actively maintaining the library, I don't see the point in reaching out to them, the point of reaching out is they are comfortable with any possible extra maintenance burden.

If someone is willing to fork PySocks and maintain it we can consider vendoring it once it has reached a some level of trustworthiness, but the pip maintainers won't be forking this specifically for pip as there is very little maintainer resources that pip has and I doubt any of us are SOCKS experts.

@pfmoore
Copy link
Member

pfmoore commented Nov 29, 2025

There's also:

  • Download the PySocks wheel from PyPI and install it using pip install /path/to/the/wheel.

It's a bit more manual, but IMO it's an acceptable workaround for a relatively rare situation.

@Elchinchel
Copy link
Author

Given the situation with PySocks, i recognize that there is no viable option. I'll close this for now.

Thank you for the clear feedback.

@Elchinchel Elchinchel closed this Nov 29, 2025
@ichard26 ichard26 mentioned this pull request Nov 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants