dev-python/urllib3: Bump to 2.8.0

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2026-09-16 05:01:21 +02:00
parent d013a0c0d0
commit af7d75ea87
2 changed files with 120 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
DIST hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.gh.tar.gz 156216 BLAKE2B fcb5f49653401e6e4079e1c770d3cd407602d4d6764437b735bd4ec04191dec59cdc930822fa2aff726ee25cddd0f71fd457dedf31026bff1da121d93af8b768 SHA512 62d6787d88a2e716f0ac04fc49f6cdc586e473a660ee754ff66961922ae78bcc75d1f78b091e78557dd60f006e8e480114738c7b4ff71beac804e4fc9603240b
DIST urllib3-2.7.0.tar.gz 433602 BLAKE2B 2a74917dbcca8a30cd0e202c6c4d1b2cb096b6466b4c7c4d7a11d74205f971cea41aac5628ea8d69cfd99f1a0ac1aff4221119cddcf53449e8271bc4d50e6abf SHA512 6f75e5873f18301de37c0d7f17c726b21c9928f2fe9ec58d843f1172b80be6eb05117bdf7af27dd7eb1ab0175a94e0f49cde01d8d8919f61de8710e163fabc03
DIST urllib3-2.7.0.tar.gz.provenance 9499 BLAKE2B 86eb7207644c7f94a76f8818927d4e2301648c4bde0acc029f95ddf40ae3b777ad6149ca8fbfa51de26493c6c3987d99ddfb90df101c4e5eb1d3c85ddf101134 SHA512 25447cda48b206b5a351c9295771111bc0e61d53fb878a3735ac1d7c6a333df863b396b215a9bbc3a7821b368738aa3f5bbac7dbc67e617c354ff977e3432743
DIST urllib3-2.8.0.tar.gz 458972 BLAKE2B 10ff4ea8f934c19159b5a10d2c2af954d93114c636eb2c052970d6a9a7787b8e99dc49f1bdbb42d31458c9c7f37a22a0b206a34a14dfe0aa72d272f37905c7ea SHA512 3104f0b89b9d7421b0b13ff34c9e68a315772f2e1271c8b02da516b7dc4108676e632145ab9b390c3d9033019253f36a48ca44c5b89269058eebb0d21f472383
DIST urllib3-2.8.0.tar.gz.provenance 9611 BLAKE2B bbb95ca460058ed0993b895a8a76ca00cea828abc0ad16d163d6a0a0014aa7e69d0daabbb3a7f7dd82e6dbad0ea21ea3e6743e21549ed265b49b53e534034db7 SHA512 3c290a3a51161e10f3ab5d8c02875c68adc0c04eed4f12b121b5b3637646fac311e10910ddb7cd51130fbcad7fed0b269aa2b4e8c8d886936fb846011d1aaa85

View File

@@ -0,0 +1,118 @@
# Copyright 1999-2026 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
PYPI_VERIFY_REPO=https://github.com/urllib3/urllib3
PYTHON_TESTED=( python3_{12..15} )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_{14..15}t )
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-1.2.0.0[${PYTHON_USEDEP}] )
http2? (
<dev-python/h2-5[${PYTHON_USEDEP}]
>=dev-python/h2-4[${PYTHON_USEDEP}]
)
zstd? (
$(python_gen_cond_dep '
>=dev-python/backports-zstd-1.0.0[${PYTHON_USEDEP}]
' 3.{11..13})
)
"
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}]
" "${PYTHON_TESTED[@]}")
$(python_gen_cond_dep '
>=dev-python/backports-zstd-1.0.0[${PYTHON_USEDEP}]
' 3.{12..13})
)
"
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
# remove stupid warning checks
sed -e '/str(wm)/d' \
-e '/assert not warn\.called/d' \
-i test/with_dummyserver/test_https.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
# more random warning failures
test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_{2,3}::test_ssl_correct_system_time
test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_{2,3}::test_ssl_wrong_system_time
# some plugin?
test/test_connection.py::TestConnection::test_HTTPSConnection_default_socket_options
)
local EPYTEST_PLUGINS=( pytest-timeout )
local EPYTEST_RERUNS=10
local EPYTEST_XDIST=1
epytest --reruns-delay=2
}