diff options
Diffstat (limited to 'dev-python/urllib3')
| -rw-r--r-- | dev-python/urllib3/Manifest | 2 | ||||
| -rw-r--r-- | dev-python/urllib3/urllib3-2.6.0.ebuild | 107 |
2 files changed, 109 insertions, 0 deletions
diff --git a/dev-python/urllib3/Manifest b/dev-python/urllib3/Manifest index c4a31cd9b836..6c1aedaeb0a5 100644 --- a/dev-python/urllib3/Manifest +++ b/dev-python/urllib3/Manifest @@ -1,2 +1,4 @@ DIST hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.gh.tar.gz 156216 BLAKE2B fcb5f49653401e6e4079e1c770d3cd407602d4d6764437b735bd4ec04191dec59cdc930822fa2aff726ee25cddd0f71fd457dedf31026bff1da121d93af8b768 SHA512 62d6787d88a2e716f0ac04fc49f6cdc586e473a660ee754ff66961922ae78bcc75d1f78b091e78557dd60f006e8e480114738c7b4ff71beac804e4fc9603240b DIST urllib3-2.5.0.tar.gz 393185 BLAKE2B 3885be1dae81cb63cfd0c52242b8ff342e4fb398816f94b556e929af0328f4063d705f15201005f4247b278420794984277999751170e124c23ac99c6dc881d4 SHA512 f417a2745bc9750da23916690937e5c0dfe0534354f2c1c9f056baf16554a831a28937acca2b1f23941d5b6e87a372f2e074508eaf2c3304fd1014b8afc3295e +DIST urllib3-2.6.0.tar.gz 432585 BLAKE2B a630f109dd9b191bd0b5fcbfae03c1f492d8396fdc41c9103c15d537472f55d04d5ece2d5af5ee7a381f0560384afcc8c5232320d8d921d01e2d37093ef0ca28 SHA512 b825663ed9e037763c3c8a049f818330ee9cf0d00ba6f3bd368114ed1feb750e0e6613920cde62443aa05aa84752a2cdfa4f7a6f631801031cb2fbf6736675e3 +DIST urllib3-2.6.0.tar.gz.provenance 9060 BLAKE2B 086458bd509d0de661ce4fab4a556884e0eaf77f4df9d34dbefb12865c22282bab24c07410b7fe42417422cc24102cb70c813d4b7a1115a454b3843809751b58 SHA512 a95d98157ad594662f598e06cb6bd326a42e58a48d647bf17c08078fddcd6232d81eb9a93d3369aabe52cd20190a1bbd00106a6f3767223e7378fc9e43c077a2 diff --git a/dev-python/urllib3/urllib3-2.6.0.ebuild b/dev-python/urllib3/urllib3-2.6.0.ebuild new file mode 100644 index 000000000000..27008c9ef75c --- /dev/null +++ b/dev-python/urllib3/urllib3-2.6.0.ebuild @@ -0,0 +1,107 @@ +# 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 +PYPI_VERIFY_REPO=https://github.com/urllib3/urllib3 +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 ~mips ~ppc ~ppc64 ~riscv ~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.{11..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 + 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 EPYTEST_PLUGINS=( pytest-timeout ) + local EPYTEST_RERUNS=10 + local EPYTEST_XDIST=1 + epytest --reruns-delay=2 +} |
