diff options
author | Huang Rui <vowstar@gmail.com> | 2022-10-23 12:52:38 +0800 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-10-23 07:07:23 +0200 |
commit | cc8cc1b084289bdc831bef60706d187c77b92881 (patch) | |
tree | 64b069d60054def1ec428b41d6aac32c55fc0cec /dev-python/requests | |
parent | net-misc/minissdpd: Bump to 1.6.0 (diff) | |
download | gentoo-cc8cc1b084289bdc831bef60706d187c77b92881.tar.gz gentoo-cc8cc1b084289bdc831bef60706d187c77b92881.tar.bz2 gentoo-cc8cc1b084289bdc831bef60706d187c77b92881.zip |
dev-python/requests: allow charset normalizer >=2 and <4
charset-normalizer 3.0.0 has been released in ::gentoo
Fix crashed problem when installed charset_normalizer-3.0.0
Closes: https://bugs.gentoo.org/878035
Signed-off-by: Huang Rui <vowstar@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/27909
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/requests')
-rw-r--r-- | dev-python/requests/files/requests-2.28.1-fix-charsetnormalizer-assert.patch | 41 | ||||
-rw-r--r-- | dev-python/requests/requests-2.28.1-r1.ebuild (renamed from dev-python/requests/requests-2.28.1.ebuild) | 2 |
2 files changed, 43 insertions, 0 deletions
diff --git a/dev-python/requests/files/requests-2.28.1-fix-charsetnormalizer-assert.patch b/dev-python/requests/files/requests-2.28.1-fix-charsetnormalizer-assert.patch new file mode 100644 index 000000000000..9975072c0c06 --- /dev/null +++ b/dev-python/requests/files/requests-2.28.1-fix-charsetnormalizer-assert.patch @@ -0,0 +1,41 @@ +diff --git a/setup.py b/setup.py +index 23977ed77a..b679181bda 100755 +--- a/setup.py ++++ b/setup.py +@@ -59,7 +59,7 @@ def run_tests(self): + 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", +diff --git a/setup.cfg b/setup.cfg +index 33af66eb15..0c167eb8c9 100644 +--- a/setup.cfg ++++ b/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 + +diff --git a/requests/__init__.py b/requests/__init__.py +index 7ac8e297b8..5812c85d8a 100644 +--- a/requests/__init__.py ++++ b/requests/__init__.py +@@ -80,8 +80,8 @@ def check_compatibility(urllib3_version, chardet_version, charset_normalizer_ver + 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") + diff --git a/dev-python/requests/requests-2.28.1.ebuild b/dev-python/requests/requests-2.28.1-r1.ebuild index 2a817e73057f..b317fdb9e931 100644 --- a/dev-python/requests/requests-2.28.1.ebuild +++ b/dev-python/requests/requests-2.28.1-r1.ebuild @@ -44,6 +44,8 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-2.28.0-drop-dependency-warnings.patch + # https://github.com/psf/requests/pull/6261 + "${FILESDIR}"/${PN}-2.28.1-fix-charsetnormalizer-assert.patch ) distutils_enable_tests pytest |