[pypy-commit] pypy py3.6: cpython compatibility

mattip pypy.commits at gmail.com
Wed Sep 25 11:06:22 EDT 2019


Author: Matti Picus <matti.picus at gmail.com>
Branch: py3.6
Changeset: r97606:c9039acb3770
Date: 2019-09-25 18:03 +0300
http://bitbucket.org/pypy/pypy/changeset/c9039acb3770/

Log:	cpython compatibility

diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py
--- a/pypy/interpreter/pyframe.py
+++ b/pypy/interpreter/pyframe.py
@@ -670,6 +670,9 @@
 
         # You can only do this from within a trace function, not via
         # _getframe or similar hackery.
+        if space.int_w(self.fget_f_lasti(space)) == -1:
+            raise oefmt(space.w_ValueError,
+                        "can't jump from the 'call' trace event of a new frame")
         if self.get_w_f_trace() is None:
             raise oefmt(space.w_ValueError,
                         "f_lineno can only be set by a trace function")


More information about the pypy-commit mailing list