* [gentoo-commits] repo/gentoo:master commit in: dev-python/requests-toolbelt/, dev-python/requests-toolbelt/files/
@ 2018-03-13 23:56 Brian Dolbec
0 siblings, 0 replies; 4+ messages in thread
From: Brian Dolbec @ 2018-03-13 23:56 UTC (permalink / raw
To: gentoo-commits
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 5299 bytes --]
commit: 63ba660178a17d1ded6e84039f7615dee81ed10f
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 7 23:15:27 2018 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Mar 13 23:56:33 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63ba6601
dev-python/requests-toolbelt: Version bump
Restrict tests due to known python2.7 test failures.
Upstream not testing against newer requests versions.
bug: https://bugs.gentoo.org/635824
Upstream patch submitted: https://github.com/requests/toolbelt/pull/212
Upstream bug: https://github.com/requests/toolbelt/issues/213
Package-Manager: Portage-2.3.13, Repoman-2.3.3
dev-python/requests-toolbelt/Manifest | 1 +
.../requests-toolbelt-0.8.0-test-tracebacks.patch | 25 ++++++++++++++++++++++
.../requests-toolbelt-0.7.1.ebuild | 3 ++-
...0.7.1.ebuild => requests-toolbelt-0.8.0.ebuild} | 13 +++++++++--
4 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/dev-python/requests-toolbelt/Manifest b/dev-python/requests-toolbelt/Manifest
index c33f3d97bb5..38e0d6c28e4 100644
--- a/dev-python/requests-toolbelt/Manifest
+++ b/dev-python/requests-toolbelt/Manifest
@@ -1,3 +1,4 @@
DIST requests-toolbelt-0.5.1.tar.gz 187981 BLAKE2B 1e3cfafd8e0b8625dc92ff40bf88d9cf67d40a679eef8c6825de032d51107d2486aed34611818a3b97c286ea9e452ad3b196a8ba7a4b7f57a9377366991d33a3 SHA512 fff70b7262efae616fe9fe8e25af9856d42ccecdaca71cfde0dd81c5d7c509aec30f7c99f4b886d844c168937197ed8287e873fffe6073e93e48412b5a902997
DIST requests-toolbelt-0.7.0.tar.gz 194062 BLAKE2B ea7120e58ea23dbe1d17bc2f8c346ec00bd00d62a4c8fdefa1490b9b3ed62a0dcf45ce60b071fcbc7e510d943ec4f10a7031525bd24f5fb02749125cbccc9f0b SHA512 77f11d12643d7cacf0c5dab5c5490359fc6f11c038d56d6ae27939394c5788622edb230d38d2202192eec6a7b1229feeb5669cd6a33c78f6891699d017e8205e
DIST requests-toolbelt-0.7.1.tar.gz 194670 BLAKE2B 3f8b5950d3a87f519f40e2d21bce13ba2d3ed205b5d7f4fa0872339df391e5477f262b104697b264a75783d686eb44231ff2943bfe56f13695d63869227c48c5 SHA512 2559db13054c4d9b7c459603809a16d8d9a9c1a348369e1bc68e557bae10c41291286112e3b4a71e83b42203d40fa5cbc8441028693eeb986162d212a65f68ac
+DIST requests-toolbelt-0.8.0.tar.gz 196129 BLAKE2B 435059ff2879c44a274641c49adae9986c761fcabe567826454d3f055db7e3e5c95905f1d178dcb37e2173bf856a9fb168a856c1301026e8c5d0de6cafb4be51 SHA512 71a4ed8961b742cb1b5b0deec7f9052a2a177d2ed6e4f13ebe22b56b7f1b6b1bad2736f1640c8b41398b082eddc1c1205f0c446602d979d5bf370fb0e10ecc88
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
new file mode 100644
index 00000000000..ddc7b3b05a2
--- /dev/null
+++ b/dev-python/requests-toolbelt/files/requests-toolbelt-0.8.0-test-tracebacks.patch
@@ -0,0 +1,25 @@
+From 7af2e4ce4192dfab6bd8315ad31b5b689386a0d3 Mon Sep 17 00:00:00 2001
+From: <@Ö\x04>
+Date: Wed, 7 Mar 2018 21:52:25 +0000
+Subject: [PATCH] threaded/tread.py: Fix numerous test failures
+
+---
+ requests_toolbelt/threaded/thread.py | 2 ++
+ 1 file changed, 2 insertions(+), 0 deletions(-)
+
+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 @@ class SessionThread(object):
+ self._jobs.task_done()
+
+ def _make_request(self):
++ if self._jobs is None:
++ return
+ while True:
+ try:
+ kwargs = self._jobs.get_nowait()
+--
+libgit2 0.24.6
+
diff --git a/dev-python/requests-toolbelt/requests-toolbelt-0.7.1.ebuild b/dev-python/requests-toolbelt/requests-toolbelt-0.7.1.ebuild
index a41831f89e1..d4454f5e676 100644
--- a/dev-python/requests-toolbelt/requests-toolbelt-0.7.1.ebuild
+++ b/dev-python/requests-toolbelt/requests-toolbelt-0.7.1.ebuild
@@ -27,5 +27,6 @@ DEPEND="${RDEPEND}
DOCS=( AUTHORS.rst HISTORY.rst README.rst )
python_test() {
- py.test -v || die "Tests fail with ${EPYTHON}"
+ py.test -v || die "Tests failed with ${EPYTHON}"
}
+
diff --git a/dev-python/requests-toolbelt/requests-toolbelt-0.7.1.ebuild b/dev-python/requests-toolbelt/requests-toolbelt-0.8.0.ebuild
similarity index 65%
copy from dev-python/requests-toolbelt/requests-toolbelt-0.7.1.ebuild
copy to dev-python/requests-toolbelt/requests-toolbelt-0.8.0.ebuild
index a41831f89e1..67f4e2b6abf 100644
--- a/dev-python/requests-toolbelt/requests-toolbelt-0.7.1.ebuild
+++ b/dev-python/requests-toolbelt/requests-toolbelt-0.8.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -25,7 +25,16 @@ DEPEND="${RDEPEND}
)"
DOCS=( AUTHORS.rst HISTORY.rst README.rst )
+PATCHES=(
+ "${FILESDIR}/requests-toolbelt-0.8.0-test-tracebacks.patch"
+)
+
+# Known python2.7 test failures do to upstream
+# not testing with newer requests versions
+# bug: https://bugs.gentoo.org/635824
+# https://github.com/requests/toolbelt/issues/213
+RESTRICT=test
python_test() {
- py.test -v || die "Tests fail with ${EPYTHON}"
+ py.test -v || die "Tests failed with ${EPYTHON}"
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/requests-toolbelt/, dev-python/requests-toolbelt/files/
@ 2021-11-27 10:27 Michał Górny
0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2021-11-27 10:27 UTC (permalink / raw
To: gentoo-commits
commit: 7954e810b7a27d3a55dd0b1ce0cb828b0a7b47c3
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 27 10:09:34 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Nov 27 10:27:27 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7954e810
dev-python/requests-toolbelt: Remove stale py2 patch
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../files/requests-toolbelt-0.9.1-tests-py2.patch | 68 ----------------------
.../requests-toolbelt-0.9.1.ebuild | 5 --
2 files changed, 73 deletions(-)
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..ea834e88ccdd 100644
--- a/dev-python/requests-toolbelt/requests-toolbelt-0.9.1.ebuild
+++ b/dev-python/requests-toolbelt/requests-toolbelt-0.9.1.ebuild
@@ -29,11 +29,6 @@ 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"
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/requests-toolbelt/, dev-python/requests-toolbelt/files/
@ 2021-11-27 10:27 Michał Górny
0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2021-11-27 10:27 UTC (permalink / raw
To: gentoo-commits
commit: ee5976955db0aec96005ff4e51ef36c6d612934f
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 27 10:10:17 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Nov 27 10:27:28 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee597695
dev-python/requests-toolbelt: Replace patch with EPYTEST_DESELECT
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../requests-toolbelt-0.9.1-tests-internet.patch | 28 ----------------------
.../requests-toolbelt-0.9.1.ebuild | 14 ++++++++---
2 files changed, 11 insertions(+), 31 deletions(-)
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/requests-toolbelt-0.9.1.ebuild b/dev-python/requests-toolbelt/requests-toolbelt-0.9.1.ebuild
index ea834e88ccdd..145581a7c94d 100644
--- a/dev-python/requests-toolbelt/requests-toolbelt-0.9.1.ebuild
+++ b/dev-python/requests-toolbelt/requests-toolbelt-0.9.1.ebuild
@@ -29,10 +29,18 @@ PATCHES=(
"${FILESDIR}/requests-toolbelt-0.8.0-test-tracebacks.patch"
"${FILESDIR}/requests-toolbelt-0.9.1-tests.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
+ )
+
+ epytest
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/requests-toolbelt/, dev-python/requests-toolbelt/files/
@ 2022-11-09 6:12 Michał Górny
0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2022-11-09 6:12 UTC (permalink / raw
To: gentoo-commits
commit: 6f2fe4e18e6def0d152bc22e55f1c01622d1e7da
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 9 05:49:06 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Nov 9 06:12:40 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f2fe4e1
dev-python/requests-toolbelt: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/requests-toolbelt/Manifest | 2 -
.../requests-toolbelt-0.8.0-test-tracebacks.patch | 36 ------
.../files/requests-toolbelt-0.9.1-py310.patch | 37 ------
.../files/requests-toolbelt-0.9.1-tests.patch | 128 ---------------------
.../requests-toolbelt-0.10.0.ebuild | 48 --------
.../requests-toolbelt-0.9.1-r1.ebuild | 55 ---------
6 files changed, 306 deletions(-)
diff --git a/dev-python/requests-toolbelt/Manifest b/dev-python/requests-toolbelt/Manifest
index 6933d1ead77d..3bed56bb5352 100644
--- a/dev-python/requests-toolbelt/Manifest
+++ b/dev-python/requests-toolbelt/Manifest
@@ -1,3 +1 @@
-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
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
-)
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-09 6:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-27 10:27 [gentoo-commits] repo/gentoo:master commit in: dev-python/requests-toolbelt/, dev-python/requests-toolbelt/files/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2022-11-09 6:12 Michał Górny
2021-11-27 10:27 Michał Górny
2018-03-13 23:56 Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox