-
Notifications
You must be signed in to change notification settings - Fork 935
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
Port Python 2.7.9 ssl.py #546
Conversation
One way to review the _sslgte279 module is to compare to ssl.py in Python 2.7.9. I set up such a comparison on a different branch here: sprin@23e2771 |
I saw some additional failures under PyPy. I fixed several of them (notably test__socket_ssl and test__ssl) in https://github.com/NextThought/gevent/commit/5840cdc8988d7fd8383f01612b39a8cf919bb2d5 (probably requires my other changes on that fork to be fully effective). The failures I'm seeing in test_ftplib and test__pywsgi seem very similar to these first failures; I'll keep trying to track them down. |
@jamadden: Nice work! I am hoping we can keep the PR to resolve #477 small so it's more manageable to review and test. How do you feel if we try to integrate your SSL fixes sans the PyPy changes in this PR? I think if we can get all the tests passing under CPython 2.7.9, there should be a clear case for merging this PR. Then we can follow on with the PyPy changes. I may be able to put some time in to this later this week. |
@sprin I'm just happy to see progress made, however that needs to happen :) I started this work on a separate branch from the main thrust of the PyPy changes and tried to keep the work on it mostly in spirit with what was already in |
What's the status here? |
One immediate problem is this PR is based on gevent master, which AFAIK is not really ready for release. It's currently in progress to work on Python 3, however nowhere near finished (see myriad of current PRs). So currently it's not suitable to release on top of for a patch fix. If one was hoping merge this PR and then cut a quick release off master to fix #477 for existing users, I don't see that as currently viable. Additionally there are a lot of differences between gevent 1.0.1 and master least not in ssl, which I think makes it a little difficult to rebase to older, I could be wrong. What I have been (slowly) working on is a similar patchfix to gevent 1.0.1's codebase, as getting a patchfix out for gevent for 2.7.9 is obviously desirable, while work goes on to get a 1.1 with py3 compatibility. You can hopefully see the public branch https://github.com/gevent/gevent/tree/1.0.2 which I intend should be released once code is on it to fix #477. Obviously I'd welcome a PR on top of it. After we'll need to port onto master as well after, which this PR could be useful for; but not for getting a release out ASAP currently. |
Port 279 ssl2
I reviewed and merged @jamadden's PR, which tackled a lot of the tough compatibility issues and fixed the tests. See sprin#1 for a good discussion of the changes. I think the next step is to work on rebasing this on top of gevent 1.0.2. @Ivoz, should we move ahead with this strategy? You imply that the 1.0.2 branch is otherwise ready for release. |
PR #551 created to put these changes in the 1.0.2 branch. |
Resolves #477.
In Python 2.7.9, we have new SSL interfaces, that are not quite
the old Python 2 interfaces, nor the same as the Python 3 interfaces.
This creates a new SSL module, _sslgte279.py, for Python 2 versions
greater than or equal 2.7.9, ported from Python 2.7.9's ssl.py:
https://hg.python.org/cpython/file/648dcafa7e5f/Lib/ssl.py.
The process of porting was done by starting with gevent's ssl3.py and
backporting Python 2.7.9's ssl.py.
Fixes these tests under Python 2.7.9:
No new test failures. Still failing since 72119c8:
In addition, basic HTTPS requests were tested with urllib3==1.10.2
and requests==2.6.0.