Open godmar opened 2 years ago
I was able to rename opcode.py
to opcode_local.py
and apply this patch:
iff --git a/pypy_traceview/opcode_test.py b/pypy_traceview/opcode_test.py
index ecc87ac..4cf0c06 100644
--- a/pypy_traceview/opcode_test.py
+++ b/pypy_traceview/opcode_test.py
@@ -1,4 +1,4 @@
-from .opcode import Opcode, group_opcodes, indent_opcodes, \
+from .opcode_local import Opcode, group_opcodes, indent_opcodes, \
dump_indentend_opcodes
diff --git a/pypy_traceview/renderer/html.py b/pypy_traceview/renderer/html.py
index d3c7f4d..aee7748 100644
--- a/pypy_traceview/renderer/html.py
+++ b/pypy_traceview/renderer/html.py
@@ -6,7 +6,7 @@ from pygments.lexers import PythonLexer, NasmLexer, GasLexer
from pygments.token import Comment
from pygments.formatters import HtmlFormatter
-from ..opcode import group_opcodes, indent_opcodes, Opcode
+from ..opcode_local import group_opcodes, indent_opcodes, Opcode
from ..ir import group_ir
from ..memoization import memoized
diff --git a/pypy_traceview/tracelog.py b/pypy_traceview/tracelog.py
index c7d5029..190a10d 100644
--- a/pypy_traceview/tracelog.py
+++ b/pypy_traceview/tracelog.py
@@ -1,4 +1,4 @@
-from .opcode import Opcode
+from .opcode_local import Opcode
class TraceLog:
this then made it work.
Hi,
I'm trying to use pypy-traceview. On Python 3.6, I get:
I get the same error on Python 3.10:
It seems that you are importing dis which in turn imports
opcode
but due to thePYTHONPATH
setting picks up your version instead of the system version. I note that/usr/lib/python3.10/opcode.py
has an__all__
export.