mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-18 12:47:33 -05:00
d011429b42
* 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.
32 lines
973 B
Diff
32 lines
973 B
Diff
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
|