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
NameError trying to use SSL with gevents on Python 3.3.3 or 2.7.6 and earlier #856
Comments
Thank you for your report. Python 3.3 is currently in "security-fix only" mode. The bugfix you mentioned was merged in 2013 and has been included in all bugfix and security-fix releases of Python 3.3 since 2014. Given 3.3's status and the difficulty of testing on such an old point-release that's long been superseded, it seems to me that a reasonable response is "update your Python version." As far as 2.7 goes, gevent is tested on 2.7.8 and 2.7.9+ because there are two separate ssl implementations. The <=2.7.8 code does not reference these constants as far as I can see, so I don't see how this can apply to 2.7.6. The 2.7.9+ code does use these constants, but that SSL implementation should have the python bugfix, so again I don't see how this can apply to 2.7.9+. Given that gevent works with and relies heavily on the actual stdlib implementation, I wouldn't consider this a bug in gevent; it would be more accurate to say that gevent only supports Python 3.3.4+ (the documentation can be adjusted accordingly). When future versions adjust the stdlib implementation, doubtless gevent will have to change in response, but it's hard to predict for sure what those changes will have to be. |
My point is more that using |
I think I get your point, and I understand. But if you'll notice, (Recent work has made this slightly more obvious, through the |
Description:
Accessing an SSL website results in a
NameError
exception forSOL_SOCKET
:What I've run:
Full traceback
Proposed fix
The
SOL_SOCKET
andSO_TYPE
constants are defined on thesocket
module. They are only incidentally present inssl
for many but not all Python releasesgevent
supports; any release that includes a fix for Python issue 19422 includes a line:Both these names would have to be imported from
socket
in_ssl3.py
too if gevent is to support all 2.7 and 3.3 revisions. Future versions of Python may remove that name fromssl
again, since it is not part of thessl
module public API.This bug was originally reported on Stack Overflow by haofly.
The text was updated successfully, but these errors were encountered: