diff --git a/.gitignore b/.gitignore index 0089e02..ed2dec9 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,6 @@ /requests-v2.18.1.tar.gz /requests-v2.18.2.tar.gz /requests-v2.18.4.tar.gz +/requests-v2.19.0.tar.gz +/requests-v2.19.1.tar.gz +/requests-v2.20.0.tar.gz diff --git a/Don-t-inject-pyopenssl-into-urllib3.patch b/Don-t-inject-pyopenssl-into-urllib3.patch index 10a9793..df24810 100644 --- a/Don-t-inject-pyopenssl-into-urllib3.patch +++ b/Don-t-inject-pyopenssl-into-urllib3.patch @@ -12,10 +12,10 @@ Signed-off-by: Jeremy Cline 1 file changed, 7 deletions(-) diff --git a/requests/__init__.py b/requests/__init__.py -index 268e7dcc..45b2c679 100644 +index a5b3c9c3..e312d314 100644 --- a/requests/__init__.py +++ b/requests/__init__.py -@@ -79,13 +79,6 @@ except (AssertionError, ValueError): +@@ -90,17 +90,6 @@ except (AssertionError, ValueError): "version!".format(urllib3.__version__, chardet.__version__), RequestsDependencyWarning) @@ -23,6 +23,10 @@ index 268e7dcc..45b2c679 100644 -try: - from urllib3.contrib import pyopenssl - pyopenssl.inject_into_urllib3() +- +- # Check cryptography version +- from cryptography import __version__ as cryptography_version +- _check_cryptography(cryptography_version) -except ImportError: - pass - diff --git a/dont-import-OrderedDict-from-urllib3.patch b/dont-import-OrderedDict-from-urllib3.patch deleted file mode 100644 index 0b0279c..0000000 --- a/dont-import-OrderedDict-from-urllib3.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 75f027ac8bc55ad280f7bf72a25db1ce8c1fc76d Mon Sep 17 00:00:00 2001 -From: Jeremy Cline -Date: Mon, 19 Jun 2017 16:19:53 -0400 -Subject: [PATCH] Don't import OrderedDict from urllib3 - -Signed-off-by: Jeremy Cline ---- - requests/compat.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/requests/compat.py b/requests/compat.py -index 5c09ea8..61fa0c8 100644 ---- a/requests/compat.py -+++ b/requests/compat.py -@@ -46,7 +46,10 @@ if is_py2: - from Cookie import Morsel - from StringIO import StringIO - -- from urllib3.packages.ordered_dict import OrderedDict -+ try: -+ from collections import OrderedDict # py2.7+ -+ except: -+ from ordereddict import OrderedDict # py2.6 and lower (el6, etc. - - builtin_str = str - bytes = str --- -2.9.4 - diff --git a/patch-requests-certs.py-to-use-the-system-CA-bundle.patch b/patch-requests-certs.py-to-use-the-system-CA-bundle.patch index 06a1e99..a3db03e 100644 --- a/patch-requests-certs.py-to-use-the-system-CA-bundle.patch +++ b/patch-requests-certs.py-to-use-the-system-CA-bundle.patch @@ -1,4 +1,4 @@ -From fd9ab446d8479360d2c1c8252508d97d58ed3e0e Mon Sep 17 00:00:00 2001 +From a8ef690988f92a56226f8b688f1a3638346bca8e Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Mon, 19 Jun 2017 16:09:02 -0400 Subject: [PATCH] Patch requests/certs.py to use the system CA bundle @@ -10,7 +10,7 @@ Signed-off-by: Jeremy Cline 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/requests/certs.py b/requests/certs.py -index d1a378d..7b103ba 100644 +index d1a378d7..7b103baf 100644 --- a/requests/certs.py +++ b/requests/certs.py @@ -11,8 +11,17 @@ only one — the one from the certifi package. @@ -33,17 +33,17 @@ index d1a378d..7b103ba 100644 if __name__ == '__main__': print(where()) diff --git a/setup.py b/setup.py -index 93a8507..2db9569 100755 +index 4e2ad936..60de5861 100755 --- a/setup.py +++ b/setup.py @@ -45,7 +45,6 @@ requires = [ 'chardet>=3.0.2,<3.1.0', - 'idna>=2.5,<2.7', - 'urllib3>=1.21.1,<1.23', + 'idna>=2.5,<2.8', + 'urllib3>=1.21.1,<1.25', - 'certifi>=2017.4.17' ] - test_requirements = ['pytest-httpbin==0.0.7', 'pytest-cov', 'pytest-mock', 'pytest-xdist', 'PySocks>=1.5.6, !=1.5.7', 'pytest>=2.8.0'] + test_requirements = [ -- -2.9.4 +2.19.1 diff --git a/python-requests.spec b/python-requests.spec index ae931c0..1a93c48 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -9,8 +9,8 @@ Name: python-requests -Version: 2.18.4 -Release: 4%{?dist} +Version: 2.20.0 +Release: 1%{?dist} Summary: HTTP library, written in Python, for human beings License: ASL 2.0 @@ -20,14 +20,6 @@ Source0: https://github.com/requests/requests/archive/v%{version}/request # https://bugzilla.redhat.com/show_bug.cgi?id=904614 Patch0: patch-requests-certs.py-to-use-the-system-CA-bundle.patch -# Remove an unnecessary reference to a bundled compat lib in urllib3 -# Some discussion with upstream: -# - https://twitter.com/sigmavirus24/status/529816751651819520 -# - https://github.com/kennethreitz/requests/issues/1811 -# - https://github.com/kennethreitz/requests/pull/1812 -Patch1: dont-import-OrderedDict-from-urllib3.patch - - # https://bugzilla.redhat.com/show_bug.cgi?id=1450608 Patch2: Remove-tests-that-use-the-tarpit.patch @@ -135,18 +127,21 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v %files -n python2-requests %license LICENSE -%doc README.rst HISTORY.rst +%doc README.md HISTORY.md %{python2_sitelib}/*.egg-info %{python2_sitelib}/requests/ %files -n python%{python3_pkgversion}-requests %license LICENSE -%doc README.rst HISTORY.rst +%doc README.md HISTORY.md %{python3_sitelib}/*.egg-info %{python3_sitelib}/requests/ %changelog +* Mon Oct 29 2018 Jeremy Cline - 2.20.0-1 +- Update to v2.20.0 + * Mon Apr 16 2018 Jeremy Cline - 2.18.4-4 - Stop injecting PyOpenSSL (rhbz 1567862) diff --git a/sources b/sources index 0e06b51..f80c529 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (requests-v2.18.4.tar.gz) = 8ca20fe18d13b8c62977be0c51617f2ae8618d3d002ad4dc554362828855db7359274efbff0cd13e8c5699508913e91205cffcf306221a70321e74ac10b2d4d7 +SHA512 (requests-v2.20.0.tar.gz) = 766c69d1778e7286232fcd750842e89cd9bb6637076e80fe95fb67f3ccb14049bf74a533de91ef9451ac6f397ad0a6d148eb444009f501178138cdeffc5ee7c4