Accepting request 1032440 from devel:languages:python

- allow using newest version of charset-normalizer (3.0+) 
  * requests-allow-charset-normalizer-3.patch

OBS-URL: https://build.opensuse.org/request/show/1032440
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-requests?expand=0&rev=75
This commit is contained in:
Dominique Leuenberger 2022-11-01 12:41:01 +00:00 committed by Git OBS Bridge
commit b10f6a5c05
3 changed files with 61 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Oct 31 07:43:29 UTC 2022 - David Anes <david.anes@suse.com>
- 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 <dmueller@suse.com>

View File

@ -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

View File

@ -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",