Author: Ronan Lamy <[email protected]>
Branch: py3.6
Changeset: r97344:0587af2ecd65
Date: 2019-08-29 17:21 +0100
http://bitbucket.org/pypy/pypy/changeset/0587af2ecd65/
Log: Import untested debugging tool pypy.tool.dis3 only when needed
diff --git a/pypy/interpreter/pycode.py b/pypy/interpreter/pycode.py
--- a/pypy/interpreter/pycode.py
+++ b/pypy/interpreter/pycode.py
@@ -14,7 +14,6 @@
CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS, CO_NESTED,
CO_GENERATOR, CO_COROUTINE, CO_KILL_DOCSTRING, CO_YIELD_INSIDE_TRY,
CO_ITERABLE_COROUTINE, CO_ASYNC_GENERATOR)
-from pypy.tool import dis3
from pypy.tool.stdlib_opcode import opcodedesc, HAVE_ARGUMENT
from rpython.rlib.rarithmetic import intmask
from rpython.rlib.objectmodel import compute_hash, we_are_translated
@@ -307,6 +306,7 @@
def dump(self):
"""NOT_RPYTHON: A dis.dis() dump of the code object."""
+ from pypy.tool import dis3
if not hasattr(self, 'co_consts'):
self.co_consts = [w if isinstance(w, PyCode) else
self.space.unwrap(w)
for w in self.co_consts_w]
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit