diff --git a/5711.patch b/5711.patch new file mode 100644 index 0000000..0440137 --- /dev/null +++ b/5711.patch @@ -0,0 +1,50 @@ +From 9484e13c7da927119fe82794bb5571cec144b6d7 Mon Sep 17 00:00:00 2001 +From: Naor Livne +Date: Fri, 1 Jan 2021 14:31:14 +0200 +Subject: [PATCH 1/2] bump idna has version 3.0 was released + +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 7ba4b2a25f..f265384236 100755 +--- a/setup.py ++++ b/setup.py +@@ -43,7 +43,7 @@ def run_tests(self): + + requires = [ + 'chardet>=3.0.2,<5', +- 'idna>=2.5,<3', ++ 'idna>=2.5,<4', + 'urllib3>=1.21.1,<1.27', + 'certifi>=2017.4.17' + + +From d3e00a4958af046879f24de365d5589d861ea6ef Mon Sep 17 00:00:00 2001 +From: Naor Livne +Date: Tue, 5 Jan 2021 16:31:15 +0200 +Subject: [PATCH 2/2] Update setup.py +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Co-authored-by: Mickaël Schoentgen +--- + setup.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index f265384236..5ce59e621d 100755 +--- a/setup.py ++++ b/setup.py +@@ -43,7 +43,8 @@ def run_tests(self): + + requires = [ + 'chardet>=3.0.2,<5', +- 'idna>=2.5,<4', ++ 'idna>=2.5,<3 ; python_version < "3"', ++ 'idna>=2.5,<4 ; python_version >= "3"', + 'urllib3>=1.21.1,<1.27', + 'certifi>=2017.4.17' + diff --git a/python-requests.changes b/python-requests.changes index f1b740c..4c57cd3 100644 --- a/python-requests.changes +++ b/python-requests.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Feb 4 10:32:14 UTC 2021 - Dirk Müller + +- add 5711.patch from upstream instead to remove idna<3 pin + ------------------------------------------------------------------- Wed Feb 3 14:04:52 UTC 2021 - Ben Greiner diff --git a/python-requests.spec b/python-requests.spec index 1ab9d43..ae5d238 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -35,6 +35,8 @@ URL: http://python-requests.org/ Source: https://files.pythonhosted.org/packages/source/r/requests/requests-%{version}.tar.gz # PATCH-FIX-SUSE: do not hardcode versions in setup.py/requirements Patch0: requests-no-hardcoded-version.patch +# PATCH-FIX-UPSTREAM +Patch1: https://patch-diff.githubusercontent.com/raw/psf/requests/pull/5711.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -104,11 +106,6 @@ sed -i "s#\(httpbin.*\), 'never'#\1#" tests/test_requests.py %install %if !%{with test} %python_install -%{python_expand # don't pin to idna<3 for python3, because many package installers check this and fail with newer idna -if [ ! 0%{$python_version_nodots} -lt 30 ]; then - sed -i -E 's/idna<3,?/idna/' %{buildroot}%{$python_sitelib}/requests-%{version}*-info/requires.txt -fi -} # check that urllib3 is not installed test ! -e %{buildroot}%{python3_sitelib}/requests/packages/urllib3 %python_expand %fdupes %{buildroot}%{$python_sitelib}