Skip to content
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

Bump pyOpenSSL dependency on Python 2.7 #102

Merged
merged 1 commit into from
Apr 3, 2018
Merged

Conversation

kislyuk
Copy link
Member

@kislyuk kislyuk commented Apr 3, 2018

This avoids incompatibilities with older versions of OpenSSL and errors like this:

AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

This avoids incompatibilities with older versions of OpenSSL and errors like this:

    AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
@kislyuk kislyuk requested a review from ttung April 3, 2018 05:44
Copy link
Member

@ttung ttung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't an explicit requirement before, right? Why is it now?

@codecov-io
Copy link

codecov-io commented Apr 3, 2018

Codecov Report

Merging #102 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #102   +/-   ##
=======================================
  Coverage   87.93%   87.93%           
=======================================
  Files          29       29           
  Lines         970      970           
=======================================
  Hits          853      853           
  Misses        117      117

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 25bda6b...2089a9b. Read the comment docs.

@kislyuk
Copy link
Member Author

kislyuk commented Apr 3, 2018

PyOpenSSL is an optional transitive requirement of requests. It always tries to import and use pyOpenSSL instead of the native Python OpenSSL bindings, but silently proceeds if that import fails.

On Python < 2.7.9 or so, SNI is not supported by the native Python OpenSSL bindings. There are other issues with it as well. That's why it tries to do that.

PyOpenSSL < 16.2.0 induces this crash when loading OpenSSL 1.1.x. So basically if pyOpenSSL is present, we need it to be up to date.

https://github.com/requests/requests/blob/master/requests/__init__.py#L93-L102

@kislyuk kislyuk merged commit c6ac8af into master Apr 3, 2018
@kislyuk kislyuk deleted the akislyuk-bump-pyopenssl branch April 3, 2018 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants