diff options
Diffstat (limited to 'dev-python/requests-toolbelt')
6 files changed, 0 insertions, 311 deletions
diff --git a/dev-python/requests-toolbelt/Manifest b/dev-python/requests-toolbelt/Manifest index e1e4dbe03203..2de693e326a3 100644 --- a/dev-python/requests-toolbelt/Manifest +++ b/dev-python/requests-toolbelt/Manifest @@ -1,10 +1,3 @@ -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.patch 5781 BLAKE2B ff7339a1daf0ba2df49914847000f0b8b5ff2d097a59bcb02bcb2b20a885f18223a1da1f44a99d846dcff423239108411c193da5092bbb27fdf50bf211dd59f7 SHA512 86919154164274efe8bceb42eb9fc17524d4e144a541e82bc10692da66e533220cdc7186362d77fd4f3acdc639744cdf5273c2e4e2091eb4d33c1fdc6c631ec5 -DIST requests-toolbelt-0.10.0.tar.gz 211210 BLAKE2B 73196e33d42ff6f4532cd2904537451cc237627a149fa759fca7a66e360c0ddb8baf8c4537c880baf03a25065226380788449bae05434aad37962034e1324acb SHA512 75e3a3e609625254e1f078d3c48c664b3118f5a406c84e59c4e9acdeb20a79b5d38ceaaf9578920063f063aa8385139310c06331499aaa92d3c51146f908f1a1 DIST requests-toolbelt-0.10.1.gh.tar.gz 201504 BLAKE2B 48c5b9f46000d9809e482278626bbce805b93ed2a4a5d074bad4f7fbda75984dd55919eca31909c98c9a74ca7b323e73c90691dced0734964621d4ba5748d464 SHA512 ad6dfe3329c8be5a4521d223d25ec303201e706b34199c084efd0a30b8bc8cfb3382e80a502dc25bd5f7e5b2774a119d2255c49408979aaec45e221f412a7b52 -DIST requests-toolbelt-0.9.1.tar.gz 207286 BLAKE2B 6123677a9abafebddf7dffde2150b2426b5132ebe0c330ff891322ecc3d69232a5b15a0c66e3e1fb4832dc04f5a636a939613fba041e499e9fbca9814f548c7e SHA512 12229928df5df71cb57bc65ef453dc0e4a2bbe190c1579811b2c2823673bd81aeba856b00000fa20b253d0f0fa4fff55ea1e750794ca3785f71c376b1df7fd93 -EBUILD requests-toolbelt-0.10.0.ebuild 1237 BLAKE2B 9b0e5ce0fbecf76dbe13094860c77cb79fcec54fe7ee79ea3e8c42a8396850bee3d1cb1e64d15596221e79fc3ffbafe92e445c6ae0a6abc86c257463d1916a18 SHA512 22b05a4b17fde32b56a4c4b43bdc655e3a7b31c3f8f765c3575cbd00cde45831c8b1ef4314113e374ac094110ec77acf4d753e87d10220617b0123ec12c29052 EBUILD requests-toolbelt-0.10.1.ebuild 1296 BLAKE2B 23469d02d25136cec8cb3a96be71643230626a36d614102570e29613323c1101c382fb71e7d254f036d1e28a6b86b46e4f1618a50e0dacccfb01106cda3c84f5 SHA512 3004fa2f358512b874722a7e2e00fd176da8b6f57bb09e6865b7d21328eddd558659a5ca5c8edba9010de57b87ec1968160e0146c7e267797107fe900dcc51e8 -EBUILD requests-toolbelt-0.9.1-r1.ebuild 1441 BLAKE2B ed064f4ee21e74de5a5474fd741e6fd047d4def4f1ce3c887dfb643d965a18105c4914395d9156353218b5a9e160dbe3ad6e84f7896f64ff8ffa4cd059a7cd7b SHA512 567bb53929f4e20ee443f882510f6c53a635e648206120a15da32c345fac935bb39eb8acc36fe6ddcd9f2f78f601458e14d3b6aead926e7be293dccca63bcc3f MISC metadata.xml 423 BLAKE2B 71af8f087b4bf8d805a70aed1dcb46128b0252f68a1e892530c5393bc6666c8d203e147558214935803a34b5be32bc90f6bb3fa103af4406c0fe6d974acbd739 SHA512 1c875ab992aa1d463fdd52468597f5bebb7aff54c6d665660d2b4df1d41b78e78575be4629b11eef10b783ef1dd4b048b86742ce20eb4584558bc8d87b17988f diff --git a/dev-python/requests-toolbelt/files/requests-toolbelt-0.8.0-test-tracebacks.patch b/dev-python/requests-toolbelt/files/requests-toolbelt-0.8.0-test-tracebacks.patch deleted file mode 100644 index 418039bc7f94..000000000000 --- a/dev-python/requests-toolbelt/files/requests-toolbelt-0.8.0-test-tracebacks.patch +++ /dev/null @@ -1,36 +0,0 @@ -From e130ad521d3b5a14cd9494213e6ca9f52d0d9a2e Mon Sep 17 00:00:00 2001 -From: Brian Dolbec <brian.dolbec@sony.com> -Date: Wed, 7 Mar 2018 21:52:25 +0000 -Subject: [PATCH] threaded/thread.py: Fix unhandled Nonetype job queue - -Adding this check and return prevents numerous test tracebacks: - -Exception in thread 12f554d5-f61f-44d9-bc69-023714627952: -Traceback (most recent call last): - File "/usr/lib64/python3.4/threading.py", line 911, in _bootstrap_inner - self.run() - File "/usr/lib64/python3.4/threading.py", line 859, in run - self._target(*self._args, **self._kwargs) - File "/home/bdolbec/git/toolbelt/requests_toolbelt/threaded/thread.py", line 43, in _make_request - kwargs = self._jobs.get_nowait() -AttributeError: 'NoneType' object has no attribute 'get_nowait' - -Signed-off-by: Brian Dolbec <brian.dolbec@sony.com> -Signed-off-by: Brian Dolbec <dolsen@gentoo.org> ---- - requests_toolbelt/threaded/thread.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/requests_toolbelt/threaded/thread.py b/requests_toolbelt/threaded/thread.py -index 542813c..f33b759 100644 ---- a/requests_toolbelt/threaded/thread.py -+++ b/requests_toolbelt/threaded/thread.py -@@ -36,6 +36,8 @@ def _handle_request(self, kwargs): - self._jobs.task_done() - - def _make_request(self): -+ if self._jobs is None: -+ return - while True: - try: - kwargs = self._jobs.get_nowait() diff --git a/dev-python/requests-toolbelt/files/requests-toolbelt-0.9.1-py310.patch b/dev-python/requests-toolbelt/files/requests-toolbelt-0.9.1-py310.patch deleted file mode 100644 index 182e413158cd..000000000000 --- a/dev-python/requests-toolbelt/files/requests-toolbelt-0.9.1-py310.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 7188b06330e5260be20bce8cbcf0d5ae44e34eaf Mon Sep 17 00:00:00 2001 -From: Jon Dufresne <jon.dufresne@gmail.com> -Date: Fri, 1 Feb 2019 16:30:01 -0800 -Subject: [PATCH] Fix collections.abc deprecation warning in downloadutils - -Warning appears as: - -tests/test_downloadutils.py::test_stream_response_to_specific_filename - requests_toolbelt/downloadutils/stream.py:161: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working - if path and isinstance(getattr(path, 'write', None), collections.Callable): ---- - requests_toolbelt/downloadutils/stream.py | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/requests_toolbelt/downloadutils/stream.py b/requests_toolbelt/downloadutils/stream.py -index eed60a7..1d1c31b 100644 ---- a/requests_toolbelt/downloadutils/stream.py -+++ b/requests_toolbelt/downloadutils/stream.py -@@ -1,6 +1,5 @@ - # -*- coding: utf-8 -*- - """Utilities for dealing with streamed requests.""" --import collections - import os.path - import re - -@@ -158,7 +157,7 @@ def stream_response_to_file(response, path=None, chunksize=_DEFAULT_CHUNKSIZE): - pre_opened = False - fd = None - filename = None -- if path and isinstance(getattr(path, 'write', None), collections.Callable): -+ if path and callable(getattr(path, 'write', None)): - pre_opened = True - fd = path - filename = getattr(fd, 'name', None) --- -2.31.1 - diff --git a/dev-python/requests-toolbelt/files/requests-toolbelt-0.9.1-tests.patch b/dev-python/requests-toolbelt/files/requests-toolbelt-0.9.1-tests.patch deleted file mode 100644 index a2a8929b08d4..000000000000 --- a/dev-python/requests-toolbelt/files/requests-toolbelt-0.9.1-tests.patch +++ /dev/null @@ -1,128 +0,0 @@ -From c4f918572751151eb3bfc7dfa94580b3e2867a9e Mon Sep 17 00:00:00 2001 -From: Jon Dufresne <jon.dufresne@gmail.com> -Date: Sun, 3 Feb 2019 09:02:24 -0800 -Subject: [PATCH] Fix unhandled exceptions from threads during tests - -A queue.Queue() object was not always passed to SessionThread. In this -case, SessionThread._make_request() would raise an exception trying to -call methods on the expected object. Now, always pass a usable object to -SessionThread. - -Previously appeared as: - - Traceback (most recent call last): - File "/usr/lib64/python3.7/threading.py", line 917, in _bootstrap_inner - self.run() - File "/usr/lib64/python3.7/threading.py", line 865, in run - self._target(*self._args, **self._kwargs) - File "toolbelt/requests_toolbelt/threaded/thread.py", line 41, in _make_request - kwargs = self._jobs.get_nowait() - AttributeError: 'NoneType' object has no attribute 'get_nowait' - - Exception in thread cd08fad6-d21d-41b0-921e-737a149b12be: - Traceback (most recent call last): - File "/usr/lib64/python3.7/threading.py", line 917, in _bootstrap_inner - self.run() - File "/usr/lib64/python3.7/threading.py", line 865, in run - self._target(*self._args, **self._kwargs) - File "toolbelt/requests_toolbelt/threaded/thread.py", line 41, in _make_request - kwargs = self._jobs.get_nowait() - AttributeError: 'NoneType' object has no attribute 'get_nowait' - - Exception in thread 4fb72f0d-ba1c-4a78-97a2-4a7283ea01fe: - Traceback (most recent call last): - File "/usr/lib64/python3.7/threading.py", line 917, in _bootstrap_inner - self.run() - File "/usr/lib64/python3.7/threading.py", line 865, in run - self._target(*self._args, **self._kwargs) - File "toolbelt/requests_toolbelt/threaded/thread.py", line 41, in _make_request - kwargs = self._jobs.get_nowait() - AttributeError: 'NoneType' object has no attribute 'get_nowait' - - Exception in thread 5f3711af-0c01-4821-9e25-8074bbbf769b: - Traceback (most recent call last): - File "/usr/lib64/python3.7/threading.py", line 917, in _bootstrap_inner - self.run() - File "/usr/lib64/python3.7/threading.py", line 865, in run - self._target(*self._args, **self._kwargs) - File "toolbelt/requests_toolbelt/threaded/thread.py", line 41, in _make_request - kwargs = self._jobs.get_nowait() - AttributeError: 'NoneType' object has no attribute 'get_nowait' ---- - tests/threaded/test_pool.py | 15 ++++++++++----- - tests/threaded/test_thread.py | 5 ++++- - 2 files changed, 14 insertions(+), 6 deletions(-) - -diff --git a/tests/threaded/test_pool.py b/tests/threaded/test_pool.py -index b0653bb..b949dd8 100644 ---- a/tests/threaded/test_pool.py -+++ b/tests/threaded/test_pool.py -@@ -26,32 +26,37 @@ def test_requires_positive_number_of_processes(self): - - def test_number_of_processes_can_be_arbitrary(self): - """Show that the number of processes can be set.""" -- p = pool.Pool(None, num_processes=100) -+ job_queue = queue.Queue() -+ p = pool.Pool(job_queue, num_processes=100) - assert p._processes == 100 - assert len(p._pool) == 100 - -- p = pool.Pool(None, num_processes=1) -+ job_queue = queue.Queue() -+ p = pool.Pool(job_queue, num_processes=1) - assert p._processes == 1 - assert len(p._pool) == 1 - - def test_initializer_is_called(self): - """Ensure that the initializer function is called.""" -+ job_queue = queue.Queue() - initializer = mock.MagicMock() -- pool.Pool(None, num_processes=1, initializer=initializer) -+ pool.Pool(job_queue, num_processes=1, initializer=initializer) - assert initializer.called is True - initializer.assert_called_once_with(mock.ANY) - - def test_auth_generator_is_called(self): - """Ensure that the auth_generator function is called.""" -+ job_queue = queue.Queue() - auth_generator = mock.MagicMock() -- pool.Pool(None, num_processes=1, auth_generator=auth_generator) -+ pool.Pool(job_queue, num_processes=1, auth_generator=auth_generator) - assert auth_generator.called is True - auth_generator.assert_called_once_with(mock.ANY) - - def test_session_is_called(self): - """Ensure that the session function is called.""" -+ job_queue = queue.Queue() - session = mock.MagicMock() -- pool.Pool(None, num_processes=1, session=session) -+ pool.Pool(job_queue, num_processes=1, session=session) - assert session.called is True - session.assert_called_once_with() - -diff --git a/tests/threaded/test_thread.py b/tests/threaded/test_thread.py -index bb92f7f..fd7e96b 100644 ---- a/tests/threaded/test_thread.py -+++ b/tests/threaded/test_thread.py -@@ -19,6 +19,8 @@ def _make_mocks(): - - def _initialize_a_session_thread(session=None, job_queue=None, - response_queue=None, exception_queue=None): -+ if job_queue is None: -+ job_queue = queue.Queue() - with mock.patch.object(threading, 'Thread') as Thread: - thread_instance = mock.MagicMock() - Thread.return_value = thread_instance -@@ -52,10 +54,11 @@ def test_thread_initialization(self): - - def test_is_alive_proxies_to_worker(self): - """Test that we proxy the is_alive method to the Thread.""" -+ job_queue = queue.Queue() - with mock.patch.object(threading, 'Thread') as Thread: - thread_instance = mock.MagicMock() - Thread.return_value = thread_instance -- st = thread.SessionThread(None, None, None, None) -+ st = thread.SessionThread(None, job_queue, None, None) - - st.is_alive() - thread_instance.is_alive.assert_called_once_with() diff --git a/dev-python/requests-toolbelt/requests-toolbelt-0.10.0.ebuild b/dev-python/requests-toolbelt/requests-toolbelt-0.10.0.ebuild deleted file mode 100644 index cffab8d53c1e..000000000000 --- a/dev-python/requests-toolbelt/requests-toolbelt-0.10.0.ebuild +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{8..11} pypy3 ) - -inherit distutils-r1 - -DESCRIPTION="A utility belt for advanced users of python-requests" -HOMEPAGE=" - https://toolbelt.readthedocs.io/ - https://github.com/requests/toolbelt/ - https://pypi.org/project/requests-toolbelt/ -" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" - -RDEPEND=" - <dev-python/requests-3.0.0[${PYTHON_USEDEP}] -" -BDEPEND=" - test? ( - dev-python/betamax[${PYTHON_USEDEP}] - ) -" - -DOCS=( AUTHORS.rst HISTORY.rst README.rst ) - -distutils_enable_tests pytest - -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 -) - -EPYTEST_IGNORE=( - # certs have expired - # (if you ever fix this, look into git history for proper - # cryptography/pyopenssl logic) - tests/test_x509_adapter.py -) diff --git a/dev-python/requests-toolbelt/requests-toolbelt-0.9.1-r1.ebuild b/dev-python/requests-toolbelt/requests-toolbelt-0.9.1-r1.ebuild deleted file mode 100644 index a5fc91d08018..000000000000 --- a/dev-python/requests-toolbelt/requests-toolbelt-0.9.1-r1.ebuild +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{8..11} pypy3 ) - -inherit distutils-r1 - -DESCRIPTION="A utility belt for advanced users of python-requests" -HOMEPAGE=" - https://toolbelt.readthedocs.io/ - https://github.com/requests/toolbelt/ - https://pypi.org/project/requests-toolbelt/ -" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos" - -RDEPEND=" - <dev-python/requests-3.0.0[${PYTHON_USEDEP}] -" -BDEPEND=" - test? ( - dev-python/betamax[${PYTHON_USEDEP}] - dev-python/mock[${PYTHON_USEDEP}] - ) -" - -DOCS=( AUTHORS.rst HISTORY.rst README.rst ) - -PATCHES=( - "${FILESDIR}/requests-toolbelt-0.8.0-test-tracebacks.patch" - "${FILESDIR}/requests-toolbelt-0.9.1-tests.patch" - "${FILESDIR}/requests-toolbelt-0.9.1-py310.patch" -) - -distutils_enable_tests pytest - -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 -) - -EPYTEST_IGNORE=( - # certs have expired - # (if you ever fix this, look into git history for proper - # cryptography/pyopenssl logic) - tests/test_x509_adapter.py -) |