diff --git a/patches/packages/to-upstream/0016-python-requests-allow-urllib3-1.25.x.patch b/patches/packages/to-upstream/0016-python-requests-allow-urllib3-1.25.x.patch new file mode 100644 index 0000000000000000000000000000000000000000..205128801f7cc14de8d923c564b2e3cd1da07743 --- /dev/null +++ b/patches/packages/to-upstream/0016-python-requests-allow-urllib3-1.25.x.patch @@ -0,0 +1,104 @@ +From de9e8d5603878c64d0fea5fab9d7bdd801a69b8b Mon Sep 17 00:00:00 2001 +From: Josef Schlehofer <pepe.schlehofer@gmail.com> +Date: Fri, 26 Apr 2019 13:49:38 +0200 +Subject: [PATCH] python-requests: allow urllib3 1.25.x + +Add PKG_CPE_ID +Add PKG_LICENSE_FILES +Update URL + +Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com> +--- + lang/python/python-requests/Makefile | 13 +++++--- + .../patches/Allow-urllib3-125x.patch | 32 +++++++++++++++++++ + 2 files changed, 40 insertions(+), 5 deletions(-) + create mode 100644 lang/python/python-requests/patches/Allow-urllib3-125x.patch + +diff --git a/lang/python/python-requests/Makefile b/lang/python/python-requests/Makefile +index 36b7302d6..0cce76318 100644 +--- a/lang/python/python-requests/Makefile ++++ b/lang/python/python-requests/Makefile +@@ -9,12 +9,17 @@ include $(TOPDIR)/rules.mk + + PKG_NAME:=python-requests + PKG_VERSION:=2.21.0 +-PKG_RELEASE:=2 ++PKG_RELEASE:=3 ++ ++PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>, Alexandru Ardelean <ardeleanalex@gmail.com> + PKG_LICENSE:=Apache-2.0 ++PKG_LICENSE_FILES:=LICENSE ++PKG_CPE_ID:=cpe:/a:python-requests:requests + + PKG_SOURCE:=requests-$(PKG_VERSION).tar.gz + PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/r/requests + PKG_HASH:=502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e ++ + PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-requests-$(PKG_VERSION) + + PKG_CPE_ID:=cpe:/a:python-requests:requests +@@ -29,13 +34,12 @@ define Package/python-requests/Default + SUBMENU:=Python + SECTION:=lang + CATEGORY:=Languages +- MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>, Alexandru Ardelean <ardeleanalex@gmail.com> +- URL:=http://python-requests.org/ ++ TITLE:=HTTP library for Python ++ URL:=https://2.python-requests.org/ + endef + + define Package/python-requests + $(call Package/python-requests/Default) +- TITLE:=HTTP library for Python + DEPENDS:= \ + +PACKAGE_python-requests:python \ + +PACKAGE_python-requests:python-chardet \ +@@ -47,7 +51,6 @@ endef + + define Package/python3-requests + $(call Package/python-requests/Default) +- TITLE:=HTTP library for Python3 + DEPENDS:= \ + +python3-light \ + +python3-chardet \ +diff --git a/lang/python/python-requests/patches/Allow-urllib3-125x.patch b/lang/python/python-requests/patches/Allow-urllib3-125x.patch +new file mode 100644 +index 000000000..f85d8d7e9 +--- /dev/null ++++ b/lang/python/python-requests/patches/Allow-urllib3-125x.patch +@@ -0,0 +1,32 @@ ++Pull request: https://github.com/kennethreitz/requests/pull/5063 ++ ++diff --git a/requests/__init__.py b/requests/__init__.py ++index bc168ee..9a899df 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 10ce2c6..0d5d0cc 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.9', ++- 'urllib3>=1.21.1,<1.25', +++ 'urllib3>=1.21.1,<1.26,!=1.25', ++ 'certifi>=2017.4.17' ++ ++ ] +-- +2.20.1 +