diff options
author | Michał Górny <mgorny@gentoo.org> | 2024-02-19 16:00:29 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-02-19 16:51:28 +0100 |
commit | c59e353a6f6c9a51927fe63d0d3cb0c3d70d5e87 (patch) | |
tree | 001d9521819b02490bb3c3758e2f4ecd3717c8b9 | |
parent | dev-python/hypothesis: Bump to 6.98.8 (diff) | |
download | gentoo-c59e353a6f6c9a51927fe63d0d3cb0c3d70d5e87.tar.gz gentoo-c59e353a6f6c9a51927fe63d0d3cb0c3d70d5e87.tar.bz2 gentoo-c59e353a6f6c9a51927fe63d0d3cb0c3d70d5e87.zip |
dev-python/urllib3: Bump to 2.2.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r-- | dev-python/urllib3/Manifest | 1 | ||||
-rw-r--r-- | dev-python/urllib3/urllib3-2.2.1.ebuild | 92 |
2 files changed, 93 insertions, 0 deletions
diff --git a/dev-python/urllib3/Manifest b/dev-python/urllib3/Manifest index 47e287b8e799..a78b43d34152 100644 --- a/dev-python/urllib3/Manifest +++ b/dev-python/urllib3/Manifest @@ -3,3 +3,4 @@ DIST urllib3-1.26.18.tar.gz 305687 BLAKE2B f2f673761a8d80eee715a8726ba36ab6b0980 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 +DIST urllib3-2.2.1.tar.gz 291020 BLAKE2B 4bd6e26e1adfba99856db082d0bd3ea136a2367fa53c2d0c7990f6325e8145b2d080a8d59705c43acd97b26be65a309f83d1906d85bd72bfb479b7404972b042 SHA512 dfadba099db678ee1567ee95aa11a72fcea0a76df094d04dd4bd7ed5df4ea2fda6917cc122a1e2bfa4f5303916f93a7e1c881fbbf3cbb9415a25bd7eca1b14b3 diff --git a/dev-python/urllib3/urllib3-2.2.1.ebuild b/dev-python/urllib3/urllib3-2.2.1.ebuild new file mode 100644 index 000000000000..eb55415eb52a --- /dev/null +++ b/dev-python/urllib3/urllib3-2.2.1.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 ~hppa ~loong ~riscv" +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 +} |