From bc46de58e61149879fea0cf51399c5dd63dbb227 Mon Sep 17 00:00:00 2001 From: Nate Prewitt Date: Tue, 5 Jun 2018 21:41:20 -0700 Subject: [PATCH 1/2] remove references to 2.6 support in documentation --- docs/community/faq.rst | 3 +-- docs/dev/todo.rst | 1 - docs/index.rst | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/community/faq.rst b/docs/community/faq.rst index 7f5a0e1e..e1c8e9ff 100644 --- a/docs/community/faq.rst +++ b/docs/community/faq.rst @@ -56,7 +56,6 @@ Python 3 Support? Yes! Here's a list of Python platforms that are officially supported: -* Python 2.6 * Python 2.7 * Python 3.4 * Python 3.5 @@ -70,7 +69,7 @@ These errors occur when :ref:`SSL certificate verification ` fails to match the certificate the server responds with to the hostname Requests thinks it's contacting. If you're certain the server's SSL setup is correct (for example, because you can visit the site with your browser) and -you're using Python 2.6 or 2.7, a possible explanation is that you need +you're using Python 2.7, a possible explanation is that you need Server-Name-Indication. `Server-Name-Indication`_, or SNI, is an official extension to SSL where the diff --git a/docs/dev/todo.rst b/docs/dev/todo.rst index 1766a28a..b1a3f7eb 100644 --- a/docs/dev/todo.rst +++ b/docs/dev/todo.rst @@ -51,7 +51,6 @@ Runtime Environments Requests currently supports the following versions of Python: -- Python 2.6 - Python 2.7 - Python 3.4 - Python 3.5 diff --git a/docs/index.rst b/docs/index.rst index 918e2dcf..b0a8217c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -108,7 +108,7 @@ Requests is ready for today's web. - Chunked Requests - ``.netrc`` Support -Requests officially supports Python 2.6–2.7 & 3.4–3.7, and runs great on PyPy. +Requests officially supports Python 2.7 & 3.4–3.7, and runs great on PyPy. The User Guide From de64f0f23f57f272ed11713d18ff50f193c3164b Mon Sep 17 00:00:00 2001 From: Nate Prewitt Date: Sun, 10 Jun 2018 14:45:14 -0700 Subject: [PATCH 2/2] port pyopenssl fix from urllib3 --- setup.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 898f7ab8..71ba5234 100755 --- a/setup.py +++ b/setup.py @@ -40,6 +40,12 @@ if sys.argv[-1] == 'publish': os.system('twine upload dist/*') sys.exit() +# pyOpenSSL version 18.0.0 dropped support for Python 2.6 +if sys.version_info < (2, 7): + PYOPENSSL_VERSION = 'pyOpenSSL >= 0.14, < 18.0.0' +else: + PYOPENSSL_VERSION = 'pyOpenSSL >= 0.14' + packages = ['requests'] requires = [ @@ -96,7 +102,7 @@ setup( cmdclass={'test': PyTest}, tests_require=test_requirements, extras_require={ - 'security': ['pyOpenSSL>=0.14', 'cryptography>=1.3.4', 'idna>=2.0.0'], + 'security': [PYOPENSSL_VERSION, 'cryptography>=1.3.4', 'idna>=2.0.0'], 'socks': ['PySocks>=1.5.6, !=1.5.7'], 'socks:sys_platform == "win32" and (python_version == "2.7" or python_version == "2.6")': ['win_inet_pton'], },