diff options
author | Michał Górny <mgorny@gentoo.org> | 2021-05-05 12:29:26 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2021-05-05 14:18:56 +0200 |
commit | b9cf679e65d9ada1bcd974fe31cb535606f9956d (patch) | |
tree | fdde05c0021bc6412c7b676f08efa6c1bc706c80 /dev-python/requests | |
parent | profiles: Remove stale python2-related masks (diff) | |
download | gentoo-b9cf679e65d9ada1bcd974fe31cb535606f9956d.tar.gz gentoo-b9cf679e65d9ada1bcd974fe31cb535606f9956d.tar.bz2 gentoo-b9cf679e65d9ada1bcd974fe31cb535606f9956d.zip |
dev-python/requests: Allow idna-3
Closes: https://bugs.gentoo.org/787584
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/requests')
-rw-r--r-- | dev-python/requests/requests-2.25.1-r2.ebuild (renamed from dev-python/requests/requests-2.25.1-r1.ebuild) | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/dev-python/requests/requests-2.25.1-r1.ebuild b/dev-python/requests/requests-2.25.1-r2.ebuild index 0ade640f1331..d628a9ac03ed 100644 --- a/dev-python/requests/requests-2.25.1-r1.ebuild +++ b/dev-python/requests/requests-2.25.1-r2.ebuild @@ -22,7 +22,7 @@ RDEPEND=" >=dev-python/chardet-3.0.2[${PYTHON_USEDEP}] <dev-python/chardet-5[${PYTHON_USEDEP}] >=dev-python/idna-2.5[${PYTHON_USEDEP}] - <dev-python/idna-3[${PYTHON_USEDEP}] + <dev-python/idna-4[${PYTHON_USEDEP}] <dev-python/urllib3-1.27[${PYTHON_USEDEP}] socks5? ( >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}] ) " @@ -38,16 +38,23 @@ BDEPEND=" distutils_enable_tests pytest src_prepare() { + # allow idna-3 + sed -i -e '/idna/s:<3:<4:' setup.py || die + distutils-r1_src_prepare +} + +python_test() { + local deselect=( + # Internet + requests/__init__.py::requests + requests/api.py::requests.api.request + requests/models.py::requests.models.PreparedRequest + requests/sessions.py::requests.sessions.Session + tests/test_requests.py::TestRequests::test_https_warnings + tests/test_requests.py::TestTimeout::test_connect_timeout + tests/test_requests.py::TestTimeout::test_total_timeout_connect + ) - # strip tests that require some kind of network - sed -e 's:test_connect_timeout:_&:' \ - -e 's:test_total_timeout_connect:_&:' \ - -i tests/test_requests.py || die - # probably pyopenssl version dependent - sed -e 's:test_https_warnings:_&:' \ - -i tests/test_requests.py || die - # doctests rely on networking - sed -e 's:--doctest-modules::' \ - -i pytest.ini || die + epytest ${deselect[@]/#/--deselect } } |