commit: cc8cc1b084289bdc831bef60706d187c77b92881 Author: Huang Rui <vowstar <AT> gmail <DOT> com> AuthorDate: Sun Oct 23 04:52:38 2022 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Sun Oct 23 05:07:23 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc8cc1b0
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 <AT> gmail.com> Closes: https://github.com/gentoo/gentoo/pull/27909 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> ...uests-2.28.1-fix-charsetnormalizer-assert.patch | 41 ++++++++++++++++++++++ ...sts-2.28.1.ebuild => requests-2.28.1-r1.ebuild} | 2 ++ 2 files changed, 43 insertions(+) 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 similarity index 94% rename from dev-python/requests/requests-2.28.1.ebuild rename to 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