summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/openstack.scm44
-rw-r--r--gnu/packages/patches/python-mox3-python3.6-compat.patch43
3 files changed, 0 insertions, 88 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index dab5a9ed2a1..3804efc6f85 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2163,7 +2163,6 @@ dist_patch_DATA = \
2163 %D%/packages/patches/python-pillow-CVE-2022-45199.patch \ 2163 %D%/packages/patches/python-pillow-CVE-2022-45199.patch \
2164 %D%/packages/patches/python-libxml2-utf8.patch \ 2164 %D%/packages/patches/python-libxml2-utf8.patch \
2165 %D%/packages/patches/python-memcached-syntax-warnings.patch \ 2165 %D%/packages/patches/python-memcached-syntax-warnings.patch \
2166 %D%/packages/patches/python-mox3-python3.6-compat.patch \
2167 %D%/packages/patches/python-packaging-test-arch.patch \ 2166 %D%/packages/patches/python-packaging-test-arch.patch \
2168 %D%/packages/patches/python-pandas-2-no-pytz_datetime.patch \ 2167 %D%/packages/patches/python-pandas-2-no-pytz_datetime.patch \
2169 %D%/packages/patches/python-property-cached-asyncio-3_11.patch \ 2168 %D%/packages/patches/python-property-cached-asyncio-3_11.patch \
diff --git a/gnu/packages/openstack.scm b/gnu/packages/openstack.scm
index ac0ab05ca11..ee31ae9f086 100644
--- a/gnu/packages/openstack.scm
+++ b/gnu/packages/openstack.scm
@@ -174,50 +174,6 @@ manner.")
174guidelines}.") 174guidelines}.")
175 (license license:asl2.0))) 175 (license license:asl2.0)))
176 176
177(define-public python-mox3
178 (package
179 (name "python-mox3")
180 (version "0.24.0")
181 (source
182 (origin
183 (method url-fetch)
184 (uri (pypi-uri "mox3" version))
185 (patches (search-patches "python-mox3-python3.6-compat.patch"))
186 (sha256
187 (base32 "0w58adwv7q9wzvmq9mlrk2asfk73myq9fpwy7mjkzsz3baa95zf5"))))
188 (build-system pyproject-build-system)
189 (propagated-inputs
190 (list python-fixtures python-pbr))
191 (native-inputs
192 (list python-openstackdocstheme
193 python-setuptools
194 python-sphinx
195 python-subunit
196 python-testrepository
197 python-testtools
198 python-wheel))
199 (arguments
200 (list
201 #:phases
202 #~(modify-phases %standard-phases
203 (add-after 'unpack 'fix-for-python-3.11
204 (lambda _
205 ;; The getargspec function has been removed in python 3.11.
206 (substitute* "mox3/mox.py"
207 (("self\\._args, varargs, varkw, defaults = inspect\\.getargspec\\(method\\)")
208 "inspect_result = inspect.getfullargspec(method)
209 self._args = inspect_result.args
210 varargs = inspect_result.varargs
211 varkw = inspect_result.varkw
212 defaults = inspect_result.defaults")))))))
213 (home-page "https://www.openstack.org/")
214 (synopsis "Mock object framework for Python")
215 (description
216 "Mox3 is an unofficial port of the @uref{https://code.google.com/p/pymox/,
217Google mox framework} to Python 3. It was meant to be as compatible
218with mox as possible, but small enhancements have been made.")
219 (license license:asl2.0)))
220
221(define-public python-openstackdocstheme 177(define-public python-openstackdocstheme
222 (package 178 (package
223 (name "python-openstackdocstheme") 179 (name "python-openstackdocstheme")
diff --git a/gnu/packages/patches/python-mox3-python3.6-compat.patch b/gnu/packages/patches/python-mox3-python3.6-compat.patch
deleted file mode 100644
index 0426d07cf9f..00000000000
--- a/gnu/packages/patches/python-mox3-python3.6-compat.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1Fix regex so that it works with Python 3.6.
2
3See <https://docs.python.org/3/library/re.html#re.LOCALE>.
4
5Copied from upstream bug report:
6https://bugs.launchpad.net/python-mox3/+bug/1665266
7
8From 05064cdb6ea7a16450c6beae2b6f7c6074212a69 Mon Sep 17 00:00:00 2001
9From: Zac Medico <zmedico@gentoo.org>
10Date: Thu, 16 Feb 2017 00:24:10 -0800
11Subject: [PATCH] RegexTest: python3.6 compatibility
12
13These fixes are backward-compatible with older python versions:
14
15* raw strings fix invalid escape sequences
16* flags=8 fixes ValueError: cannot use LOCALE flag with a str pattern
17---
18 mox3/tests/test_mox.py | 6 +++---
19 1 file changed, 3 insertions(+), 3 deletions(-)
20
21diff --git a/mox3/tests/test_mox.py b/mox3/tests/test_mox.py
22index 15ac565..3a1af17 100644
23--- a/mox3/tests/test_mox.py
24+++ b/mox3/tests/test_mox.py
25@@ -312,12 +312,12 @@ class RegexTest(testtools.TestCase):
26 def testReprWithoutFlags(self):
27 """repr should return the regular expression pattern."""
28 self.assertTrue(
29- repr(mox.Regex(r"a\s+b")) == "<regular expression 'a\s+b'>")
30+ repr(mox.Regex(r"a\s+b")) == r"<regular expression 'a\s+b'>")
31
32 def testReprWithFlags(self):
33 """repr should return the regular expression pattern and flags."""
34- self.assertTrue(repr(mox.Regex(r"a\s+b", flags=4)) ==
35- "<regular expression 'a\s+b', flags=4>")
36+ self.assertTrue(repr(mox.Regex(r"a\s+b", flags=8)) ==
37+ r"<regular expression 'a\s+b', flags=8>")
38
39
40 class IsTest(testtools.TestCase):
41--
422.10.2
43