1 |
commit: 742401dbc30116c08a355268bd94c8ce9f18cfab |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 28 10:18:28 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 1 07:30:27 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=742401db |
7 |
|
8 |
dev-python/fixtures: Bump to 4.0.0 |
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-pypy39.patch | 56 ++++++++++++++++++++++ |
14 |
dev-python/fixtures/fixtures-4.0.0.ebuild | 40 ++++++++++++++++ |
15 |
3 files changed, 97 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/fixtures/Manifest b/dev-python/fixtures/Manifest |
18 |
index c7aded1d7fb5..039cc343e28e 100644 |
19 |
--- a/dev-python/fixtures/Manifest |
20 |
+++ b/dev-python/fixtures/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST fixtures-3.0.0.tar.gz 56629 BLAKE2B 949c67c428f5e5ca0afc2f875dd4e2a212922415762a2528c185794e4ae2b74d32873aaf7132d97dec95a681bb4d87d85b11a39c43c64cd531dd4bf2fce75f87 SHA512 e52ba864c42d15a8baa60583761006b2dd78e3cd5f3f043f5702346aef428b933d62e8fa5889b7cb4196e4072acc5df3b7ffa39702a1b782887bdc109299b695 |
23 |
+DIST fixtures-4.0.0.tar.gz 56786 BLAKE2B 7fa8916d3e384a47c967b51ffeebb81c50c4be7432601aa94f220b6ae32ed189f16750cb126c2925995c2e945684c48041014a97902145343527e8856125b61a SHA512 dcd67c3df9efc16f2a21b6d2917a5b7e45ecc09d1ddbd1de98a5b4b717ea7da0fc82e1054f494255b419a792e841145110c77a1772444f4019fc02e9917c5b80 |
24 |
|
25 |
diff --git a/dev-python/fixtures/files/fixtures-4.0.0-pypy39.patch b/dev-python/fixtures/files/fixtures-4.0.0-pypy39.patch |
26 |
new file mode 100644 |
27 |
index 000000000000..dfe7bade82fa |
28 |
--- /dev/null |
29 |
+++ b/dev-python/fixtures/files/fixtures-4.0.0-pypy39.patch |
30 |
@@ -0,0 +1,56 @@ |
31 |
+From 2adba3989fc3d1723eb6534ae0bc1aeaf1513cfa Mon Sep 17 00:00:00 2001 |
32 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
33 |
+Date: Thu, 28 Apr 2022 12:14:55 +0200 |
34 |
+Subject: [PATCH] Revert to the previous classmethod expectations for PyPy3.9 |
35 |
+ |
36 |
+Commit fe83067 has changed TestMonkeyPatch to account for changes |
37 |
+in classmethod handling in CPython 3.9. Unfortunately, this broke |
38 |
+the tests on PyPy3.9. Revert to the old expectations when using PyPy. |
39 |
+ |
40 |
+Fixes #64 |
41 |
+--- |
42 |
+ fixtures/tests/_fixtures/test_monkeypatch.py | 9 ++++++--- |
43 |
+ 1 file changed, 6 insertions(+), 3 deletions(-) |
44 |
+ |
45 |
+diff --git a/fixtures/tests/_fixtures/test_monkeypatch.py b/fixtures/tests/_fixtures/test_monkeypatch.py |
46 |
+index 746f6dd..08cd1c8 100644 |
47 |
+--- a/fixtures/tests/_fixtures/test_monkeypatch.py |
48 |
++++ b/fixtures/tests/_fixtures/test_monkeypatch.py |
49 |
+@@ -23,6 +23,9 @@ from fixtures import MonkeyPatch, TestWithFixtures |
50 |
+ |
51 |
+ reference = 23 |
52 |
+ |
53 |
++NEW_PY39_CLASSMETHOD = ( |
54 |
++ sys.version_info >= (3, 9) and not hasattr(sys, "pypy_version_info")) |
55 |
++ |
56 |
+ class C(object): |
57 |
+ def foo(self, arg): |
58 |
+ return arg |
59 |
+@@ -196,7 +199,7 @@ class TestMonkeyPatch(testtools.TestCase, TestWithFixtures): |
60 |
+ # with the class |
61 |
+ # |
62 |
+ # https://bugs.python.org/issue19072 |
63 |
+- if sys.version_info >= (3, 9): |
64 |
++ if NEW_PY39_CLASSMETHOD: |
65 |
+ cls, = C.foo_cls() |
66 |
+ self.expectThat(cls, Is(D)) |
67 |
+ cls, = C().foo_cls() |
68 |
+@@ -238,13 +241,13 @@ class TestMonkeyPatch(testtools.TestCase, TestWithFixtures): |
69 |
+ self.expectThat(slf, Is(d)) |
70 |
+ # See note in test_patch_classmethod_with_classmethod on changes in |
71 |
+ # Python 3.9 |
72 |
+- if sys.version_info >= (3, 9): |
73 |
++ if NEW_PY39_CLASSMETHOD: |
74 |
+ self.expectThat(cls, Is(None)) |
75 |
+ else: |
76 |
+ self.expectThat(cls, Is(C)) |
77 |
+ slf, cls = C().foo_cls() |
78 |
+ self.expectThat(slf, Is(d)) |
79 |
+- if sys.version_info >= (3, 9): |
80 |
++ if NEW_PY39_CLASSMETHOD: |
81 |
+ self.expectThat(cls, Is(None)) |
82 |
+ else: |
83 |
+ self.expectThat(cls, Is(C)) |
84 |
+-- |
85 |
+2.35.1 |
86 |
+ |
87 |
|
88 |
diff --git a/dev-python/fixtures/fixtures-4.0.0.ebuild b/dev-python/fixtures/fixtures-4.0.0.ebuild |
89 |
new file mode 100644 |
90 |
index 000000000000..25709bab8188 |
91 |
--- /dev/null |
92 |
+++ b/dev-python/fixtures/fixtures-4.0.0.ebuild |
93 |
@@ -0,0 +1,40 @@ |
94 |
+# Copyright 1999-2022 Gentoo Authors |
95 |
+# Distributed under the terms of the GNU General Public License v2 |
96 |
+ |
97 |
+EAPI=8 |
98 |
+ |
99 |
+DISTUTILS_USE_PEP517=pbr |
100 |
+PYTHON_COMPAT=( python3_{8..10} pypy3 ) |
101 |
+ |
102 |
+inherit distutils-r1 |
103 |
+ |
104 |
+DESCRIPTION="Fixtures, reusable state for writing clean tests and more" |
105 |
+HOMEPAGE=" |
106 |
+ https://github.com/testing-cabal/fixtures/ |
107 |
+ https://pypi.org/project/fixtures/ |
108 |
+" |
109 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
110 |
+ |
111 |
+LICENSE="|| ( Apache-2.0 BSD )" |
112 |
+SLOT="0" |
113 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" |
114 |
+IUSE="test" |
115 |
+RESTRICT="!test? ( test )" |
116 |
+ |
117 |
+RDEPEND=" |
118 |
+ >=dev-python/pbr-5.7.0[${PYTHON_USEDEP}] |
119 |
+ >=dev-python/testtools-2.5.0[${PYTHON_USEDEP}] |
120 |
+" |
121 |
+BDEPEND=" |
122 |
+ test? ( |
123 |
+ dev-python/mock[${PYTHON_USEDEP}] |
124 |
+ ) |
125 |
+" |
126 |
+ |
127 |
+PATCHES=( |
128 |
+ "${FILESDIR}"/${P}-pypy39.patch |
129 |
+) |
130 |
+ |
131 |
+python_test() { |
132 |
+ emake check |
133 |
+} |