From 783abdffa966ce2547e80e6bb8591e8678abdd562909e8cc8567eb7b62fff26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Thu, 2 Feb 2023 07:20:06 +0000 Subject: [PATCH 1/6] Accepting request 1062583 from system:homeautomation:home-assistant:unstable update OBS-URL: https://build.opensuse.org/request/show/1062583 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=167 --- python-requests.changes | 8 ---- python-requests.spec | 6 ++- requests-2.28.1.tar.gz | 3 ++ requests-2.28.2.tar.gz | 3 -- requests-allow-charset-normalizer-3.patch | 52 +++++++++++++++++++++++ 5 files changed, 59 insertions(+), 13 deletions(-) create mode 100644 requests-2.28.1.tar.gz delete mode 100644 requests-2.28.2.tar.gz create mode 100644 requests-allow-charset-normalizer-3.patch diff --git a/python-requests.changes b/python-requests.changes index c5d0eb5..1d8aa6b 100644 --- a/python-requests.changes +++ b/python-requests.changes @@ -1,11 +1,3 @@ -------------------------------------------------------------------- -Sat Jan 21 10:01:11 UTC 2023 - Dirk Müller - -- update to 2.28.2: - - Requests now supports charset\_normalizer 3.x. - - Updated MissingSchema exception to suggest https scheme rather than http. -- drop requests-allow-charset-normalizer-3.patch (upstream) - ------------------------------------------------------------------- Mon Oct 31 07:43:29 UTC 2022 - David Anes diff --git a/python-requests.spec b/python-requests.spec index 415313f..876635a 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,7 +26,7 @@ %endif %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-requests%{psuffix} -Version: 2.28.2 +Version: 2.28.1 Release: 0 Summary: Python HTTP Library License: Apache-2.0 @@ -36,6 +36,8 @@ Source: https://files.pythonhosted.org/packages/source/r/requests/reques # PATCH-FIX-SUSE: do not hardcode versions in setup.py/requirements Patch0: requests-no-hardcoded-version.patch # PATCH-FIX-UPSTREAN: Allow charset normalizer >=2 and <4 +# - https://github.com/psf/requests/commit/c57f1f0ca10e61771b459c857182c23626607312 +Patch1: requests-allow-charset-normalizer-3.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module setuptools} BuildRequires: fdupes diff --git a/requests-2.28.1.tar.gz b/requests-2.28.1.tar.gz new file mode 100644 index 0000000..32d6325 --- /dev/null +++ b/requests-2.28.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983 +size 109805 diff --git a/requests-2.28.2.tar.gz b/requests-2.28.2.tar.gz deleted file mode 100644 index e5a95cc..0000000 --- a/requests-2.28.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf -size 108206 diff --git a/requests-allow-charset-normalizer-3.patch b/requests-allow-charset-normalizer-3.patch new file mode 100644 index 0000000..0a2ae82 --- /dev/null +++ b/requests-allow-charset-normalizer-3.patch @@ -0,0 +1,52 @@ +From c57f1f0ca10e61771b459c857182c23626607312 Mon Sep 17 00:00:00 2001 +From: deedy5 <65482418+deedy5@users.noreply.github.com> +Date: Thu, 20 Oct 2022 18:26:18 +0000 +Subject: [PATCH] Allow charset normalizer >=2 and <4 (#6261) + +--- + requests/__init__.py | 4 ++-- + setup.cfg | 2 +- + setup.py | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +Index: requests-2.28.1/requests/__init__.py +=================================================================== +--- requests-2.28.1.orig/requests/__init__.py ++++ requests-2.28.1/requests/__init__.py +@@ -80,8 +80,8 @@ def check_compatibility(urllib3_version, + elif charset_normalizer_version: + major, minor, patch = charset_normalizer_version.split(".")[:3] + major, minor, patch = int(major), int(minor), int(patch) +- # charset_normalizer >= 2.0.0 < 3.0.0 +- assert (2, 0, 0) <= (major, minor, patch) < (3, 0, 0) ++ # charset_normalizer >= 2.0.0 < 4.0.0 ++ assert (2, 0, 0) <= (major, minor, patch) < (4, 0, 0) + else: + raise Exception("You need either charset_normalizer or chardet installed") + +Index: requests-2.28.1/setup.cfg +=================================================================== +--- requests-2.28.1.orig/setup.cfg ++++ requests-2.28.1/setup.cfg +@@ -5,7 +5,7 @@ provides-extra = + use_chardet_on_py3 + requires-dist = + certifi>=2017.4.17 +- charset_normalizer>=2,<3 ++ charset_normalizer>=2,<4 + idna>=2.5,<4 + urllib3>=1.21.1,<1.27 + +Index: requests-2.28.1/setup.py +=================================================================== +--- requests-2.28.1.orig/setup.py ++++ requests-2.28.1/setup.py +@@ -59,7 +59,7 @@ if sys.argv[-1] == "publish": + sys.exit() + + requires = [ +- "charset_normalizer>=2,<3", ++ "charset_normalizer>=2,<4", + "idna>=2.5,<4", + "urllib3>=1.21.1,<1.27", + "certifi>=2017.4.17", From ed3af5b690e652899a9562414bc67f8f50559dd8a34772d932564433e2035de1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Thu, 2 Feb 2023 10:50:58 +0000 Subject: [PATCH 2/6] osc copypac from project:devel:languages:python package:python-requests revision:9e7fe40dca32bed061468bcb1662f429 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=168 --- python-requests.changes | 8 ++++ python-requests.spec | 6 +-- requests-2.28.1.tar.gz | 3 -- requests-2.28.2.tar.gz | 3 ++ requests-allow-charset-normalizer-3.patch | 52 ----------------------- 5 files changed, 13 insertions(+), 59 deletions(-) delete mode 100644 requests-2.28.1.tar.gz create mode 100644 requests-2.28.2.tar.gz delete mode 100644 requests-allow-charset-normalizer-3.patch diff --git a/python-requests.changes b/python-requests.changes index 1d8aa6b..c5d0eb5 100644 --- a/python-requests.changes +++ b/python-requests.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sat Jan 21 10:01:11 UTC 2023 - Dirk Müller + +- update to 2.28.2: + - Requests now supports charset\_normalizer 3.x. + - Updated MissingSchema exception to suggest https scheme rather than http. +- drop requests-allow-charset-normalizer-3.patch (upstream) + ------------------------------------------------------------------- Mon Oct 31 07:43:29 UTC 2022 - David Anes diff --git a/python-requests.spec b/python-requests.spec index 876635a..415313f 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,7 +26,7 @@ %endif %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-requests%{psuffix} -Version: 2.28.1 +Version: 2.28.2 Release: 0 Summary: Python HTTP Library License: Apache-2.0 @@ -36,8 +36,6 @@ Source: https://files.pythonhosted.org/packages/source/r/requests/reques # PATCH-FIX-SUSE: do not hardcode versions in setup.py/requirements Patch0: requests-no-hardcoded-version.patch # PATCH-FIX-UPSTREAN: Allow charset normalizer >=2 and <4 -# - https://github.com/psf/requests/commit/c57f1f0ca10e61771b459c857182c23626607312 -Patch1: requests-allow-charset-normalizer-3.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module setuptools} BuildRequires: fdupes diff --git a/requests-2.28.1.tar.gz b/requests-2.28.1.tar.gz deleted file mode 100644 index 32d6325..0000000 --- a/requests-2.28.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983 -size 109805 diff --git a/requests-2.28.2.tar.gz b/requests-2.28.2.tar.gz new file mode 100644 index 0000000..e5a95cc --- /dev/null +++ b/requests-2.28.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf +size 108206 diff --git a/requests-allow-charset-normalizer-3.patch b/requests-allow-charset-normalizer-3.patch deleted file mode 100644 index 0a2ae82..0000000 --- a/requests-allow-charset-normalizer-3.patch +++ /dev/null @@ -1,52 +0,0 @@ -From c57f1f0ca10e61771b459c857182c23626607312 Mon Sep 17 00:00:00 2001 -From: deedy5 <65482418+deedy5@users.noreply.github.com> -Date: Thu, 20 Oct 2022 18:26:18 +0000 -Subject: [PATCH] Allow charset normalizer >=2 and <4 (#6261) - ---- - requests/__init__.py | 4 ++-- - setup.cfg | 2 +- - setup.py | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -Index: requests-2.28.1/requests/__init__.py -=================================================================== ---- requests-2.28.1.orig/requests/__init__.py -+++ requests-2.28.1/requests/__init__.py -@@ -80,8 +80,8 @@ def check_compatibility(urllib3_version, - elif charset_normalizer_version: - major, minor, patch = charset_normalizer_version.split(".")[:3] - major, minor, patch = int(major), int(minor), int(patch) -- # charset_normalizer >= 2.0.0 < 3.0.0 -- assert (2, 0, 0) <= (major, minor, patch) < (3, 0, 0) -+ # charset_normalizer >= 2.0.0 < 4.0.0 -+ assert (2, 0, 0) <= (major, minor, patch) < (4, 0, 0) - else: - raise Exception("You need either charset_normalizer or chardet installed") - -Index: requests-2.28.1/setup.cfg -=================================================================== ---- requests-2.28.1.orig/setup.cfg -+++ requests-2.28.1/setup.cfg -@@ -5,7 +5,7 @@ provides-extra = - use_chardet_on_py3 - requires-dist = - certifi>=2017.4.17 -- charset_normalizer>=2,<3 -+ charset_normalizer>=2,<4 - idna>=2.5,<4 - urllib3>=1.21.1,<1.27 - -Index: requests-2.28.1/setup.py -=================================================================== ---- requests-2.28.1.orig/setup.py -+++ requests-2.28.1/setup.py -@@ -59,7 +59,7 @@ if sys.argv[-1] == "publish": - sys.exit() - - requires = [ -- "charset_normalizer>=2,<3", -+ "charset_normalizer>=2,<4", - "idna>=2.5,<4", - "urllib3>=1.21.1,<1.27", - "certifi>=2017.4.17", From a97af8bc6fea0438b9e524708cf94aeeabe33c0ebf07d700f07c46c7248237e1 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 13 Feb 2023 23:21:38 +0000 Subject: [PATCH 3/6] Accepting request 1065612 from home:dirkmueller:acdc - Don't upper limit version of charset_normalizer required. OBS-URL: https://build.opensuse.org/request/show/1065612 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=169 --- python-requests.changes | 49 ++--------------------------- python-requests.spec | 7 +++-- requests-2.27.1.tar.gz | 3 ++ requests-2.28.2.tar.gz | 3 -- requests-no-hardcoded-version.patch | 23 ++++++++------ 5 files changed, 22 insertions(+), 63 deletions(-) create mode 100644 requests-2.27.1.tar.gz delete mode 100644 requests-2.28.2.tar.gz diff --git a/python-requests.changes b/python-requests.changes index c5d0eb5..498a415 100644 --- a/python-requests.changes +++ b/python-requests.changes @@ -1,52 +1,7 @@ ------------------------------------------------------------------- -Sat Jan 21 10:01:11 UTC 2023 - Dirk Müller +Mon Feb 13 22:28:29 UTC 2023 - Matej Cepl -- update to 2.28.2: - - Requests now supports charset\_normalizer 3.x. - - Updated MissingSchema exception to suggest https scheme rather than http. -- drop requests-allow-charset-normalizer-3.patch (upstream) - -------------------------------------------------------------------- -Mon Oct 31 07:43:29 UTC 2022 - David Anes - -- allow using newest version of charset-normalizer (3.0+) - * requests-allow-charset-normalizer-3.patch - -------------------------------------------------------------------- -Thu Sep 29 14:01:56 UTC 2022 - Dirk Müller - -- requires python 3.7 or newer - -------------------------------------------------------------------- -Wed Jun 29 19:11:41 UTC 2022 - Michael Ströder - -- rebased requests-no-hardcoded-version.patch -- update to 2.28.1 - * 2.28.1 (2022-06-29) - - Improvements - + Speed optimization in iter_content with transition to yield from. (#6170) - - Dependencies - + Added support for chardet 5.0.0 (#6179) - + Added support for charset-normalizer 2.1.0 (#6169) - * 2.28.0 (2022-06-09) - - Deprecations - + warning Requests has officially dropped support for Python 2.7. warning (#6091) - + Requests has officially dropped support for Python 3.6 (including pypy3.6). (#6091) - - Improvements - + Wrap JSON parsing issues in Request's JSONDecodeError for payloads - without an encoding to make json() API consistent. (#6097) - + Parse header components consistently, raising an InvalidHeader error in all invalid cases. (#6154) - + Added provisional 3.11 support with current beta build. (#6155) - + Requests got a makeover and we decided to paint it black. (#6095) - - Bugfixes - + Fixed bug where setting CURL_CA_BUNDLE to an empty string would disable - cert verification. All Requests 2.x versions before 2.28.0 are affected. (#6074) - + Fixed urllib3 exception leak, wrapping urllib3.exceptions.SSLError with - requests.exceptions.SSLError for content and iter_content. (#6057) - + Fixed issue where invalid Windows registry entires caused proxy resolution - to raise an exception rather than ignoring the entry. (#6149) - + Fixed issue where entire payload could be included in the error - message for JSONDecodeError. (#6036) +- Don't upper limit version of charset_normalizer required. ------------------------------------------------------------------- Wed Jan 5 17:09:11 UTC 2022 - Michael Ströder diff --git a/python-requests.spec b/python-requests.spec index 415313f..a716631 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -26,7 +26,7 @@ %endif %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-requests%{psuffix} -Version: 2.28.2 +Version: 2.27.1 Release: 0 Summary: Python HTTP Library License: Apache-2.0 @@ -35,8 +35,6 @@ URL: https://docs.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-UPSTREAN: Allow charset normalizer >=2 and <4 -BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -101,6 +99,9 @@ sed -i '1s/^#!.*$//' requests/certs.py # requires httpbin 0.6.0 sed -i "s#\(httpbin.*\), 'never'#\1#" tests/test_requests.py +# Fix charset_normalizer requirements, we cannot do the upper limit. +sed -i -e '/charset_normalizer/s/\~/>/' setup.py + %build %python_build diff --git a/requests-2.27.1.tar.gz b/requests-2.27.1.tar.gz new file mode 100644 index 0000000..f316f0f --- /dev/null +++ b/requests-2.27.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61 +size 106758 diff --git a/requests-2.28.2.tar.gz b/requests-2.28.2.tar.gz deleted file mode 100644 index e5a95cc..0000000 --- a/requests-2.28.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf -size 108206 diff --git a/requests-no-hardcoded-version.patch b/requests-no-hardcoded-version.patch index e3e2075..2aeaa86 100644 --- a/requests-no-hardcoded-version.patch +++ b/requests-no-hardcoded-version.patch @@ -1,12 +1,15 @@ -diff -ur requests-2.28.1.orig/setup.py requests-2.28.1/setup.py ---- requests-2.28.1.orig/setup.py 2022-06-29 17:09:45.000000000 +0200 -+++ requests-2.28.1/setup.py 2022-06-29 21:15:48.428104387 +0200 -@@ -65,7 +65,7 @@ - "certifi>=2017.4.17", +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/setup.py ++++ b/setup.py +@@ -50,7 +50,7 @@ requires = [ + ] test_requirements = [ -- "pytest-httpbin==0.0.7", -+ "pytest-httpbin>=0.0.7", - "pytest-cov", - "pytest-mock", - "pytest-xdist", +- 'pytest-httpbin==0.0.7', ++ 'pytest-httpbin>=0.0.7', + 'pytest-cov', + 'pytest-mock', + 'pytest-xdist', From fe92d4619fc53af6ed0e54664b12bdb8e9e7ea4c768cfd8551d5f4ab0ae9d3ab Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 16 Feb 2023 17:38:12 +0000 Subject: [PATCH 4/6] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=170 --- python-requests.changes | 6 ++++++ requests-no-hardcoded-version.patch | 21 +++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/python-requests.changes b/python-requests.changes index 498a415..4daba77 100644 --- a/python-requests.changes +++ b/python-requests.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 16 17:03:23 UTC 2023 - David Anes + +- Don't upper limit version of charset_normalized at runtime, too. + * Added change to patch: requests-no-hardcoded-version.patch + ------------------------------------------------------------------- Mon Feb 13 22:28:29 UTC 2023 - Matej Cepl diff --git a/requests-no-hardcoded-version.patch b/requests-no-hardcoded-version.patch index 2aeaa86..1640a97 100644 --- a/requests-no-hardcoded-version.patch +++ b/requests-no-hardcoded-version.patch @@ -2,8 +2,10 @@ setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---- a/setup.py -+++ b/setup.py +Index: requests-2.27.1/setup.py +=================================================================== +--- requests-2.27.1.orig/setup.py ++++ requests-2.27.1/setup.py @@ -50,7 +50,7 @@ requires = [ ] @@ -13,3 +15,18 @@ 'pytest-cov', 'pytest-mock', 'pytest-xdist', +Index: requests-2.27.1/requests/__init__.py +=================================================================== +--- requests-2.27.1.orig/requests/__init__.py ++++ requests-2.27.1/requests/__init__.py +@@ -79,8 +79,8 @@ def check_compatibility(urllib3_version, + elif charset_normalizer_version: + major, minor, patch = charset_normalizer_version.split('.')[:3] + major, minor, patch = int(major), int(minor), int(patch) +- # charset_normalizer >= 2.0.0 < 3.0.0 +- assert (2, 0, 0) <= (major, minor, patch) < (3, 0, 0) ++ # charset_normalizer >= 2.0.0 < 4.0.0 ++ assert (2, 0, 0) <= (major, minor, patch) < (4, 0, 0) + else: + raise Exception("You need either charset_normalizer or chardet installed") + From ec95131598690c9b50c78dd5b6a5d47c50409648c8f95ec2d2f982dced1085b3 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 24 Feb 2023 11:02:42 +0000 Subject: [PATCH 5/6] Accepting request 1067584 from devel:languages:python revert OBS-URL: https://build.opensuse.org/request/show/1067584 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=171 --- python-requests.changes | 49 ++++++++++++++++++++++++++--- python-requests.spec | 7 ++--- requests-2.27.1.tar.gz | 3 -- requests-2.28.2.tar.gz | 3 ++ requests-no-hardcoded-version.patch | 40 ++++++----------------- 5 files changed, 60 insertions(+), 42 deletions(-) delete mode 100644 requests-2.27.1.tar.gz create mode 100644 requests-2.28.2.tar.gz diff --git a/python-requests.changes b/python-requests.changes index 4daba77..c5d0eb5 100644 --- a/python-requests.changes +++ b/python-requests.changes @@ -1,13 +1,52 @@ ------------------------------------------------------------------- -Thu Feb 16 17:03:23 UTC 2023 - David Anes +Sat Jan 21 10:01:11 UTC 2023 - Dirk Müller -- Don't upper limit version of charset_normalized at runtime, too. - * Added change to patch: requests-no-hardcoded-version.patch +- update to 2.28.2: + - Requests now supports charset\_normalizer 3.x. + - Updated MissingSchema exception to suggest https scheme rather than http. +- drop requests-allow-charset-normalizer-3.patch (upstream) ------------------------------------------------------------------- -Mon Feb 13 22:28:29 UTC 2023 - Matej Cepl +Mon Oct 31 07:43:29 UTC 2022 - David Anes -- Don't upper limit version of charset_normalizer required. +- allow using newest version of charset-normalizer (3.0+) + * requests-allow-charset-normalizer-3.patch + +------------------------------------------------------------------- +Thu Sep 29 14:01:56 UTC 2022 - Dirk Müller + +- requires python 3.7 or newer + +------------------------------------------------------------------- +Wed Jun 29 19:11:41 UTC 2022 - Michael Ströder + +- rebased requests-no-hardcoded-version.patch +- update to 2.28.1 + * 2.28.1 (2022-06-29) + - Improvements + + Speed optimization in iter_content with transition to yield from. (#6170) + - Dependencies + + Added support for chardet 5.0.0 (#6179) + + Added support for charset-normalizer 2.1.0 (#6169) + * 2.28.0 (2022-06-09) + - Deprecations + + warning Requests has officially dropped support for Python 2.7. warning (#6091) + + Requests has officially dropped support for Python 3.6 (including pypy3.6). (#6091) + - Improvements + + Wrap JSON parsing issues in Request's JSONDecodeError for payloads + without an encoding to make json() API consistent. (#6097) + + Parse header components consistently, raising an InvalidHeader error in all invalid cases. (#6154) + + Added provisional 3.11 support with current beta build. (#6155) + + Requests got a makeover and we decided to paint it black. (#6095) + - Bugfixes + + Fixed bug where setting CURL_CA_BUNDLE to an empty string would disable + cert verification. All Requests 2.x versions before 2.28.0 are affected. (#6074) + + Fixed urllib3 exception leak, wrapping urllib3.exceptions.SSLError with + requests.exceptions.SSLError for content and iter_content. (#6057) + + Fixed issue where invalid Windows registry entires caused proxy resolution + to raise an exception rather than ignoring the entry. (#6149) + + Fixed issue where entire payload could be included in the error + message for JSONDecodeError. (#6036) ------------------------------------------------------------------- Wed Jan 5 17:09:11 UTC 2022 - Michael Ströder diff --git a/python-requests.spec b/python-requests.spec index a716631..415313f 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -26,7 +26,7 @@ %endif %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-requests%{psuffix} -Version: 2.27.1 +Version: 2.28.2 Release: 0 Summary: Python HTTP Library License: Apache-2.0 @@ -35,6 +35,8 @@ URL: https://docs.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-UPSTREAN: Allow charset normalizer >=2 and <4 +BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -99,9 +101,6 @@ sed -i '1s/^#!.*$//' requests/certs.py # requires httpbin 0.6.0 sed -i "s#\(httpbin.*\), 'never'#\1#" tests/test_requests.py -# Fix charset_normalizer requirements, we cannot do the upper limit. -sed -i -e '/charset_normalizer/s/\~/>/' setup.py - %build %python_build diff --git a/requests-2.27.1.tar.gz b/requests-2.27.1.tar.gz deleted file mode 100644 index f316f0f..0000000 --- a/requests-2.27.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61 -size 106758 diff --git a/requests-2.28.2.tar.gz b/requests-2.28.2.tar.gz new file mode 100644 index 0000000..e5a95cc --- /dev/null +++ b/requests-2.28.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf +size 108206 diff --git a/requests-no-hardcoded-version.patch b/requests-no-hardcoded-version.patch index 1640a97..e3e2075 100644 --- a/requests-no-hardcoded-version.patch +++ b/requests-no-hardcoded-version.patch @@ -1,32 +1,12 @@ ---- - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: requests-2.27.1/setup.py -=================================================================== ---- requests-2.27.1.orig/setup.py -+++ requests-2.27.1/setup.py -@@ -50,7 +50,7 @@ requires = [ - +diff -ur requests-2.28.1.orig/setup.py requests-2.28.1/setup.py +--- requests-2.28.1.orig/setup.py 2022-06-29 17:09:45.000000000 +0200 ++++ requests-2.28.1/setup.py 2022-06-29 21:15:48.428104387 +0200 +@@ -65,7 +65,7 @@ + "certifi>=2017.4.17", ] test_requirements = [ -- 'pytest-httpbin==0.0.7', -+ 'pytest-httpbin>=0.0.7', - 'pytest-cov', - 'pytest-mock', - 'pytest-xdist', -Index: requests-2.27.1/requests/__init__.py -=================================================================== ---- requests-2.27.1.orig/requests/__init__.py -+++ requests-2.27.1/requests/__init__.py -@@ -79,8 +79,8 @@ def check_compatibility(urllib3_version, - elif charset_normalizer_version: - major, minor, patch = charset_normalizer_version.split('.')[:3] - major, minor, patch = int(major), int(minor), int(patch) -- # charset_normalizer >= 2.0.0 < 3.0.0 -- assert (2, 0, 0) <= (major, minor, patch) < (3, 0, 0) -+ # charset_normalizer >= 2.0.0 < 4.0.0 -+ assert (2, 0, 0) <= (major, minor, patch) < (4, 0, 0) - else: - raise Exception("You need either charset_normalizer or chardet installed") - +- "pytest-httpbin==0.0.7", ++ "pytest-httpbin>=0.0.7", + "pytest-cov", + "pytest-mock", + "pytest-xdist", From d539fb737755cb2a298da3e3dde5832d070356ee754535e146b26f9dd2952850 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 24 Feb 2023 11:33:24 +0000 Subject: [PATCH 6/6] - Don't upper limit version of charset_normalized at runtime, too. * Added change to patch: requests-no-hardcoded-version.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=172 --- python-requests.changes | 6 ++++++ python-requests.spec | 6 ++---- requests-no-hardcoded-version.patch | 23 +++++++++++++++++++---- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/python-requests.changes b/python-requests.changes index c5d0eb5..c845811 100644 --- a/python-requests.changes +++ b/python-requests.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 16 17:03:23 UTC 2023 - David Anes + +- Don't upper limit version of charset_normalized at runtime, too. + * Added change to patch: requests-no-hardcoded-version.patch + ------------------------------------------------------------------- Sat Jan 21 10:01:11 UTC 2023 - Dirk Müller diff --git a/python-requests.spec b/python-requests.spec index 415313f..36737ad 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -33,9 +33,8 @@ License: Apache-2.0 Group: Development/Languages/Python URL: https://docs.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 +# PATCH-FIX-UPSTREAM: Allow charset normalizer >=2 and <4, and don't strict require httpbin===1.0.0 Patch0: requests-no-hardcoded-version.patch -# PATCH-FIX-UPSTREAN: Allow charset normalizer >=2 and <4 BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -91,8 +90,7 @@ Features of Requests: + URL + HTTP Auth Registry. %prep -%setup -q -n requests-%{version} -%autopatch -p1 +%autosetup -p1 -n requests-%{version} # drop shebang from certs.py sed -i '1s/^#!.*$//' requests/certs.py diff --git a/requests-no-hardcoded-version.patch b/requests-no-hardcoded-version.patch index e3e2075..76cf772 100644 --- a/requests-no-hardcoded-version.patch +++ b/requests-no-hardcoded-version.patch @@ -1,7 +1,22 @@ -diff -ur requests-2.28.1.orig/setup.py requests-2.28.1/setup.py ---- requests-2.28.1.orig/setup.py 2022-06-29 17:09:45.000000000 +0200 -+++ requests-2.28.1/setup.py 2022-06-29 21:15:48.428104387 +0200 -@@ -65,7 +65,7 @@ +--- + requirements-dev.txt | 2 +- + setup.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/requirements-dev.txt ++++ b/requirements-dev.txt +@@ -1,7 +1,7 @@ + -e .[socks] + pytest>=2.8.0,<=6.2.5 + pytest-cov +-pytest-httpbin==1.0.0 ++pytest-httpbin>=1.0.0 + pytest-mock==2.0.0 + httpbin==0.7.0 + trustme +--- a/setup.py ++++ b/setup.py +@@ -65,7 +65,7 @@ requires = [ "certifi>=2017.4.17", ] test_requirements = [