Update to v2.19.0

This commit is contained in:
Jeremy Cline 2018-06-12 14:17:56 -04:00
parent c670b3bcc3
commit 2455988645
No known key found for this signature in database
GPG Key ID: 9223308FA9B246DB
7 changed files with 28 additions and 80 deletions

1
.gitignore vendored
View File

@ -37,3 +37,4 @@
/requests-v2.18.1.tar.gz
/requests-v2.18.2.tar.gz
/requests-v2.18.4.tar.gz
/requests-v2.19.0.tar.gz

View File

@ -1,56 +0,0 @@
From 7147b3e8280d2ae245b28e9f6ede1d9210af79ef Mon Sep 17 00:00:00 2001
From: Jeremy Cline <jcline@redhat.com>
Date: Tue, 5 Jun 2018 23:00:42 -0400
Subject: [PATCH] Allow urllib3-1.23
Signed-off-by: Jeremy Cline <jcline@redhat.com>
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index ed4892d4..e113510c 100755
--- a/setup.py
+++ b/setup.py
@@ -44,7 +44,7 @@ packages = ['requests']
requires = [
'chardet>=3.0.2,<3.1.0',
'idna>=2.5,<2.7',
- 'urllib3>=1.21.1,<1.23',
+ 'urllib3>=1.21.1,<1.24',
]
test_requirements = ['pytest-httpbin==0.0.7', 'pytest-cov', 'pytest-mock', 'pytest-xdist', 'PySocks>=1.5.6, !=1.5.7', 'pytest>=2.8.0']
--
2.17.1
From 015347ed9622f526f045b2199a82ee57269c1260 Mon Sep 17 00:00:00 2001
From: Jeremy Cline <jcline@redhat.com>
Date: Thu, 7 Jun 2018 11:58:46 -0400
Subject: [PATCH] Don't warn about compatibility with urllib3 v1.23
Requests allows v1.23 in #4669, but the compatibility check at import
time still looks for 22. Bump the version to 23.
Signed-off-by: Jeremy Cline <jcline@redhat.com>
---
requests/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/requests/__init__.py b/requests/__init__.py
index 6fa855df..03decf8c 100644
--- a/requests/__init__.py
+++ b/requests/__init__.py
@@ -60,7 +60,7 @@ def check_compatibility(urllib3_version, chardet_version):
# urllib3 >= 1.21.1, <= 1.22
assert major == 1
assert minor >= 21
- assert minor <= 22
+ assert minor <= 23
# Check chardet for compatibility.
major, minor, patch = chardet_version.split('.')[:3]
--
2.17.1

View File

@ -12,10 +12,10 @@ Signed-off-by: Jeremy Cline <jeremy@jcline.org>
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
-

View File

@ -1,29 +1,28 @@
From 75f027ac8bc55ad280f7bf72a25db1ce8c1fc76d Mon Sep 17 00:00:00 2001
From: Jeremy Cline <jeremy@jcline.org>
Date: Mon, 19 Jun 2017 16:19:53 -0400
From 152550287d6538e5cc7649bcf685a5a0b35058dd Mon Sep 17 00:00:00 2001
From: Jeremy Cline <jcline@redhat.com>
Date: Tue, 12 Jun 2018 14:06:00 -0400
Subject: [PATCH] Don't import OrderedDict from urllib3
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
We unbundle urllib3, just use collections (py2.7+)
Signed-off-by: Jeremy Cline <jcline@redhat.com>
---
requests/compat.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
requests/compat.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/requests/compat.py b/requests/compat.py
index 5c09ea8..61fa0c8 100644
index 6b9c6fac..6ba6e460 100644
--- a/requests/compat.py
+++ b/requests/compat.py
@@ -46,7 +46,10 @@ if is_py2:
from Cookie import Morsel
@@ -45,7 +45,7 @@ if is_py2:
from StringIO import StringIO
from collections import Callable, Mapping, MutableMapping
- 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
2.17.1

View File

@ -38,8 +38,8 @@ index 93a8507..2db9569 100755
+++ 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.24',
- 'certifi>=2017.4.17'
]

View File

@ -9,8 +9,8 @@
Name: python-requests
Version: 2.18.4
Release: 6%{?dist}
Version: 2.19.0
Release: 1%{?dist}
Summary: HTTP library, written in Python, for human beings
License: ASL 2.0
@ -41,9 +41,6 @@ Patch3: requests-2.12.4-tests_nonet.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1567862
Patch4: Don-t-inject-pyopenssl-into-urllib3.patch
# Temporary fixes to work with urllib3 until requests-2.19 is tagged upstream
Patch5: Allow-urllib3-1.23.patch
BuildArch: noarch
%description
@ -150,6 +147,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
%changelog
* Tue Jun 12 2018 Jeremy Cline <jeremy@jcline.org> - 2.19.0-1
- Update to v2.19.0 (rhbz 1590508)
* Fri Jun 08 2018 Jeremy Cline <jeremy@jcline.org> - 2.18.4-6
- Don't print runtime warning about urllib3 v1.23 (rhbz 1589306)

View File

@ -1 +1 @@
SHA512 (requests-v2.18.4.tar.gz) = 8ca20fe18d13b8c62977be0c51617f2ae8618d3d002ad4dc554362828855db7359274efbff0cd13e8c5699508913e91205cffcf306221a70321e74ac10b2d4d7
SHA512 (requests-v2.19.0.tar.gz) = 832ce7e3a67863ed2d241617e9ba983db470f0dbccd78ecb96b5bec2e1d76aa895553d4922bc4c30836e72401213c16ba0098f73dc4e2bc43a8fc36cd4c0ed00