diff --git a/python-requests.changes b/python-requests.changes index e992a32..1d8aa6b 100644 --- a/python-requests.changes +++ b/python-requests.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +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 diff --git a/python-requests.spec b/python-requests.spec index c86348b..876635a 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -35,6 +35,9 @@ 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 +# - 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-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",