-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
wrap_socket does not accept server_hostname in 2.7.x (breaks with gevent) #482
Comments
Mmm that is no fun indeed. @sharoonthomas Do you have a fix in mind? Also we should setup a travisci build for gevent someday. |
I don't understand why this is a bug here. Yes we shoot for gevent compatibility, but shouldn't gevent be looking at Python 2.7.x compatibility? This seems like two issues:
|
* Add two more test envs with gevent for py26 and py27 Other changes: * Use tox command to run tests from travis * Set environment variables on .travis.yml to run tests
* Add two more test envs with gevent for py26 and py27 Other changes: * Use tox command to run tests from travis * Set environment variables on .travis.yml to run tests
* Add testenv for gevent with python 2.7 Other changes: * Use tox command to run tests from travis * Set environment variables on .travis.yml to run tests
@sharoonthomas Hmm yea, we'd need to fix the coverage error. Would you be up for that? :) Super appreciated btw, you're awesome. |
@shazow took a look at it. I don't think its something I can test effectively with the knowledge I have about urllib3. Sorry about that ! |
Any ETA on when this can be fixed? |
@zappe Would you like to take a look at @sharoonthomas's work and try to fill out the test coverage? |
@shazow, I'm afraid I don't have the knowledge, sorry. |
3 months later and we still have this bug open even if we do have a patch. I suppose it would make sense to remove Python 2.7 compatibility in this case, sarcasm intended ;) |
@ssbarnea Such is the nature of open source. It's an orphaned patch which needs some love. |
@Lukasa I solved the problem locally by removing the grequests dependency and reusing the support from inside requests. |
@ssbarnea I'm not sure what kind of response you're expecting. None of us are being paid to work on urllib3; I invite you to fix this: http://urllib3.readthedocs.org/en/latest/#sponsorship |
Sorry everyone, haven't had the time to fix the test case. Will try to do it sometime next week (if no one else does it by then) Sent from my iPhone |
@sharoonthomas Somebody added a $15 bounty on this, you should grab it if you can finish it soon. :) |
* Add testenv for gevent with python 2.7 Other changes: * Use tox command to run tests from travis * Set environment variables on .travis.yml to run tests
@shazow I am keeping a watch on this patch, but a fully working patch on gevent for this cannot be sent until gevent/gevent#477 is fixed. To be specific:
For anyone who might pick off from here the code is on my fork (https://github.com/sharoonthomas/urllib3/compare/issue-482) |
@sharoonthomas Ah thanks for the updates, makes sense. Thanks for keeping an eye on this! |
@sprin Thanks for bumping up the bounty to $115. :) Looks like the referenced gevent issue is making progress. If we're in a super-hurry, we may use a polyfill patch from the gevent thread or somesuch. |
Patching gevent appears to be the preferred solution. I think a patch to gevent should be awarded the bounty, but it made sense to add to the bounty started here. I have not been able to use any of the proposed polyfills with success when Py 2.7.9, gevent, and requests are used together. |
Agree that incentives given for the gevent contributors might be better suited in this scenario. :) Maybe we should poke the gevent thread and offer up for one of them to come claim the bounty once they close their bug. |
@shazow +1 |
🍰 ✨ |
if you patch gevent like this: https://github.com/zeevt/gevent/commit/beafef169b43e5a19e42e69c115ac278c6abdce4 it works and passes my tests (sends SNI etc.) |
Except that we don't carry patches for gevent @zeevt |
Is this fixed in the latest gevent? Can anyone confirm? |
This error popped up a while ago in my application? Is it something easily fixable? upgrading urllib or something? |
@transfluxus My understanding is that this is a gevent bug. Try upgrading gevent. |
Since there hasn't been any movement or additional reports here going to assume this is resolved. |
The recent backport of SNI related features into 2.7 series has resulted in urllib looking at python 2.7.8+ as python 3.2+ and ssl_.py calls wrap_socket with the server_hostname as argument. While this works well when not monkey patched with gevent, I am reporting the bug here since one of the features of this library is gevent compat.
The text was updated successfully, but these errors were encountered: