summaryrefslogtreecommitdiff
path: root/dev-python/requests
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /dev-python/requests
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'dev-python/requests')
-rw-r--r--dev-python/requests/Manifest9
-rw-r--r--dev-python/requests/files/requests-2.27.1-unpin-charset-normalizer.patch25
-rw-r--r--dev-python/requests/files/requests-2.28.0-drop-dependency-warnings.patch21
-rw-r--r--dev-python/requests/files/requests-2.28.0-unpin-chardet.patch37
-rw-r--r--dev-python/requests/files/requests-2.28.0-unpin-charset-normalizer.patch31
-rw-r--r--dev-python/requests/requests-2.27.1-r2.ebuild (renamed from dev-python/requests/requests-2.27.1.ebuild)13
-rw-r--r--dev-python/requests/requests-2.28.0-r1.ebuild72
-rw-r--r--dev-python/requests/requests-2.28.0-r2.ebuild74
8 files changed, 279 insertions, 3 deletions
diff --git a/dev-python/requests/Manifest b/dev-python/requests/Manifest
index 65bd39ea5528..0fcef0c396fb 100644
--- a/dev-python/requests/Manifest
+++ b/dev-python/requests/Manifest
@@ -1,3 +1,10 @@
+AUX requests-2.27.1-unpin-charset-normalizer.patch 670 BLAKE2B 09d25ce8300c2dbbe57724bbb61362953602694d0c61b168e2304bf3c428264d40a5b306322f94119db0b27f0d25168bc401600ce0ed62cc0656f2c2126506eb SHA512 dd690477d181702d0a421794b98b8841573a6eb30402a8edc76e9f51b12365dbc2c3d72da1c261e370aa64eebab53b6aea99dfe5016aba0124fcd482c365c1ad
+AUX requests-2.28.0-drop-dependency-warnings.patch 759 BLAKE2B b2cc24d9d3137ad652ab9d8c14a08dd33af7d3f2968433a0f6cb09dda46ee5c98f428e495e5a565d32a142c22afb439e4604e09d2693b945bcceab0475381700 SHA512 2e486d399c311b81522d390ff9eb601fbc31f3ba64c7c3635aa0aa37e959acdba4f0cd4fd87d5ad51e1c50d83057c2f4ea02d9077702d51bda711730ea82e3ce
+AUX requests-2.28.0-unpin-chardet.patch 1569 BLAKE2B 8756805b4b8aea57bdc6e49d58195a7a4d98388cd54b919ec6135a23a3f0b5036cf419f7417699b83430cd2d24ad97d97b70fdd2e799bc6fc8edb1a37338fbd4 SHA512 e9be4ab64610dd3463709e293cba46987dc012d3b8643af57df16dc7add85b33da7bdcaf42e22dfaa9ae1f0c5bc7714aa10b016ce480d57531f7d7fbbaeadcfb
+AUX requests-2.28.0-unpin-charset-normalizer.patch 743 BLAKE2B ed605c62ac0d7b87f802c0cb80b64288d5a0de7f81e11c3a2e89513652f405b525bfcffaa603bd6b9eb4f394b7327fd78920c7c8525bc2968f33cd1ffea4531d SHA512 124e703a0d80d02bbc21c00fdbbdbd97d7e74469f6019cda338be6067994c9b15704e584649fcc91e88799801efd6cd41738115d61e099ef02869d006627087b
DIST requests-2.27.1.tar.gz 106758 BLAKE2B a7fed53998fa61b3d03abd254a0cee76450c5b60d76f80aa6b91f32dca1dae5d2c51987b3d3f2138d72c50790e35c36cb03eb5974554ac4eb1a902eff79b5bdd SHA512 e51916abea8125254c5ee72c97e84a73e6981cab09961486873387522d2ce041ee3fe8fa2ff0b9bbe6707eefdc05145e9adcf127bcd999dea127acdfabd5312f
-EBUILD requests-2.27.1.ebuild 1731 BLAKE2B f2d6a0de3efa99d0dc5cbba9a57c4f4496a080340846a6423fb2528bf24b4eb14f4aafca22b81b49e466747e3fc203885e3c4920818cd148bddf7900250215fa SHA512 c0f589714e1488f2c89906e0e28f1d1e50de8d7024c4ba069a1aec603757bd44860c2231c8e89361f5f15cc7860904e245f1988693358b0c48d24eae49c5581d
+DIST requests-2.28.0.tar.gz 109748 BLAKE2B 1df85b90ab1f6c551e46593dc8640aa0629505c9b395ca2100c6af04435e1360503b215d9796c34fb09122ffd616e1a01ca3574ac4543b4857c76a3dd86f13fe SHA512 111cfd2d0b0267111ccad0a97b33c5e9565812e6e6728b7d5bdbe06c32fae9e637b220bda605d799409e57dc6aaf3bcc66a4a4605cdbccb439367dc492fb836f
+EBUILD requests-2.27.1-r2.ebuild 1908 BLAKE2B a953b0fb34062bae636f2dce4f31f6a17d2cb7b0d1bb6d1cc9093d0d14e50d11e10288df067e660a5b8abffeda281e57b2b2fa0986c152cd12f7b757e18f746c SHA512 03741ec47b5468e168bb5173b8652d9c619ce10c10186adc45a9f0bff1838d7e06d2503b9f6d62d869b85bc2fbeb86f939bfaa96948a1ffd734cbf8cf828a36e
+EBUILD requests-2.28.0-r1.ebuild 1916 BLAKE2B 467e0a6ef9a367b47fa241435437028c4194c1c031ce2109a7f81072061eab0a597f5d97c3122c3bd21cdcf6265eb297120557d1d4513ecc610cbecb190ac6a4 SHA512 88deb82e4c2e046c68d0ee67e676dbe25462a51f597d128dcf4c049ad8e93bdd8a38374758c3d95bd7ee317cd8e52b8a247147314b214afab412583dcce106a2
+EBUILD requests-2.28.0-r2.ebuild 2023 BLAKE2B bb5d65af66c29fb3fc4adde5afdf6eb79e0de26990c8336eaa98ef2592e8124b7d60e00ff6cdc963984d1858ac9e72eb45c4e3e6d3599baea5b4db5dddaae103 SHA512 3a46c51ea3fd58bc98b301f75d2e9748199862f8b408ba2a103c70c54a31afab805d7770a365b4920381a317cc6ef70bfd8deb3ef829cdbb99738db4306d41be
MISC metadata.xml 770 BLAKE2B a085a3bdbcc34c2297ad7d5a0e811c553aa77f12bba1ee8164cf63af2cd86adcef7b6080c984ea73a417ec690252540a0fc6072ee97b068b70f0f695696fc65c SHA512 de5c6a99ae18955f25895a93911570d41cb458eaaa9dc8b6edd09021c6dff3dda7bc2611d090b933837f83b8a7035769bb275bb844e1ac91b89a088dde3c7222
diff --git a/dev-python/requests/files/requests-2.27.1-unpin-charset-normalizer.patch b/dev-python/requests/files/requests-2.27.1-unpin-charset-normalizer.patch
new file mode 100644
index 000000000000..418cb519ffb6
--- /dev/null
+++ b/dev-python/requests/files/requests-2.27.1-unpin-charset-normalizer.patch
@@ -0,0 +1,25 @@
+https://github.com/psf/requests/pull/6169
+https://bugs.gentoo.org/853247
+
+--- a/requests.egg-info/requires.txt
++++ b/requests.egg-info/requires.txt
+@@ -6,7 +6,7 @@ chardet<5,>=3.0.2
+ idna<3,>=2.5
+
+ [:python_version >= "3"]
+-charset_normalizer~=2.0.0
++charset_normalizer~=2.0
+ idna<4,>=2.5
+
+ [security]
+--- a/setup.py
++++ b/setup.py
+@@ -41,7 +41,7 @@ if sys.argv[-1] == 'publish':
+ packages = ['requests']
+
+ requires = [
+- 'charset_normalizer~=2.0.0; python_version >= "3"',
++ 'charset_normalizer~=2.0; python_version >= "3"',
+ 'chardet>=3.0.2,<5; python_version < "3"',
+ 'idna>=2.5,<3; python_version < "3"',
+ 'idna>=2.5,<4; python_version >= "3"',
diff --git a/dev-python/requests/files/requests-2.28.0-drop-dependency-warnings.patch b/dev-python/requests/files/requests-2.28.0-drop-dependency-warnings.patch
new file mode 100644
index 000000000000..ec3634966a07
--- /dev/null
+++ b/dev-python/requests/files/requests-2.28.0-drop-dependency-warnings.patch
@@ -0,0 +1,21 @@
+Minimal patch to avoid often rebasing.
+
+We already have tools to try check for these (`pip check` obviously, but also
+app-portage/gpyutils provides gpy-verify-deps).
+--- a/requests/__init__.py
++++ b/requests/__init__.py
+@@ -106,13 +106,7 @@ try:
+ urllib3.__version__, chardet_version, charset_normalizer_version
+ )
+ except (AssertionError, ValueError):
+- warnings.warn(
+- "urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "
+- "version!".format(
+- urllib3.__version__, chardet_version, charset_normalizer_version
+- ),
+- RequestsDependencyWarning,
+- )
++ pass
+
+ # Attempt to enable urllib3's fallback for SNI support
+ # if the standard library doesn't support SNI or the
diff --git a/dev-python/requests/files/requests-2.28.0-unpin-chardet.patch b/dev-python/requests/files/requests-2.28.0-unpin-chardet.patch
new file mode 100644
index 000000000000..bd0451daaf13
--- /dev/null
+++ b/dev-python/requests/files/requests-2.28.0-unpin-chardet.patch
@@ -0,0 +1,37 @@
+https://github.com/psf/requests/pull/6179
+
+From 09483bae4f56e4f4c227e2d25ee920c538271feb Mon Sep 17 00:00:00 2001
+From: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
+Date: Sun, 26 Jun 2022 12:18:42 +0800
+Subject: [PATCH] Update Dependency with `chardet>=3.0.2,<6`
+
+https://github.com/chardet/chardet/releases/tag/5.0.0 was released on
+2022-06-25 with remove of Python 3.6 support, which also align with our
+Python > 3.6 requirement.
+
+Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
+--- a/requests/__init__.py
++++ b/requests/__init__.py
+@@ -75,8 +75,8 @@ def check_compatibility(urllib3_version, chardet_version, charset_normalizer_ver
+ if chardet_version:
+ major, minor, patch = chardet_version.split(".")[:3]
+ major, minor, patch = int(major), int(minor), int(patch)
+- # chardet_version >= 3.0.2, < 5.0.0
+- assert (3, 0, 2) <= (major, minor, patch) < (5, 0, 0)
++ # chardet_version >= 3.0.2, < 6.0.0
++ assert (3, 0, 2) <= (major, minor, patch) < (6, 0, 0)
+ elif charset_normalizer_version:
+ major, minor, patch = charset_normalizer_version.split(".")[:3]
+ major, minor, patch = int(major), int(minor), int(patch)
+--- a/setup.py
++++ b/setup.py
+@@ -123,7 +123,7 @@ def run_tests(self):
+ extras_require={
+ "security": [],
+ "socks": ["PySocks>=1.5.6, !=1.5.7"],
+- "use_chardet_on_py3": ["chardet>=3.0.2,<5"],
++ "use_chardet_on_py3": ["chardet>=3.0.2,<6"],
+ },
+ project_urls={
+ "Documentation": "https://requests.readthedocs.io",
+
diff --git a/dev-python/requests/files/requests-2.28.0-unpin-charset-normalizer.patch b/dev-python/requests/files/requests-2.28.0-unpin-charset-normalizer.patch
new file mode 100644
index 000000000000..d4a4a1596296
--- /dev/null
+++ b/dev-python/requests/files/requests-2.28.0-unpin-charset-normalizer.patch
@@ -0,0 +1,31 @@
+https://github.com/psf/requests/pull/6169
+https://bugs.gentoo.org/853247
+
+From 9e9cd2a257392988e6fa417361c3085e5b85af85 Mon Sep 17 00:00:00 2001
+From: Lumir Balhar <lbalhar@redhat.com>
+Date: Mon, 20 Jun 2022 09:32:16 +0200
+Subject: [PATCH] Allow charset normalizer >=2 and <3
+
+--- a/setup.py
++++ b/setup.py
+@@ -59,7 +59,7 @@ def run_tests(self):
+ sys.exit()
+
+ requires = [
+- "charset_normalizer~=2.0.0",
++ "charset_normalizer~=2.0",
+ "idna>=2.5,<4",
+ "urllib3>=1.21.1,<1.27",
+ "certifi>=2017.4.17",
+
+--- 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.0.0
++ charset_normalizer~=2.0
+ idna>=2.5,<4
+ urllib3>=1.21.1,<1.27
+
diff --git a/dev-python/requests/requests-2.27.1.ebuild b/dev-python/requests/requests-2.27.1-r2.ebuild
index 02c31e127a85..ecfd2cc3e0ee 100644
--- a/dev-python/requests/requests-2.27.1.ebuild
+++ b/dev-python/requests/requests-2.27.1-r2.ebuild
@@ -4,13 +4,18 @@
# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
EAPI=7
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
DESCRIPTION="HTTP library for human beings"
-HOMEPAGE="https://requests.readthedocs.io/"
+HOMEPAGE="
+ https://requests.readthedocs.io/
+ https://github.com/psf/requests/
+ https://pypi.org/project/requests/
+"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
@@ -37,6 +42,10 @@ BDEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.27.1-unpin-charset-normalizer.patch
+)
+
distutils_enable_tests pytest
python_test() {
diff --git a/dev-python/requests/requests-2.28.0-r1.ebuild b/dev-python/requests/requests-2.28.0-r1.ebuild
new file mode 100644
index 000000000000..b96762bee446
--- /dev/null
+++ b/dev-python/requests/requests-2.28.0-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
+EAPI=7
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="HTTP library for human beings"
+HOMEPAGE="
+ https://requests.readthedocs.io/
+ https://github.com/psf/requests/
+ https://pypi.org/project/requests/
+"
+SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="socks5"
+
+RDEPEND="
+ >=dev-python/certifi-2017.4.17[${PYTHON_USEDEP}]
+ dev-python/charset_normalizer[${PYTHON_USEDEP}]
+ <dev-python/idna-4[${PYTHON_USEDEP}]
+ <dev-python/urllib3-1.27[${PYTHON_USEDEP}]
+ socks5? ( >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}] )
+"
+
+BDEPEND="
+ test? (
+ dev-python/pytest-httpbin[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}]
+ !alpha? ( !hppa? ( !ia64? (
+ dev-python/trustme[${PYTHON_USEDEP}]
+ ) ) )
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.28.0-unpin-charset-normalizer.patch
+)
+
+distutils_enable_tests pytest
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # Internet (doctests)
+ requests/__init__.py::requests
+ requests/api.py::requests.api.request
+ requests/models.py::requests.models.PreparedRequest
+ requests/sessions.py::requests.sessions.Session
+ # require IPv4 interface in 10.* range
+ tests/test_requests.py::TestTimeout::test_connect_timeout
+ tests/test_requests.py::TestTimeout::test_total_timeout_connect
+ # TODO: openssl?
+ tests/test_requests.py::TestRequests::test_pyopenssl_redirect
+ )
+
+ if ! has_version "dev-python/trustme[${PYTHON_USEDEP}]"; then
+ EPYTEST_DESELECT+=(
+ tests/test_requests.py::TestRequests::test_https_warnings
+ )
+ fi
+
+ epytest
+}
diff --git a/dev-python/requests/requests-2.28.0-r2.ebuild b/dev-python/requests/requests-2.28.0-r2.ebuild
new file mode 100644
index 000000000000..c3c23c38db26
--- /dev/null
+++ b/dev-python/requests/requests-2.28.0-r2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
+EAPI=7
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="HTTP library for human beings"
+HOMEPAGE="
+ https://requests.readthedocs.io/
+ https://github.com/psf/requests/
+ https://pypi.org/project/requests/
+"
+SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="socks5"
+
+RDEPEND="
+ >=dev-python/certifi-2017.4.17[${PYTHON_USEDEP}]
+ dev-python/charset_normalizer[${PYTHON_USEDEP}]
+ <dev-python/idna-4[${PYTHON_USEDEP}]
+ <dev-python/urllib3-1.27[${PYTHON_USEDEP}]
+ socks5? ( >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}] )
+"
+
+BDEPEND="
+ test? (
+ dev-python/pytest-httpbin[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}]
+ !alpha? ( !hppa? ( !ia64? (
+ dev-python/trustme[${PYTHON_USEDEP}]
+ ) ) )
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.28.0-unpin-charset-normalizer.patch
+ "${FILESDIR}"/${PN}-2.28.0-unpin-chardet.patch
+ "${FILESDIR}"/${PN}-2.28.0-drop-dependency-warnings.patch
+)
+
+distutils_enable_tests pytest
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # Internet (doctests)
+ requests/__init__.py::requests
+ requests/api.py::requests.api.request
+ requests/models.py::requests.models.PreparedRequest
+ requests/sessions.py::requests.sessions.Session
+ # require IPv4 interface in 10.* range
+ tests/test_requests.py::TestTimeout::test_connect_timeout
+ tests/test_requests.py::TestTimeout::test_total_timeout_connect
+ # TODO: openssl?
+ tests/test_requests.py::TestRequests::test_pyopenssl_redirect
+ )
+
+ if ! has_version "dev-python/trustme[${PYTHON_USEDEP}]"; then
+ EPYTEST_DESELECT+=(
+ tests/test_requests.py::TestRequests::test_https_warnings
+ )
+ fi
+
+ epytest
+}