summaryrefslogtreecommitdiff
path: root/dev-python/urllib3
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/urllib3')
-rw-r--r--dev-python/urllib3/Manifest5
-rw-r--r--dev-python/urllib3/metadata.xml3
-rw-r--r--dev-python/urllib3/urllib3-2.2.0.ebuild92
3 files changed, 99 insertions, 1 deletions
diff --git a/dev-python/urllib3/Manifest b/dev-python/urllib3/Manifest
index cdbdd093c103..099c35ad9bf7 100644
--- a/dev-python/urllib3/Manifest
+++ b/dev-python/urllib3/Manifest
@@ -1,7 +1,10 @@
+DIST hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.gh.tar.gz 156216 BLAKE2B fcb5f49653401e6e4079e1c770d3cd407602d4d6764437b735bd4ec04191dec59cdc930822fa2aff726ee25cddd0f71fd457dedf31026bff1da121d93af8b768 SHA512 62d6787d88a2e716f0ac04fc49f6cdc586e473a660ee754ff66961922ae78bcc75d1f78b091e78557dd60f006e8e480114738c7b4ff71beac804e4fc9603240b
DIST urllib3-1.26.18.tar.gz 305687 BLAKE2B f2f673761a8d80eee715a8726ba36ab6b09800fd4a4f03f27438553c36072e2abb5ff26cff71dcf30fd114f4d28c4ad9907533965b83c8a0581d3d4661904b70 SHA512 c89e93a032bf6b11375c06ef7c5abc1868f93e7655cfdca09e9bd939ad415d206ea159fe151ecd2e5f725e0e18a831c7a5382ad01dbc32264154fc8af7aec156
DIST urllib3-2.0.7.tar.gz 282546 BLAKE2B d4fbb9e1d0b6d1f3c3d71efc3fc479c7b1c49f87ca849c387701fb0c8b4124082de6d83d958c8b2afc225a84b80e7665df857e7b0918ba50e4ad1431f8facc4d SHA512 ca21dd330cfc7f53e6f00a92be1df1d24acbe61b6ca31c52a272dccd6f50d1bb797eece9132860adc84c21a9bebc3030a12816081451fcb8384c11a6cd2d1e8b
DIST urllib3-2.1.0.tar.gz 263900 BLAKE2B 9e0438a11b7178c5004c1253179bb6bfcb1fa8711db47084377bb14c5834f7b88b04a5560b99bf6fff5f1f4622d4b1998d19dd517ab6b7453fd53c832ee7fefa SHA512 33d6eafd9b6ecd97ee2dca8a4f1612a6fcc584961bcfd3a0a188f557a73f4c1576f98dc525c3b2feecb2d676f4bf4364aafeef093d6686e4b3ef2043726561a8
+DIST urllib3-2.2.0.tar.gz 287152 BLAKE2B 126949265c6558e8743f8e2e05e80fd211845c67436db096796f453ed248d348dcc73d3822c77bb94b55b711eb4b10899b60808be1f4981159f772a2066d5e39 SHA512 8fa2735ff623ec549802290a2317d3d24cdd18e43b8b0702dcee03ecba31428bd0dd12e5b8e129135a3f254bcf5bcd6a8b608c3a43192b50e3a815c73906f6cd
EBUILD urllib3-1.26.18.ebuild 2312 BLAKE2B 9c1155aa93102ea0b118b2980142c07b9bb98b08ebb779861ecf182ffcedd542bb816e1f9a1976cdd09760ad2d0c931bc1d4fe8050ab2a93d9ded82ba0b4966d SHA512 9c4d385c148f5ba5e1a2f0792e1059aece3aff14baf2236edeee36e31fc6f83ff7b6401b6100d3d3f35ad631eb2bbbe4eec95e31dfb0948e2a4833c38c234a73
EBUILD urllib3-2.0.7.ebuild 3297 BLAKE2B aa93e50875380bda0b91543451be2d3425d0ab8c77650a9c84fff90c889ddf812ae66b78fed95ef820a68a510eb952716fea459f7dcef8b41db8156e0b5d3cb0 SHA512 790d5c7d1fb6838be75ecb3802cda5975ffe5a45c57cd67d6fe264de4bf47b9511b897233f8057298721665366f1da5bb89fbb58bf255b4659b8afc4f95224d4
EBUILD urllib3-2.1.0.ebuild 3297 BLAKE2B aa93e50875380bda0b91543451be2d3425d0ab8c77650a9c84fff90c889ddf812ae66b78fed95ef820a68a510eb952716fea459f7dcef8b41db8156e0b5d3cb0 SHA512 790d5c7d1fb6838be75ecb3802cda5975ffe5a45c57cd67d6fe264de4bf47b9511b897233f8057298721665366f1da5bb89fbb58bf255b4659b8afc4f95224d4
-MISC metadata.xml 449 BLAKE2B 45df5a0e80d7b229058be52fd8feb3ba2efe8d981b5b34216e4b9cb35d332588c4b3efade8e8d06bdf1f13159dfcd937458e5cf4d0cea5e07b6c1011cc8592cb SHA512 312b41031a9cbf6341f537fef94137420ca49ab609e7d4c325a998e328be415b381aa50e7b5600483d1a7583b72675a044b5dd80cb84a52539ab23271f1b096c
+EBUILD urllib3-2.2.0.ebuild 2829 BLAKE2B d05655d92f18e3bf2a8daabb20952ba0b55962152d8428d957f245c206944c9a3df31fe74d62ffda626845dd561ce0c0ec67a5d4f4528b1b333ae7f51b5920f3 SHA512 3f77d4f75ebda24115d44ed089cf8cca10d616bf3433cb9f3b467686bc0777999099af2102dc37b25ff94784314c266798bc770e946bf1ac16c4337a6930c941
+MISC metadata.xml 517 BLAKE2B dc83f0a8a82237c4b4627060b12b2e39dd1ed3550b0b76b5b2d8a91be9fed2e9a5af48ec0b9a981a04ed6ec83b3f9a3cc0a0fb333fcd5f6e01e66b1b325daef5 SHA512 f8235269abc564086f2ba87cbeb45c3dceaa7bedc68e298830bb1ca4de5f570697c634a042c054bb433993b501b3809a223d2ccc39fa9a14c5fe8c2d14938d81
diff --git a/dev-python/urllib3/metadata.xml b/dev-python/urllib3/metadata.xml
index e27c6550e713..fb30a3f274c4 100644
--- a/dev-python/urllib3/metadata.xml
+++ b/dev-python/urllib3/metadata.xml
@@ -11,4 +11,7 @@
<remote-id type="cpe">cpe:/a:urllib3:urllib3</remote-id>
<remote-id type="github">urllib3/urllib3</remote-id>
</upstream>
+ <use>
+ <flag name="http2">Enable HTTP/2.0 support.</flag>
+ </use>
</pkgmetadata>
diff --git a/dev-python/urllib3/urllib3-2.2.0.ebuild b/dev-python/urllib3/urllib3-2.2.0.ebuild
new file mode 100644
index 000000000000..4f043620722c
--- /dev/null
+++ b/dev-python/urllib3/urllib3-2.2.0.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# please keep this ebuild at EAPI 8 -- sys-apps/portage dep
+EAPI=8
+
+DISTUTILS_USE_PEP517=hatchling
+PYTHON_TESTED=( python3_{10..12} pypy3 )
+PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
+PYTHON_REQ_USE="ssl(+)"
+
+inherit distutils-r1 pypi
+
+# The package has a test dependency on their own hypercorn fork.
+HYPERCORN_COMMIT=d1719f8c1570cbd8e6a3719ffdb14a4d72880abb
+DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
+HOMEPAGE="
+ https://github.com/urllib3/urllib3/
+ https://pypi.org/project/urllib3/
+"
+SRC_URI+="
+ test? (
+ https://github.com/urllib3/hypercorn/archive/${HYPERCORN_COMMIT}.tar.gz
+ -> hypercorn-${HYPERCORN_COMMIT}.gh.tar.gz
+ )
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64"
+IUSE="brotli http2 test zstd"
+RESTRICT="!test? ( test )"
+
+# [secure] extra is deprecated and slated for removal, we don't need it:
+# https://github.com/urllib3/urllib3/issues/2680
+RDEPEND="
+ >=dev-python/PySocks-1.5.8[${PYTHON_USEDEP}]
+ <dev-python/PySocks-2.0[${PYTHON_USEDEP}]
+ brotli? ( >=dev-python/brotlicffi-0.8.0[${PYTHON_USEDEP}] )
+ http2? (
+ <dev-python/h2-5[${PYTHON_USEDEP}]
+ >=dev-python/h2-4[${PYTHON_USEDEP}]
+ )
+ zstd? ( >=dev-python/zstandard-0.18.0[${PYTHON_USEDEP}] )
+"
+BDEPEND="
+ test? (
+ $(python_gen_cond_dep "
+ ${RDEPEND}
+ dev-python/brotlicffi[\${PYTHON_USEDEP}]
+ dev-python/freezegun[\${PYTHON_USEDEP}]
+ dev-python/h2[\${PYTHON_USEDEP}]
+ dev-python/httpx[\${PYTHON_USEDEP}]
+ dev-python/pytest[\${PYTHON_USEDEP}]
+ dev-python/pytest-rerunfailures[\${PYTHON_USEDEP}]
+ dev-python/pytest-timeout[\${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[\${PYTHON_USEDEP}]
+ dev-python/quart[\${PYTHON_USEDEP}]
+ dev-python/quart-trio[\${PYTHON_USEDEP}]
+ dev-python/trio[\${PYTHON_USEDEP}]
+ >=dev-python/tornado-4.2.1[\${PYTHON_USEDEP}]
+ >=dev-python/trustme-0.5.3[\${PYTHON_USEDEP}]
+ >=dev-python/zstandard-0.18.0[\${PYTHON_USEDEP}]
+ " "${PYTHON_TESTED[@]}")
+ )
+"
+
+src_prepare() {
+ # upstream considers 0.5 s to be "long" for a timeout
+ # we get tons of test failures on *fast* systems because of that
+ sed -i -e '/LONG_TIMEOUT/s:0.5:5:' test/__init__.py || die
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ local -x PYTHONPATH=${WORKDIR}/hypercorn-${HYPERCORN_COMMIT}/src
+ local -x CI=1
+ if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then
+ einfo "Skipping tests on ${EPYTHON}"
+ return
+ fi
+
+ local EPYTEST_DESELECT=(
+ # TODO: timeouts
+ test/contrib/test_pyopenssl.py::TestSocketClosing::test_timeout_errors_cause_retries
+ test/with_dummyserver/test_socketlevel.py::TestSocketClosing::test_timeout_errors_cause_retries
+ )
+
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ local EPYTEST_XDIST=1
+ epytest -p timeout -p rerunfailures --reruns=10 --reruns-delay=2
+}