Permalink
Browse files

Change all 'dis' imports to use our own copy.

The OPy binary now only has one copy of 'dis'.
  • Loading branch information...
Andy Chu
Andy Chu committed Apr 15, 2018
1 parent a0a0b14 commit 1abd1d705d504178a45c94f737bee6e18d65754d
Showing with 11 additions and 7 deletions.
  1. +1 −1 opy/byterun/pyobj.py
  2. +2 −1 opy/byterun/pyvm2.py
  3. +1 −1 opy/byterun/vmtest.py
  4. +5 −2 opy/compiler2/dis_tool.py
  5. +1 −1 opy/compiler2/pyassem.py
  6. +1 −1 opy/lib/inspect.py
View
@@ -2,10 +2,10 @@
from __future__ import print_function
import collections
import dis
import sys
import types
from opy.lib import dis
from opy.lib import inspect
View
@@ -3,7 +3,6 @@
# pyvm2 by Paul Swartz (z3p), from http://www.twistedmatrix.com/users/z3p/
from __future__ import print_function, division
import dis
import linecache
import operator
import repr as repr_lib # Don't conflict with builtin repr()
@@ -15,6 +14,8 @@
# Generator used in YIELD_FROM, which we might not need.
from pyobj import Frame, Block, Function, Generator
from opy.lib import dis
# Create a repr that won't overflow.
repr_obj = repr_lib.Repr()
repr_obj.maxother = 120
View
@@ -3,13 +3,13 @@
from __future__ import print_function
import cStringIO
import dis
import sys
import textwrap
import types
import unittest
from opy.lib import dis
import pyvm2
# Make this false if you need to run the debugger inside a test.
@@ -19,8 +19,11 @@
tools/dumppyc.py, which came with the 'compiler2' package.
"""
import collections, dis, marshal, struct, sys, time, types
from ..compiler2 import consts
import collections, marshal, struct, sys, time, types
import consts # this package
from opy.lib import dis
INDENT = ' '
View
@@ -1,11 +1,11 @@
"""A flow graph representation for Python bytecode"""
from __future__ import print_function
import dis
import itertools
import types
from .consts import CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS
from opy.lib import dis
HAS_JREL = set(dis.opname[op] for op in dis.hasjrel)
View
@@ -34,12 +34,12 @@
import types
import string
import re
import dis
import imp
import linecache
from operator import attrgetter
from collections import namedtuple
from opy.lib import dis
from opy.pgen2 import tokenize
# These constants are from Include/code.h.

0 comments on commit 1abd1d7

Please sign in to comment.