Permalink
Browse files

Copy inspect.py from the standard library.

It uses 'tokenize', and we don't want 2 copies of that in the OPy
binary.  Instead we use pgen2/tokenize.py.

Use imports relative to the repo root.  Otherwise unit tests and
bin/opyc won't both work.
  • Loading branch information...
Andy Chu
Andy Chu committed Apr 15, 2018
1 parent ef5f1ae commit bf89a33e549574c021322da0b5a0e8398e2c87f1
Showing with 1,072 additions and 7 deletions.
  1. +2 −1 opy/byterun/pyobj.py
  2. +0 −1 opy/byterun/pyvm2.py
  3. +2 −1 opy/callgraph.py
  4. +1,064 −0 opy/lib/inspect.py
  5. +4 −4 opy/test.sh
View
@@ -3,10 +3,11 @@
import collections
import dis
import inspect
import sys
import types
from opy.lib import inspect
def debug1(msg, *args):
if args:
View
@@ -4,7 +4,6 @@
from __future__ import print_function, division
import dis
import inspect
import linecache
import operator
import repr as repr_lib # Don't conflict with builtin repr()
View
@@ -6,13 +6,14 @@
import collections
import dis
import inspect
import os
import sys
import __builtin__ # For looking up names
import types
from .lib import inspect
from core import util
log = util.log
Oops, something went wrong.

0 comments on commit bf89a33

Please sign in to comment.