summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-05-11 22:48:18 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-05-11 22:50:29 +0700
commit24d74bccff96e1334483e6c9b70972f4a3c78438 (patch)
tree8b0934ec4f4d5d2da84e9356e9da25231148eb3a /python
parent07504628fe140b8dad128a5d62bbb057cfad9d96 (diff)
downloadslackbuilds-24d74bccff96e1334483e6c9b70972f4a3c78438.tar.gz
python/python-requests: Support newer python-urllib3.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python')
-rw-r--r--python/python-requests/python-requests.SlackBuild4
-rw-r--r--python/python-requests/support-urllib3-1.26.patch40
2 files changed, 43 insertions, 1 deletions
diff --git a/python/python-requests/python-requests.SlackBuild b/python/python-requests/python-requests.SlackBuild
index e3f724fb23..ec176dbfdb 100644
--- a/python/python-requests/python-requests.SlackBuild
+++ b/python/python-requests/python-requests.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=python-requests
VERSION=${VERSION:-2.21.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
SRCNAM=requests
@@ -71,6 +71,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/support-urllib3-1.26.patch
+
python setup.py install --root=$PKG
# Python 3 support.
diff --git a/python/python-requests/support-urllib3-1.26.patch b/python/python-requests/support-urllib3-1.26.patch
new file mode 100644
index 0000000000..de0bb11dbd
--- /dev/null
+++ b/python/python-requests/support-urllib3-1.26.patch
@@ -0,0 +1,40 @@
+From d6b5b401e8d6141bcefa4a70ff1c836aa085120b Mon Sep 17 00:00:00 2001
+From: Nate Prewitt <Nate.Prewitt@gmail.com>
+Date: Thu, 25 Apr 2019 10:05:02 -0700
+Subject: [PATCH] upgrade support for urllib3 1.25
+
+---
+ requests/__init__.py | 4 ++--
+ setup.py | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/requests/__init__.py b/requests/__init__.py
+index bc168ee53..9a899df67 100644
+--- a/requests/__init__.py
++++ b/requests/__init__.py
+@@ -57,10 +57,10 @@ def check_compatibility(urllib3_version, chardet_version):
+ # Check urllib3 for compatibility.
+ major, minor, patch = urllib3_version # noqa: F811
+ major, minor, patch = int(major), int(minor), int(patch)
+- # urllib3 >= 1.21.1, <= 1.24
++ # urllib3 >= 1.21.1, <= 1.25
+ assert major == 1
+ assert minor >= 21
+- assert minor <= 24
++ assert minor <= 25
+
+ # Check chardet for compatibility.
+ major, minor, patch = chardet_version.split('.')[:3]
+diff --git a/setup.py b/setup.py
+index 10ce2c621..50925533e 100755
+--- a/setup.py
++++ b/setup.py
+@@ -44,7 +44,7 @@ def run_tests(self):
+ requires = [
+ 'chardet>=3.0.2,<3.1.0',
+ 'idna>=2.5,<2.9',
+- 'urllib3>=1.21.1,<1.25',
++ 'urllib3>=1.21.1,<1.26,!=1.25.0',
+ 'certifi>=2017.4.17'
+
+ ]