From 89088679b928674cda7e730f588ea9564ff68257f1ff3797000aef649c19d468 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 4 Feb 2021 10:32:38 +0000 Subject: [PATCH 1/4] - add 5711.patch from upstream instead to remove idna<3 pin OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=149 --- 5711.patch | 50 +++++++++++++++++++++++++++++++++++++++++ python-requests.changes | 5 +++++ python-requests.spec | 7 ++---- 3 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 5711.patch 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} From 95ae2aa31d11248b46a0dd689d532e379fb161814c3eb447b2c4075a0b8f4b49 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 4 Feb 2021 11:00:29 +0000 Subject: [PATCH 2/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=150 --- python-requests.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-requests.spec b/python-requests.spec index ae5d238..3f246bd 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -35,7 +35,7 @@ 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 +# PATCH-FIX-UPSTREAM: gh#psf/requests#5711 Patch1: https://patch-diff.githubusercontent.com/raw/psf/requests/pull/5711.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes From eb8faaf2c790af9717a0261927595f6652f9690068ee80a2aab9f0332402f71f Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Thu, 11 Feb 2021 11:46:29 +0000 Subject: [PATCH 3/4] Updating link to change in openSUSE:Factory/python-requests revision 68.0 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=c3af1fde49fadccc2ba875edb5defc88 --- python-requests.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python-requests.spec b/python-requests.spec index 3f246bd..5e03f1a 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -106,6 +106,11 @@ 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} From 1778e8f805f81a1958cd1849897f0270d36b1c3950e4620748bcceb1fdc7f523 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Thu, 11 Feb 2021 11:46:29 +0000 Subject: [PATCH 4/4] Accepting request 869036 from devel:languages:python baserev update by copy to link target OBS-URL: https://build.opensuse.org/request/show/869036 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=151 --- python-requests.spec | 5 ----- 1 file changed, 5 deletions(-) diff --git a/python-requests.spec b/python-requests.spec index 5e03f1a..3f246bd 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -106,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}