Author: Brian Kearns <[email protected]>
Branch:
Changeset: r62647:cd694cb03816
Date: 2013-03-22 05:46 -0400
http://bitbucket.org/pypy/pypy/changeset/cd694cb03816/
Log: cleanups in pypy.interpreter
diff --git a/pypy/interpreter/app_main.py b/pypy/interpreter/app_main.py
--- a/pypy/interpreter/app_main.py
+++ b/pypy/interpreter/app_main.py
@@ -629,7 +629,6 @@
# start a prompt if requested
if inspect_requested():
- inteactive = False
try:
from _pypy_interact import interactive_console
success = run_toplevel(interactive_console, mainmodule)
diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -336,7 +336,6 @@
if e.match(self, self.w_KeyError):
continue
raise
- modname = self.str_w(w_modname)
mod = self.interpclass_w(w_mod)
if isinstance(mod, Module) and not mod.startup_called:
mod.init(self)
@@ -429,7 +428,6 @@
def get_builtinmodule_to_install(self):
"""NOT_RPYTHON"""
- from pypy.tool.lib_pypy import LIB_PYPY
try:
return self._builtinmodule_list
except AttributeError:
diff --git a/pypy/interpreter/executioncontext.py
b/pypy/interpreter/executioncontext.py
--- a/pypy/interpreter/executioncontext.py
+++ b/pypy/interpreter/executioncontext.py
@@ -1,6 +1,5 @@
import sys
from pypy.interpreter.error import OperationError
-from rpython.rlib.rarithmetic import LONG_BIT
from rpython.rlib.unroll import unrolling_iterable
from rpython.rlib import jit
diff --git a/pypy/interpreter/function.py b/pypy/interpreter/function.py
--- a/pypy/interpreter/function.py
+++ b/pypy/interpreter/function.py
@@ -12,7 +12,6 @@
from pypy.interpreter.eval import Code
from pypy.interpreter.argument import Arguments
from rpython.rlib import jit
-from rpython.rlib.debug import make_sure_not_resized
funccallunrolling = unrolling_iterable(range(4))
@@ -309,7 +308,6 @@
return nt([new_inst, nt(tup_base), nt(tup_state)])
def descr_function__setstate__(self, space, w_args):
- from pypy.interpreter.pycode import PyCode
args_w = space.unpackiterable(w_args)
try:
(w_name, w_doc, w_code, w_func_globals, w_closure, w_defs,
@@ -576,7 +574,6 @@
w_mod = space.getbuiltinmodule('_pickle_support')
mod = space.interp_w(MixedModule, w_mod)
new_inst = mod.get('method_new')
- w = space.wrap
w_instance = self.w_instance or space.w_None
function = space.interpclass_w(self.w_function)
if isinstance(function, Function) and isinstance(function.code,
BuiltinCode):
diff --git a/pypy/interpreter/interactive.py b/pypy/interpreter/interactive.py
--- a/pypy/interpreter/interactive.py
+++ b/pypy/interpreter/interactive.py
@@ -1,5 +1,4 @@
-from pypy.interpreter import error
-from pypy.interpreter import baseobjspace, module, main
+from pypy.interpreter import main, error
import sys
import code
import time
@@ -126,7 +125,6 @@
#banner = "Python %s in pypy\n%s / %s" % (
# sys.version, self.__class__.__name__,
# self.space.__class__.__name__)
- w_sys = self.space.sys
major, minor, micro, tag, rev =
self.space.unwrap(self.space.sys.get('pypy_version_info'))
elapsed = time.time() - self.space._starttime
version = "%d.%d.%d" % (major, minor, micro)
diff --git a/pypy/interpreter/mixedmodule.py b/pypy/interpreter/mixedmodule.py
--- a/pypy/interpreter/mixedmodule.py
+++ b/pypy/interpreter/mixedmodule.py
@@ -5,8 +5,6 @@
from pypy.interpreter.baseobjspace import W_Root
import os, sys
-import inspect
-
class MixedModule(Module):
applevel_name = None
expose__file__attribute = True
diff --git a/pypy/interpreter/pycode.py b/pypy/interpreter/pycode.py
--- a/pypy/interpreter/pycode.py
+++ b/pypy/interpreter/pycode.py
@@ -15,9 +15,8 @@
CO_GENERATOR, CO_CONTAINSGLOBALS)
from pypy.tool.stdlib_opcode import opcodedesc, HAVE_ARGUMENT
from rpython.rlib.rarithmetic import intmask
-from rpython.rlib.debug import make_sure_not_resized
+from rpython.rlib.objectmodel import compute_hash
from rpython.rlib import jit
-from rpython.rlib.objectmodel import compute_hash
class BytecodeCorruption(Exception):
diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py
--- a/pypy/interpreter/pyframe.py
+++ b/pypy/interpreter/pyframe.py
@@ -2,7 +2,7 @@
"""
from rpython.tool.pairtype import extendabletype
-from pypy.interpreter import eval, baseobjspace, pycode
+from pypy.interpreter import eval, pycode
from pypy.interpreter.argument import Arguments
from pypy.interpreter.error import OperationError, operationerrfmt
from pypy.interpreter.executioncontext import ExecutionContext
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit