unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 0eb980e5dba2f014b52e3f713599adc925532547 973 bytes (raw)
name: packages/patches/python-chai-drop-python2.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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

debug log:

solving 0eb980e5dba2f014b52e3f713599adc925532547 ...
found 0eb980e5dba2f014b52e3f713599adc925532547 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).