summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2021-08-28 23:33:08 +0200
committerGuillaume Le Vaillant <glv@posteo.net>2021-08-28 23:33:08 +0200
commitd011429b426397d1255dcbb30240467ef7d88f33 (patch)
tree7288e3f28d526bf3ea1c813b40df3c059a0bdd4a /gnu/packages/patches
parent16ae9ebd21e6557a334b0a3272a6d3eea3f3bed8 (diff)
gnu: python-chai: Remove Python2 code.
* gnu/packages/patches/python-chai-drop-python2.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/python-xyz.scm (python-chai)[source]: Use it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/python-chai-drop-python2.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-chai-drop-python2.patch b/gnu/packages/patches/python-chai-drop-python2.patch
new file mode 100644
index 0000000000..0eb980e5db
--- /dev/null
+++ b/gnu/packages/patches/python-chai-drop-python2.patch
@@ -0,0 +1,32 @@
+Patch copied from Gentoo removing obsolete Python2 code.
+
+--- a/chai/chai.py
++++ b/chai/chai.py
+@@ -62,11 +62,6 @@
+ try:
+ func(self, *args, **kwargs)
+ except UnexpectedCall as e:
+- # if this is not python3, use python2 syntax
+- if not hasattr(e, '__traceback__'):
+- from .python2 import reraise
+- reraise(
+- AssertionError, '\n\n' + str(e), sys.exc_info()[-1])
+ exc = AssertionError('\n\n' + str(e))
+ setattr(exc, '__traceback__', sys.exc_info()[-1])
+ raise exc
+--- a/chai/python2.py
++++ b/chai/python2.py
+@@ -1,3 +0,0 @@
+-
+-def reraise(exc, msg, traceback):
+- raise exc, msg, traceback
+--- a/chai.egg-info/SOURCES.txt
++++ b/chai.egg-info/SOURCES.txt
+@@ -10,7 +10,6 @@
+ chai/exception.py
+ chai/expectation.py
+ chai/mock.py
+-chai/python2.py
+ chai/spy.py
+ chai/stub.py
+ chai.egg-info/PKG-INFO