commit: 0b055a72a338d52837717b2e7baee7cba3b77ac4
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 18 17:23:02 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun 18 18:00:58 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b055a72
dev-python/urllib3: Bump to 2.5.0
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/urllib3/Manifest | 1 +
dev-python/urllib3/urllib3-2.5.0.ebuild | 99 +++++++++++++++++++++++++++++++++
2 files changed, 100 insertions(+)
diff --git a/dev-python/urllib3/Manifest b/dev-python/urllib3/Manifest
index c97f35e12775..ae13fe1ff61b 100644
--- a/dev-python/urllib3/Manifest
+++ b/dev-python/urllib3/Manifest
@@ -1,2 +1,3 @@
DIST hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.gh.tar.gz 156216
BLAKE2B
fcb5f49653401e6e4079e1c770d3cd407602d4d6764437b735bd4ec04191dec59cdc930822fa2aff726ee25cddd0f71fd457dedf31026bff1da121d93af8b768
SHA512
62d6787d88a2e716f0ac04fc49f6cdc586e473a660ee754ff66961922ae78bcc75d1f78b091e78557dd60f006e8e480114738c7b4ff71beac804e4fc9603240b
DIST urllib3-2.4.0.tar.gz 390672 BLAKE2B
2c5aa1f5fb210d13cd26b022a4c81b9d1dbe8a8bac26dadcf2b3c1a515df5fc2376b26aedd07badbcd36241920a1de2889c4190f02ceeafdae4732aa83055321
SHA512
d5c5ffc6ace356769f0fa80279ce1f07f3fe5913942acadac93d965612a9225bc3da94f711184ecd5b76bf893a29c7c854903c2c4e4de84edc490e6d72a80693
+DIST urllib3-2.5.0.tar.gz 393185 BLAKE2B
3885be1dae81cb63cfd0c52242b8ff342e4fb398816f94b556e929af0328f4063d705f15201005f4247b278420794984277999751170e124c23ac99c6dc881d4
SHA512
f417a2745bc9750da23916690937e5c0dfe0534354f2c1c9f056baf16554a831a28937acca2b1f23941d5b6e87a372f2e074508eaf2c3304fd1014b8afc3295e
diff --git a/dev-python/urllib3/urllib3-2.5.0.ebuild
b/dev-python/urllib3/urllib3-2.5.0.ebuild
new file mode 100644
index 000000000000..bb27fdaec9c2
--- /dev/null
+++ b/dev-python/urllib3/urllib3-2.5.0.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2025 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_{11..14} pypy3_11 )
+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="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64
~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
+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="
+ dev-python/hatch-vcs[${PYTHON_USEDEP}]
+ 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
+ # TODO
+
test/contrib/test_pyopenssl.py::TestSocketClosing::test_socket_shutdown_stops_recv
+
test/with_dummyserver/test_socketlevel.py::TestSocketClosing::test_socket_shutdown_stops_recv
+ # hangs randomly
+
test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_{2,3}::test_http2_probe_blocked_per_thread
+
test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_{2,3}::test_http2_probe_blocked_per_thread
+ )
+
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ local EPYTEST_XDIST=1
+ epytest -p timeout -p rerunfailures --reruns=10 --reruns-delay=2
+}