diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-12-05 02:47:11 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-12-05 02:47:11 +0000 |
commit | 2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch) | |
tree | c8af0fd04194aed03cf067d44e53c7edd3e9ab84 /dev-python/requests-toolbelt | |
parent | e9d044d4b9b71200a96adfa280848858c0f468c9 (diff) |
gentoo resync : 05.12.2021
Diffstat (limited to 'dev-python/requests-toolbelt')
4 files changed, 25 insertions, 108 deletions
diff --git a/dev-python/requests-toolbelt/Manifest b/dev-python/requests-toolbelt/Manifest index 961cb4ced2e7..fb2cd777b120 100644 --- a/dev-python/requests-toolbelt/Manifest +++ b/dev-python/requests-toolbelt/Manifest @@ -1,8 +1,6 @@ AUX requests-toolbelt-0.8.0-test-tracebacks.patch 1428 BLAKE2B 6f9645f2a456cde3a080337c00697493958d9bfd424eef9b9998233336ccea06ecea345cd55ff1321939421bbbb5c7ea566de8ed3d5d8133d62083c80f2bc2a6 SHA512 22332dceb704750d1d6ca7d640251dacea764dbbda4e530977f6788e19c1d1a857471d8cd94d99465e146bc96be9c35b67a9608a31997725b6284e7c10117f8f AUX requests-toolbelt-0.9.1-py310.patch 1470 BLAKE2B 864c496f712b9667de991afe7d8db0071b15e6c546fb495c3df5aa25d354bb2873f697d5777f5e6f1a9890289bad192a5c5053d11ab71eb0967762b30c35a977 SHA512 3780eeef7835319d5696f1ac8273c682c4b2a97171b7fed889c1960e3887f1fa6eecf13d4c961a9c2aa9e02e919e885f18bfde8eeabf452e16267ff671d07703 -AUX requests-toolbelt-0.9.1-tests-internet.patch 1225 BLAKE2B 54af195690d8ac475453029f51ff1d6040512dbccee6e24b3d0827e535f7ee1c5fb536abfe66c75dfb31837ffefbf23adeba6ad14c36c56585993b31d9480217 SHA512 3226755d227eeb685eac5fa68ae86fa057d852b682ee3f0607f775bd33230d85afdb7a0c466bb3c5eff5adf256a7895cfd6ad752fefdec95a4684e5cddda0410 -AUX requests-toolbelt-0.9.1-tests-py2.patch 3100 BLAKE2B 39ecfd8f0bbf2a4d0731c485ada404f405413117e7451d36eefbc4f05b0073f86310e66ad4320e8ce648175aa072306acab551a50a4a516470b0beb4b981124a SHA512 540813a2d69c84d37a4a6ec5b98d2b71693ba34bbf661bb44be69c646d164134702e9fadd341d07085205b476239260167c858983978488553a07bdbf205ba24 AUX requests-toolbelt-0.9.1-tests.patch 5781 BLAKE2B ff7339a1daf0ba2df49914847000f0b8b5ff2d097a59bcb02bcb2b20a885f18223a1da1f44a99d846dcff423239108411c193da5092bbb27fdf50bf211dd59f7 SHA512 86919154164274efe8bceb42eb9fc17524d4e144a541e82bc10692da66e533220cdc7186362d77fd4f3acdc639744cdf5273c2e4e2091eb4d33c1fdc6c631ec5 DIST requests-toolbelt-0.9.1.tar.gz 207286 BLAKE2B 6123677a9abafebddf7dffde2150b2426b5132ebe0c330ff891322ecc3d69232a5b15a0c66e3e1fb4832dc04f5a636a939613fba041e499e9fbca9814f548c7e SHA512 12229928df5df71cb57bc65ef453dc0e4a2bbe190c1579811b2c2823673bd81aeba856b00000fa20b253d0f0fa4fff55ea1e750794ca3785f71c376b1df7fd93 -EBUILD requests-toolbelt-0.9.1.ebuild 1239 BLAKE2B 72709945d82f999c0818fb96cf27a5b01cfd6aeb868d7a31e9fe6f26b4e88bd2ae9150da6e9486a792de1e8ead3fd7e4ebfd6c5dcbfb050a480813b9ba5c3937 SHA512 37b8d55cfec583b71e2b31a89214ec753d8b7f0918f28154247317e17009455ebe0a6f5db534390c1aa93b0bfac1320f2fb42d0d8c5e8e6470a0c64f95b2ae86 +EBUILD requests-toolbelt-0.9.1.ebuild 1542 BLAKE2B 145b5aabd17359ee95f8a07494a2bed97cd3b85efa296d47621d449f81ed5ba4d610b822d7ccc8971b95471e853d5b2067f172004d50691fac0c34d08935c3fe SHA512 abf7480f631b3adf7a8b315af24f9d526cd50f104ecf6683b7886edd5de7f204a265dfd3a5266b69e535fc3b4218a60228e10e8bbd30fb73c5abea0b580bb1fc MISC metadata.xml 423 BLAKE2B 71af8f087b4bf8d805a70aed1dcb46128b0252f68a1e892530c5393bc6666c8d203e147558214935803a34b5be32bc90f6bb3fa103af4406c0fe6d974acbd739 SHA512 1c875ab992aa1d463fdd52468597f5bebb7aff54c6d665660d2b4df1d41b78e78575be4629b11eef10b783ef1dd4b048b86742ce20eb4584558bc8d87b17988f diff --git a/dev-python/requests-toolbelt/files/requests-toolbelt-0.9.1-tests-internet.patch b/dev-python/requests-toolbelt/files/requests-toolbelt-0.9.1-tests-internet.patch deleted file mode 100644 index b3dc2603c117..000000000000 --- a/dev-python/requests-toolbelt/files/requests-toolbelt-0.9.1-tests-internet.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/tests/test_multipart_encoder.py b/tests/test_multipart_encoder.py -index 575f54c..73a880e 100644 ---- a/tests/test_multipart_encoder.py -+++ b/tests/test_multipart_encoder.py -@@ -94,6 +94,7 @@ class TestFileFromURLWrapper(unittest.TestCase): - s = requests.Session() - self.recorder = get_betamax(s) - -+ @unittest.skip("test requires internet access") - def test_read_file(self): - url = ('https://stxnext.com/static/img/logo.830ebe551641.svg') - with self.recorder.use_cassette( -@@ -110,6 +111,7 @@ class TestFileFromURLWrapper(unittest.TestCase): - assert chunk == b'ww.w3.org/' - assert self.instance.len == 5147 - -+ @unittest.skip("test requires internet access") - def test_no_content_length_header(self): - url = ( - 'https://api.github.com/repos/sigmavirus24/github3.py/releases/' -@@ -191,6 +193,7 @@ class TestMultipartEncoder(unittest.TestCase): - m = MultipartEncoder([('field', 'foo'), ('file', fd)]) - assert m.read() is not None - -+ @unittest.skip("test requires internet access") - def test_reads_file_from_url_wrapper(self): - s = requests.Session() - recorder = get_betamax(s) diff --git a/dev-python/requests-toolbelt/files/requests-toolbelt-0.9.1-tests-py2.patch b/dev-python/requests-toolbelt/files/requests-toolbelt-0.9.1-tests-py2.patch deleted file mode 100644 index 6825c5f4ed4c..000000000000 --- a/dev-python/requests-toolbelt/files/requests-toolbelt-0.9.1-tests-py2.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/tests/threaded/test_pool.py b/tests/threaded/test_pool.py -index 3e54b3c..9583c7b 100644 ---- a/tests/threaded/test_pool.py -+++ b/tests/threaded/test_pool.py -@@ -5,6 +5,7 @@ except ImportError: - import Queue as queue - import unittest - -+import sys - import mock - import pytest - -@@ -60,6 +61,7 @@ class TestPool(unittest.TestCase): - assert session.called is True - session.assert_called_once_with() - -+ @pytest.mark.skipif(sys.hexversion < 0x3000000, reason="broken on python2") - def test_from_exceptions_populates_a_queue(self): - """Ensure a Queue is properly populated from exceptions.""" - urls = ["https://httpbin.org/get?n={}".format(n) for n in range(5)] -@@ -77,6 +79,7 @@ class TestPool(unittest.TestCase): - for url in urls - ] - -+ @pytest.mark.skipif(sys.hexversion < 0x3000000, reason="broken on python2") - def test_from_urls_constructs_get_requests(self): - """Ensure a Queue is properly populated from an iterable of urls.""" - urls = ["https://httpbin.org/get?n={}".format(n) for n in range(5)] -@@ -92,6 +95,7 @@ class TestPool(unittest.TestCase): - for url in urls - ] - -+ @pytest.mark.skipif(sys.hexversion < 0x3000000, reason="broken on python2") - def test_from_urls_constructs_get_requests_with_kwargs(self): - """Ensure a Queue is properly populated from an iterable of urls.""" - def merge(*args): -@@ -130,6 +134,7 @@ class TestPool(unittest.TestCase): - for st in session_threads: - st.join.assert_called_once_with() - -+ @pytest.mark.skipif(sys.hexversion < 0x3000000, reason="broken on python2") - def test_get_response_returns_thread_response(self): - """Ensure that a ThreadResponse is made when there's data.""" - queues = [] -@@ -149,6 +154,7 @@ class TestPool(unittest.TestCase): - assert isinstance(p.get_response(), pool.ThreadResponse) - assert len([q for q in queues if q.get_nowait.called]) == 1 - -+ @pytest.mark.skipif(sys.hexversion < 0x3000000, reason="broken on python2") - def test_get_exception_returns_thread_exception(self): - """Ensure that a ThreadException is made when there's data.""" - queues = [] -@@ -168,6 +174,7 @@ class TestPool(unittest.TestCase): - assert isinstance(p.get_exception(), pool.ThreadException) - assert len([q for q in queues if q.get_nowait.called]) == 1 - -+ @pytest.mark.skipif(sys.hexversion < 0x3000000, reason="broken on python2") - def test_get_response_returns_none_when_queue_is_empty(self): - """Ensure that None is returned when the response Queue is empty.""" - queues = [] -@@ -187,6 +194,7 @@ class TestPool(unittest.TestCase): - assert p.get_response() is None - assert len([q for q in queues if q.get_nowait.called]) == 1 - -+ @pytest.mark.skipif(sys.hexversion < 0x3000000, reason="broken on python2") - def test_get_exception_returns_none_when_queue_is_empty(self): - """Ensure that None is returned when the exception Queue is empty.""" - queues = [] diff --git a/dev-python/requests-toolbelt/requests-toolbelt-0.9.1.ebuild b/dev-python/requests-toolbelt/requests-toolbelt-0.9.1.ebuild index c3c2c1f2eca4..bc009aa6dafa 100644 --- a/dev-python/requests-toolbelt/requests-toolbelt-0.9.1.ebuild +++ b/dev-python/requests-toolbelt/requests-toolbelt-0.9.1.ebuild @@ -20,7 +20,10 @@ DEPEND="${RDEPEND} test? ( dev-python/betamax[${PYTHON_USEDEP}] dev-python/mock[${PYTHON_USEDEP}] - dev-python/pyopenssl[${PYTHON_USEDEP}] + !alpha? ( !hppa? ( !ia64? ( + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/pyopenssl[${PYTHON_USEDEP}] + ) ) ) )" DOCS=( AUTHORS.rst HISTORY.rst README.rst ) @@ -29,15 +32,27 @@ PATCHES=( "${FILESDIR}/requests-toolbelt-0.8.0-test-tracebacks.patch" "${FILESDIR}/requests-toolbelt-0.9.1-tests.patch" - # disable python2.7 test failures with newer requests versions - # bug: https://bugs.gentoo.org/635824 - # https://github.com/requests/toolbelt/issues/213 - "${FILESDIR}/requests-toolbelt-0.9.1-tests-py2.patch" - - # disable tests that require internet access - "${FILESDIR}/requests-toolbelt-0.9.1-tests-internet.patch" - "${FILESDIR}/requests-toolbelt-0.9.1-py310.patch" ) distutils_enable_tests pytest + +python_test() { + local EPYTEST_DESELECT=( + # Internet + tests/test_multipart_encoder.py::TestFileFromURLWrapper::test_no_content_length_header + tests/test_multipart_encoder.py::TestFileFromURLWrapper::test_read_file + tests/test_multipart_encoder.py::TestMultipartEncoder::test_reads_file_from_url_wrapper + ) + + local EPYTEST_IGNORE=() + if ! has_version "dev-python/cryptography[${PYTHON_USEDEP}]" || + ! has_version "dev-python/pyopenssl[${PYTHON_USEDEP}]" + then + EPYTEST_IGNORE+=( + tests/test_x509_adapter.py + ) + fi + + epytest +} |