Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/testfixtures/files/, dev-python/testfixtures/
Date: Thu, 31 Mar 2022 14:08:32
Message-Id: 1648735545.606434ea25ad672da0122711f76e42d620236c85.mgorny@gentoo
1 commit: 606434ea25ad672da0122711f76e42d620236c85
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 31 14:05:45 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 31 14:05:45 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=606434ea
7
8 dev-python/testfixtures: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/testfixtures/Manifest | 2 -
13 .../files/testfixtures-6.18.1-py3.10.patch | 172 ---------------------
14 dev-python/testfixtures/testfixtures-6.18.3.ebuild | 46 ------
15 dev-python/testfixtures/testfixtures-6.18.4.ebuild | 51 ------
16 4 files changed, 271 deletions(-)
17
18 diff --git a/dev-python/testfixtures/Manifest b/dev-python/testfixtures/Manifest
19 index d69d9f63bf71..fb77740e695d 100644
20 --- a/dev-python/testfixtures/Manifest
21 +++ b/dev-python/testfixtures/Manifest
22 @@ -1,3 +1 @@
23 -DIST testfixtures-6.18.3.tar.gz 122142 BLAKE2B 014cc2245d5fbe0d39310c8e2c21cd5f289d6ec7a6a561d055e86d4cd25b79f1aa535067746219e2382df2aeec050dfa24cdae674636d92ee61016fa9861e705 SHA512 e556e7cb28f122526ef19550b1e593b61f01923d0be53951344f917f89b3d4cae29e525ceda3d0290bc18c3641b509dd7236e7b55ae50da0157fe11ca9f04cca
24 -DIST testfixtures-6.18.4.tar.gz 124910 BLAKE2B 8c19672903d3b6ba5139b95f1d060c0d71ae8891e8c190a8891fded6d79af3549a91809b73a114f69cf2b0de49740e49a9e38e44981addcd09d7b4c343ea3ced SHA512 2643ddfd7c4be7b514070e2df8e52479ad51f50a8b69507faf36d90bd92aa0201f1c3033eb00e644bac194601b0a9190c02727f18d899629ab09abfa3546ecd7
25 DIST testfixtures-6.18.5.tar.gz 124944 BLAKE2B 6f1431b3e7201a3c12bf683cfcb123329b186f42a64fdfe3ee7897ab0c5e9ba3995deb88934ae59f0d35b64710ac04b421d07f1c496429b18a0b6a03e600885d SHA512 4d4ec7295bb056102995dc1c872b86059109b114ab921769d3aa2c2de96a3789fef30558f51826655b6d2d668ea1b1bc9f161a4584aab628f59d4da1fa95940e
26
27 diff --git a/dev-python/testfixtures/files/testfixtures-6.18.1-py3.10.patch b/dev-python/testfixtures/files/testfixtures-6.18.1-py3.10.patch
28 deleted file mode 100644
29 index cd1ecbd8133d..000000000000
30 --- a/dev-python/testfixtures/files/testfixtures-6.18.1-py3.10.patch
31 +++ /dev/null
32 @@ -1,172 +0,0 @@
33 -From 8fb2122eea0f1d0de1ccca7a3a0f5426bc6d4964 Mon Sep 17 00:00:00 2001
34 -From: Louis Sautier <sautier.louis@×××××.com>
35 -Date: Sat, 21 Aug 2021 03:00:51 +0200
36 -Subject: [PATCH] tests: fix with Python 3.10 (changed exception messages)
37 -
38 ----
39 - testfixtures/compat.py | 1 +
40 - testfixtures/tests/test_popen.py | 41 ++++++++++++++++++------------
41 - testfixtures/tests/test_replace.py | 24 ++++++++++-------
42 - 3 files changed, 41 insertions(+), 25 deletions(-)
43 -
44 -diff --git a/testfixtures/compat.py b/testfixtures/compat.py
45 -index 1042d27..ca00f32 100644
46 ---- a/testfixtures/compat.py
47 -+++ b/testfixtures/compat.py
48 -@@ -5,6 +5,7 @@
49 -
50 - PY_36_PLUS = PY_VERSION >= (3, 6)
51 - PY_37_PLUS = PY_VERSION >= (3, 7)
52 -+PY_310_PLUS = PY_VERSION >= (3, 10)
53 -
54 -
55 - if PY_VERSION > (3, 0):
56 -diff --git a/testfixtures/tests/test_popen.py b/testfixtures/tests/test_popen.py
57 -index aa211da..4ec3186 100644
58 ---- a/testfixtures/tests/test_popen.py
59 -+++ b/testfixtures/tests/test_popen.py
60 -@@ -6,7 +6,7 @@
61 - from testfixtures import ShouldRaise, compare, Replacer
62 -
63 - from testfixtures.popen import MockPopen, PopenBehaviour
64 --from testfixtures.compat import BytesLiteral, PY2
65 -+from testfixtures.compat import BytesLiteral, PY2, PY_310_PLUS
66 -
67 - import signal
68 -
69 -@@ -471,10 +471,11 @@ def test_default_command_max_args(self):
70 - ], Popen.mock.method_calls)
71 -
72 - def test_invalid_parameters(self):
73 -+ message = "__init__() got an unexpected keyword argument 'foo'"
74 -+ if PY_310_PLUS:
75 -+ message = "MockPopenInstance." + message
76 - Popen = MockPopen()
77 -- with ShouldRaise(TypeError(
78 -- "__init__() got an unexpected keyword argument 'foo'"
79 -- )):
80 -+ with ShouldRaise(TypeError(message)):
81 - Popen(foo='bar')
82 -
83 - def test_invalid_method_or_attr(self):
84 -@@ -492,39 +493,43 @@ def test_invalid_attribute(self):
85 - process.foo
86 -
87 - def test_invalid_communicate_call(self):
88 -+ message = "communicate() got an unexpected keyword argument 'foo'"
89 -+ if PY_310_PLUS:
90 -+ message = "MockPopenInstance." + message
91 - Popen = MockPopen()
92 - Popen.set_command('bar')
93 - process = Popen('bar')
94 -- with ShouldRaise(TypeError(
95 -- "communicate() got an unexpected keyword argument 'foo'"
96 -- )):
97 -+ with ShouldRaise(TypeError(message)):
98 - process.communicate(foo='bar')
99 -
100 - def test_invalid_wait_call(self):
101 -+ message = "wait() got an unexpected keyword argument 'foo'"
102 -+ if PY_310_PLUS:
103 -+ message = "MockPopenInstance." + message
104 - Popen = MockPopen()
105 - Popen.set_command('bar')
106 - process = Popen('bar')
107 -- with ShouldRaise(TypeError(
108 -- "wait() got an unexpected keyword argument 'foo'"
109 -- )):
110 -+ with ShouldRaise(TypeError(message)):
111 - process.wait(foo='bar')
112 -
113 - def test_invalid_send_signal(self):
114 -+ message = "send_signal() got an unexpected keyword argument 'foo'"
115 -+ if PY_310_PLUS:
116 -+ message = "MockPopenInstance." + message
117 - Popen = MockPopen()
118 - Popen.set_command('bar')
119 - process = Popen('bar')
120 -- with ShouldRaise(TypeError(
121 -- "send_signal() got an unexpected keyword argument 'foo'"
122 -- )):
123 -+ with ShouldRaise(TypeError(message)):
124 - process.send_signal(foo='bar')
125 -
126 - def test_invalid_terminate(self):
127 -+ message = "terminate() got an unexpected keyword argument 'foo'"
128 -+ if PY_310_PLUS:
129 -+ message = "MockPopenInstance." + message
130 - Popen = MockPopen()
131 - Popen.set_command('bar')
132 - process = Popen('bar')
133 -- with ShouldRaise(TypeError(
134 -- "terminate() got an unexpected keyword argument 'foo'"
135 -- )):
136 -+ with ShouldRaise(TypeError(message)):
137 - process.terminate(foo='bar')
138 -
139 - def test_invalid_kill(self):
140 -@@ -535,6 +540,8 @@ def test_invalid_kill(self):
141 - text = 'kill() takes exactly 1 argument (2 given)'
142 - else:
143 - text = 'kill() takes 1 positional argument but 2 were given'
144 -+ if PY_310_PLUS:
145 -+ text = "MockPopenInstance." + text
146 - with ShouldRaise(TypeError(text)):
147 - process.kill('moo')
148 -
149 -@@ -546,6 +553,8 @@ def test_invalid_poll(self):
150 - text = 'poll() takes exactly 1 argument (2 given)'
151 - else:
152 - text = 'poll() takes 1 positional argument but 2 were given'
153 -+ if PY_310_PLUS:
154 -+ text = "MockPopenInstance." + text
155 - with ShouldRaise(TypeError(text)):
156 - process.poll('moo')
157 -
158 -diff --git a/testfixtures/tests/test_replace.py b/testfixtures/tests/test_replace.py
159 -index 5a77e23..d3544a8 100644
160 ---- a/testfixtures/tests/test_replace.py
161 -+++ b/testfixtures/tests/test_replace.py
162 -@@ -13,7 +13,7 @@
163 -
164 - from testfixtures.tests import sample1
165 - from testfixtures.tests import sample2
166 --from ..compat import PY3
167 -+from ..compat import PY3, PY_310_PLUS
168 -
169 - from warnings import catch_warnings
170 -
171 -@@ -259,19 +259,25 @@ def test_something(obj):
172 - self.failIf(hasattr(sample1, 'foo'))
173 -
174 - def test_replace_delattr_cant_remove(self):
175 -+ if PY_310_PLUS:
176 -+ message = "cannot set 'today' attribute of " \
177 -+ "immutable type 'datetime.datetime'"
178 -+ else:
179 -+ message = "can't set attributes of " \
180 -+ "built-in/extension type 'datetime.datetime'"
181 - with Replacer() as r:
182 -- with ShouldRaise(TypeError(
183 -- "can't set attributes of "
184 -- "built-in/extension type 'datetime.datetime'"
185 -- )):
186 -+ with ShouldRaise(TypeError(message)):
187 - r.replace('datetime.datetime.today', not_there)
188 -
189 - def test_replace_delattr_cant_remove_not_strict(self):
190 -+ if PY_310_PLUS:
191 -+ message = "cannot set 'today' attribute of " \
192 -+ "immutable type 'datetime.datetime'"
193 -+ else:
194 -+ message = "can't set attributes of " \
195 -+ "built-in/extension type 'datetime.datetime'"
196 - with Replacer() as r:
197 -- with ShouldRaise(TypeError(
198 -- "can't set attributes of "
199 -- "built-in/extension type 'datetime.datetime'"
200 -- )):
201 -+ with ShouldRaise(TypeError(message)):
202 - r.replace('datetime.datetime.today', not_there, strict=False)
203 -
204 - def test_replace_dict_remove_key(self):
205
206 diff --git a/dev-python/testfixtures/testfixtures-6.18.3.ebuild b/dev-python/testfixtures/testfixtures-6.18.3.ebuild
207 deleted file mode 100644
208 index 46c5fddf9f53..000000000000
209 --- a/dev-python/testfixtures/testfixtures-6.18.3.ebuild
210 +++ /dev/null
211 @@ -1,46 +0,0 @@
212 -# Copyright 1999-2021 Gentoo Authors
213 -# Distributed under the terms of the GNU General Public License v2
214 -
215 -EAPI=8
216 -
217 -PYTHON_COMPAT=( python3_{8..10} )
218 -inherit distutils-r1
219 -
220 -DESCRIPTION="A collection of helpers and mock objects for unit tests and doc tests"
221 -HOMEPAGE="https://pypi.org/project/testfixtures/ https://github.com/Simplistix/testfixtures"
222 -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
223 -
224 -SLOT="0"
225 -LICENSE="MIT"
226 -KEYWORDS="amd64 ~arm arm64 ~riscv x86 ~amd64-linux ~x86-linux"
227 -
228 -BDEPEND="
229 - test? (
230 - $(python_gen_impl_dep sqlite)
231 - dev-python/django[${PYTHON_USEDEP}]
232 - dev-python/pytest-django[${PYTHON_USEDEP}]
233 - dev-python/sybil[${PYTHON_USEDEP}]
234 - >=dev-python/twisted-18[${PYTHON_USEDEP}]
235 - dev-python/zope-component[${PYTHON_USEDEP}]
236 - )"
237 -
238 -distutils_enable_sphinx docs
239 -distutils_enable_tests pytest
240 -
241 -PATCHES=(
242 - # https://github.com/Simplistix/testfixtures/commit/8fb2122eea0f1d0de1ccca7a3a0f5426bc6d4964
243 - "${FILESDIR}/testfixtures-6.18.1-py3.10.patch"
244 -)
245 -
246 -python_prepare_all() {
247 - # kill weird way of declaring build deps
248 - sed -e '/build=/d' -i setup.py || die
249 -
250 - distutils-r1_python_prepare_all
251 -}
252 -
253 -python_test() {
254 - local -x PYTHONPATH="."
255 - local -x DJANGO_SETTINGS_MODULE=testfixtures.tests.test_django.settings
256 - epytest -Wignore::DeprecationWarning
257 -}
258
259 diff --git a/dev-python/testfixtures/testfixtures-6.18.4.ebuild b/dev-python/testfixtures/testfixtures-6.18.4.ebuild
260 deleted file mode 100644
261 index 8755772cbbc7..000000000000
262 --- a/dev-python/testfixtures/testfixtures-6.18.4.ebuild
263 +++ /dev/null
264 @@ -1,51 +0,0 @@
265 -# Copyright 1999-2022 Gentoo Authors
266 -# Distributed under the terms of the GNU General Public License v2
267 -
268 -EAPI=8
269 -
270 -DISTUTILS_USE_PEP517=setuptools
271 -PYTHON_COMPAT=( python3_{8..10} )
272 -
273 -inherit distutils-r1
274 -
275 -DESCRIPTION="A collection of helpers and mock objects for unit tests and doc tests"
276 -HOMEPAGE="https://pypi.org/project/testfixtures/ https://github.com/Simplistix/testfixtures"
277 -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
278 -
279 -SLOT="0"
280 -LICENSE="MIT"
281 -KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86 ~amd64-linux ~x86-linux"
282 -
283 -BDEPEND="
284 - test? (
285 - $(python_gen_impl_dep sqlite)
286 - dev-python/django[${PYTHON_USEDEP}]
287 - dev-python/pytest-django[${PYTHON_USEDEP}]
288 - dev-python/sybil[${PYTHON_USEDEP}]
289 - >=dev-python/twisted-18[${PYTHON_USEDEP}]
290 - dev-python/zope-component[${PYTHON_USEDEP}]
291 - )
292 -"
293 -
294 -distutils_enable_sphinx docs
295 -distutils_enable_tests pytest
296 -
297 -python_prepare_all() {
298 - # kill weird way of declaring build deps
299 - sed -e '/build=/d' -i setup.py || die
300 -
301 - distutils-r1_python_prepare_all
302 -}
303 -
304 -python_test() {
305 - local -x PYTHONPATH="."
306 - local -x DJANGO_SETTINGS_MODULE=testfixtures.tests.test_django.settings
307 -
308 - local EPYTEST_DESELECT=(
309 - # TODO
310 - testfixtures/tests/test_shouldwarn.py::ShouldWarnTests::test_filter_missing
311 - testfixtures/tests/test_shouldwarn.py::ShouldWarnTests::test_filter_present
312 - )
313 -
314 - epytest
315 -}