Author: Manuel Jacob <[email protected]>
Branch: py3k
Changeset: r77825:b29711ae7758
Date: 2015-06-03 16:10 +0200
http://bitbucket.org/pypy/pypy/changeset/b29711ae7758/
Log: Add a workaround for Python 2.7.6 raising a SyntaxError when
importing a file that contains Py3k-compatible exec(code, d) calls
in certain contexts.
diff --git a/pypy/module/_vmprof/test/test__vmprof.py
b/pypy/module/_vmprof/test/test__vmprof.py
--- a/pypy/module/_vmprof/test/test__vmprof.py
+++ b/pypy/module/_vmprof/test/test__vmprof.py
@@ -46,13 +46,16 @@
assert no_of_codes > 10
d = {}
- exec("""def foo():
+ def exec_(code, d):
+ exec(code, d)
+
+ exec_("""def foo():
pass
""", d)
_vmprof.enable(self.tmpfileno2)
- exec("""def foo2():
+ exec_("""def foo2():
pass
""", d)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit