1 |
commit: 0b93bfeb038f43e0dc78ac1679d69b1b5b01e439 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 2 19:00:14 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 2 19:05:05 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b93bfeb |
7 |
|
8 |
dev-python/fixtures: Remove old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/fixtures/Manifest | 1 - |
13 |
.../fixtures/files/fixtures-4.0.0-py311.patch | 116 --------------------- |
14 |
.../fixtures/files/fixtures-4.0.0-pypy39.patch | 56 ---------- |
15 |
dev-python/fixtures/fixtures-4.0.0.ebuild | 37 ------- |
16 |
4 files changed, 210 deletions(-) |
17 |
|
18 |
diff --git a/dev-python/fixtures/Manifest b/dev-python/fixtures/Manifest |
19 |
index 57c4aa1aec1b..d4647ca4ae0e 100644 |
20 |
--- a/dev-python/fixtures/Manifest |
21 |
+++ b/dev-python/fixtures/Manifest |
22 |
@@ -1,2 +1 @@ |
23 |
-DIST fixtures-4.0.0.tar.gz 56786 BLAKE2B 7fa8916d3e384a47c967b51ffeebb81c50c4be7432601aa94f220b6ae32ed189f16750cb126c2925995c2e945684c48041014a97902145343527e8856125b61a SHA512 dcd67c3df9efc16f2a21b6d2917a5b7e45ecc09d1ddbd1de98a5b4b717ea7da0fc82e1054f494255b419a792e841145110c77a1772444f4019fc02e9917c5b80 |
24 |
DIST fixtures-4.0.1.tar.gz 56752 BLAKE2B bddda3976ec453129fa05e53da066344ed8f4db9626ec21dd0159e6720993da0c17e3b51ba37de2ef05cd7649809d674cc6409b16c8e1d242dc424d573010975 SHA512 722436f146768e4db1e3312a0db1edab2a7daa86107825fb2436654eaf74e00f569357531316df506ef3f80cef89ac7185aee1adf0b00a6ee85cbc9811ca8100 |
25 |
|
26 |
diff --git a/dev-python/fixtures/files/fixtures-4.0.0-py311.patch b/dev-python/fixtures/files/fixtures-4.0.0-py311.patch |
27 |
deleted file mode 100644 |
28 |
index 6cda1104afca..000000000000 |
29 |
--- a/dev-python/fixtures/files/fixtures-4.0.0-py311.patch |
30 |
+++ /dev/null |
31 |
@@ -1,116 +0,0 @@ |
32 |
-From 54ef596952d459d605fcb40f13bed6d07ef93f4c Mon Sep 17 00:00:00 2001 |
33 |
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
34 |
-Date: Sat, 21 May 2022 12:15:21 +0200 |
35 |
-Subject: [PATCH 1/2] Update classmethod expectations (again) for Python 3.11 |
36 |
- |
37 |
-It seems that the classmethod behavior in Python 3.11.0b1 is back |
38 |
-to the one found in Python 3.8. Adjust the test expectations again. |
39 |
-This time around, we expect the "old-new" behavior in CPython 3.9 |
40 |
-and 3.10 only. |
41 |
---- |
42 |
- fixtures/tests/_fixtures/test_monkeypatch.py | 3 ++- |
43 |
- 1 file changed, 2 insertions(+), 1 deletion(-) |
44 |
- |
45 |
-diff --git a/fixtures/tests/_fixtures/test_monkeypatch.py b/fixtures/tests/_fixtures/test_monkeypatch.py |
46 |
-index 08cd1c8..fa08b24 100644 |
47 |
---- a/fixtures/tests/_fixtures/test_monkeypatch.py |
48 |
-+++ b/fixtures/tests/_fixtures/test_monkeypatch.py |
49 |
-@@ -24,7 +24,8 @@ from fixtures import MonkeyPatch, TestWithFixtures |
50 |
- reference = 23 |
51 |
- |
52 |
- NEW_PY39_CLASSMETHOD = ( |
53 |
-- sys.version_info >= (3, 9) and not hasattr(sys, "pypy_version_info")) |
54 |
-+ sys.version_info[:2] in ((3, 9), (3,10)) |
55 |
-+ and not hasattr(sys, "pypy_version_info")) |
56 |
- |
57 |
- class C(object): |
58 |
- def foo(self, arg): |
59 |
--- |
60 |
-2.35.1 |
61 |
- |
62 |
-From 48d8626168a374c099fa891d7e734548e1e03683 Mon Sep 17 00:00:00 2001 |
63 |
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
64 |
-Date: Sat, 21 May 2022 12:25:49 +0200 |
65 |
-Subject: [PATCH 2/2] Support Popen's process_group argument from Python 3.11 |
66 |
- |
67 |
---- |
68 |
- fixtures/_fixtures/popen.py | 9 +++++++-- |
69 |
- fixtures/tests/_fixtures/test_popen.py | 14 ++++++++++++++ |
70 |
- 2 files changed, 21 insertions(+), 2 deletions(-) |
71 |
- |
72 |
-diff --git a/fixtures/_fixtures/popen.py b/fixtures/_fixtures/popen.py |
73 |
-index ffa9bf4..a099854 100644 |
74 |
---- a/fixtures/_fixtures/popen.py |
75 |
-+++ b/fixtures/_fixtures/popen.py |
76 |
-@@ -131,7 +131,8 @@ class FakePopen(Fixture): |
77 |
- restore_signals=_unpassed, start_new_session=_unpassed, |
78 |
- pass_fds=_unpassed, *, group=_unpassed, extra_groups=_unpassed, |
79 |
- user=_unpassed, umask=_unpassed, encoding=_unpassed, |
80 |
-- errors=_unpassed, text=_unpassed, pipesize=_unpassed): |
81 |
-+ errors=_unpassed, text=_unpassed, pipesize=_unpassed, |
82 |
-+ process_group=_unpassed): |
83 |
- # Reject arguments introduced by newer versions of Python in older |
84 |
- # versions; this makes it harder to accidentally hide compatibility |
85 |
- # problems using test doubles. |
86 |
-@@ -149,6 +150,10 @@ class FakePopen(Fixture): |
87 |
- raise TypeError( |
88 |
- "FakePopen.__call__() got an unexpected keyword argument " |
89 |
- "'pipesize'") |
90 |
-+ if sys.version_info < (3, 11) and process_group is not FakePopen._unpassed: |
91 |
-+ raise TypeError( |
92 |
-+ "FakePopen.__call__() got an unexpected keyword argument " |
93 |
-+ "'process_group'") |
94 |
- |
95 |
- proc_args = dict(args=args) |
96 |
- local = locals() |
97 |
-@@ -158,7 +163,7 @@ class FakePopen(Fixture): |
98 |
- "universal_newlines", "startupinfo", "creationflags", |
99 |
- "restore_signals", "start_new_session", "pass_fds", "group", |
100 |
- "extra_groups", "user", "umask", "encoding", "errors", "text", |
101 |
-- "pipesize"]: |
102 |
-+ "pipesize", "process_group"]: |
103 |
- if local[param] is not FakePopen._unpassed: |
104 |
- proc_args[param] = local[param] |
105 |
- proc_info = self.get_info(proc_args) |
106 |
-diff --git a/fixtures/tests/_fixtures/test_popen.py b/fixtures/tests/_fixtures/test_popen.py |
107 |
-index c7bf1bd..e9ab074 100644 |
108 |
---- a/fixtures/tests/_fixtures/test_popen.py |
109 |
-+++ b/fixtures/tests/_fixtures/test_popen.py |
110 |
-@@ -74,6 +74,8 @@ class TestFakePopen(testtools.TestCase, TestWithFixtures): |
111 |
- all_args["umask"] = "umask" |
112 |
- if sys.version_info >= (3, 10): |
113 |
- all_args["pipesize"] = "pipesize" |
114 |
-+ if sys.version_info >= (3, 11): |
115 |
-+ all_args["process_group"] = "process_group" |
116 |
- |
117 |
- def get_info(proc_args): |
118 |
- self.assertEqual(all_args, proc_args) |
119 |
-@@ -110,6 +112,15 @@ class TestFakePopen(testtools.TestCase, TestWithFixtures): |
120 |
- r".* got an unexpected keyword argument 'pipesize'"): |
121 |
- fixture(args="args", pipesize=1024) |
122 |
- |
123 |
-+ @testtools.skipUnless( |
124 |
-+ sys.version_info < (3, 11), "only relevant on Python <3.11") |
125 |
-+ def test_rejects_3_11_args_on_older_versions(self): |
126 |
-+ fixture = self.useFixture(FakePopen(lambda proc_args: {})) |
127 |
-+ with testtools.ExpectedException( |
128 |
-+ TypeError, |
129 |
-+ r".* got an unexpected keyword argument 'process_group'"): |
130 |
-+ fixture(args="args", process_group=42) |
131 |
-+ |
132 |
- def test_function_signature(self): |
133 |
- fake_signature = inspect.getfullargspec(FakePopen.__call__) |
134 |
- real_signature = inspect.getfullargspec(subprocess.Popen) |
135 |
-@@ -130,6 +141,9 @@ class TestFakePopen(testtools.TestCase, TestWithFixtures): |
136 |
- fake_kwargs = set(fake_signature.kwonlyargs) |
137 |
- real_kwargs = set(real_signature.kwonlyargs) |
138 |
- |
139 |
-+ if sys.version_info < (3, 11): |
140 |
-+ fake_kwargs.remove('process_group') |
141 |
-+ |
142 |
- if sys.version_info < (3, 10): |
143 |
- fake_kwargs.remove('pipesize') |
144 |
- |
145 |
--- |
146 |
-2.35.1 |
147 |
- |
148 |
|
149 |
diff --git a/dev-python/fixtures/files/fixtures-4.0.0-pypy39.patch b/dev-python/fixtures/files/fixtures-4.0.0-pypy39.patch |
150 |
deleted file mode 100644 |
151 |
index dfe7bade82fa..000000000000 |
152 |
--- a/dev-python/fixtures/files/fixtures-4.0.0-pypy39.patch |
153 |
+++ /dev/null |
154 |
@@ -1,56 +0,0 @@ |
155 |
-From 2adba3989fc3d1723eb6534ae0bc1aeaf1513cfa Mon Sep 17 00:00:00 2001 |
156 |
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
157 |
-Date: Thu, 28 Apr 2022 12:14:55 +0200 |
158 |
-Subject: [PATCH] Revert to the previous classmethod expectations for PyPy3.9 |
159 |
- |
160 |
-Commit fe83067 has changed TestMonkeyPatch to account for changes |
161 |
-in classmethod handling in CPython 3.9. Unfortunately, this broke |
162 |
-the tests on PyPy3.9. Revert to the old expectations when using PyPy. |
163 |
- |
164 |
-Fixes #64 |
165 |
---- |
166 |
- fixtures/tests/_fixtures/test_monkeypatch.py | 9 ++++++--- |
167 |
- 1 file changed, 6 insertions(+), 3 deletions(-) |
168 |
- |
169 |
-diff --git a/fixtures/tests/_fixtures/test_monkeypatch.py b/fixtures/tests/_fixtures/test_monkeypatch.py |
170 |
-index 746f6dd..08cd1c8 100644 |
171 |
---- a/fixtures/tests/_fixtures/test_monkeypatch.py |
172 |
-+++ b/fixtures/tests/_fixtures/test_monkeypatch.py |
173 |
-@@ -23,6 +23,9 @@ from fixtures import MonkeyPatch, TestWithFixtures |
174 |
- |
175 |
- reference = 23 |
176 |
- |
177 |
-+NEW_PY39_CLASSMETHOD = ( |
178 |
-+ sys.version_info >= (3, 9) and not hasattr(sys, "pypy_version_info")) |
179 |
-+ |
180 |
- class C(object): |
181 |
- def foo(self, arg): |
182 |
- return arg |
183 |
-@@ -196,7 +199,7 @@ class TestMonkeyPatch(testtools.TestCase, TestWithFixtures): |
184 |
- # with the class |
185 |
- # |
186 |
- # https://bugs.python.org/issue19072 |
187 |
-- if sys.version_info >= (3, 9): |
188 |
-+ if NEW_PY39_CLASSMETHOD: |
189 |
- cls, = C.foo_cls() |
190 |
- self.expectThat(cls, Is(D)) |
191 |
- cls, = C().foo_cls() |
192 |
-@@ -238,13 +241,13 @@ class TestMonkeyPatch(testtools.TestCase, TestWithFixtures): |
193 |
- self.expectThat(slf, Is(d)) |
194 |
- # See note in test_patch_classmethod_with_classmethod on changes in |
195 |
- # Python 3.9 |
196 |
-- if sys.version_info >= (3, 9): |
197 |
-+ if NEW_PY39_CLASSMETHOD: |
198 |
- self.expectThat(cls, Is(None)) |
199 |
- else: |
200 |
- self.expectThat(cls, Is(C)) |
201 |
- slf, cls = C().foo_cls() |
202 |
- self.expectThat(slf, Is(d)) |
203 |
-- if sys.version_info >= (3, 9): |
204 |
-+ if NEW_PY39_CLASSMETHOD: |
205 |
- self.expectThat(cls, Is(None)) |
206 |
- else: |
207 |
- self.expectThat(cls, Is(C)) |
208 |
--- |
209 |
-2.35.1 |
210 |
- |
211 |
|
212 |
diff --git a/dev-python/fixtures/fixtures-4.0.0.ebuild b/dev-python/fixtures/fixtures-4.0.0.ebuild |
213 |
deleted file mode 100644 |
214 |
index 75916b42f6b4..000000000000 |
215 |
--- a/dev-python/fixtures/fixtures-4.0.0.ebuild |
216 |
+++ /dev/null |
217 |
@@ -1,37 +0,0 @@ |
218 |
-# Copyright 1999-2022 Gentoo Authors |
219 |
-# Distributed under the terms of the GNU General Public License v2 |
220 |
- |
221 |
-EAPI=8 |
222 |
- |
223 |
-DISTUTILS_USE_PEP517=pbr |
224 |
-PYTHON_COMPAT=( python3_{8..11} pypy3 ) |
225 |
- |
226 |
-inherit distutils-r1 |
227 |
- |
228 |
-DESCRIPTION="Fixtures, reusable state for writing clean tests and more" |
229 |
-HOMEPAGE=" |
230 |
- https://github.com/testing-cabal/fixtures/ |
231 |
- https://pypi.org/project/fixtures/ |
232 |
-" |
233 |
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
234 |
- |
235 |
-LICENSE="|| ( Apache-2.0 BSD )" |
236 |
-SLOT="0" |
237 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" |
238 |
- |
239 |
-RDEPEND=" |
240 |
- >=dev-python/pbr-5.7.0[${PYTHON_USEDEP}] |
241 |
- >=dev-python/testtools-2.5.0[${PYTHON_USEDEP}] |
242 |
-" |
243 |
-BDEPEND=" |
244 |
- test? ( |
245 |
- dev-python/mock[${PYTHON_USEDEP}] |
246 |
- ) |
247 |
-" |
248 |
- |
249 |
-distutils_enable_tests unittest |
250 |
- |
251 |
-PATCHES=( |
252 |
- "${FILESDIR}"/${P}-pypy39.patch |
253 |
- "${FILESDIR}"/${P}-py311.patch |
254 |
-) |