[Python-Dev] RFC: Backport ssl.MemoryBIO and ssl.SSLObject to Python 2.7

Barry Warsaw barry at python.org
Fri Jun 2 12:21:17 EDT 2017

On Jun 03, 2017, at 02:10 AM, Nick Coghlan wrote:

>* Introduce a dependency from requests onto PyOpenSSL when running in
>async mode on Python 2.7 in the general case, and figure out some
>other pip-specific option for ensurepip bootstrapping (like a
>*private* MemoryBIO implementation, or falling back to synchronous
>mode in requests)
>If we adopted the latter approach, then for almost all intents and
>purposes, ssl.MemoryBIO and ssl.SSLObject would remain a Python 3.5+
>only API, and anyone wanting access to it on 2.7 would still need to
>depend on PyOpenSSL.
>The benefit of making any backport a private API is that it would mean
>we weren't committing to support that API for general use: it would be
>supported *solely* for the use case discussed in the PEP (i.e. helping
>to advance the development of PEP 543 without breaking pip
>bootstrapping in the process).

That sounds like a good compromise.  My own major objection was in exposing a
new public API in Python 2.7, which would clearly be a new feature.


More information about the Python-Dev mailing list