[pypy-svn] r19044 - in pypy/dist/pypy/objspace: . flow std
mwh at codespeak.net
mwh at codespeak.net
Thu Oct 27 00:03:59 CEST 2005
Author: mwh
Date: Thu Oct 27 00:03:54 2005
New Revision: 19044
Modified:
pypy/dist/pypy/objspace/descroperation.py
pypy/dist/pypy/objspace/flow/flowcontext.py
pypy/dist/pypy/objspace/flow/framestate.py
pypy/dist/pypy/objspace/flow/specialcase.py
pypy/dist/pypy/objspace/std/dictobject.py
pypy/dist/pypy/objspace/std/dictproxyobject.py
pypy/dist/pypy/objspace/std/fake.py
pypy/dist/pypy/objspace/std/listobject.py
pypy/dist/pypy/objspace/std/longobject.py
pypy/dist/pypy/objspace/std/longtype.py
pypy/dist/pypy/objspace/std/objspace.py
pypy/dist/pypy/objspace/std/register_all.py
pypy/dist/pypy/objspace/std/stdtypedef.py
pypy/dist/pypy/objspace/std/stringobject.py
pypy/dist/pypy/objspace/std/strutil.py
Log:
importfun vs objspace/
objspace/std is something of a mess
Modified: pypy/dist/pypy/objspace/descroperation.py
==============================================================================
--- pypy/dist/pypy/objspace/descroperation.py (original)
+++ pypy/dist/pypy/objspace/descroperation.py Thu Oct 27 00:03:54 2005
@@ -1,8 +1,7 @@
import operator
from pypy.interpreter.error import OperationError
-from pypy.interpreter.baseobjspace import ObjSpace, W_Root, BaseWrappable
+from pypy.interpreter.baseobjspace import ObjSpace
from pypy.interpreter.function import Function, Method
-from pypy.interpreter.gateway import BuiltinCode
from pypy.interpreter.argument import Arguments
from pypy.tool.sourcetools import compile2, func_with_new_name
Modified: pypy/dist/pypy/objspace/flow/flowcontext.py
==============================================================================
--- pypy/dist/pypy/objspace/flow/flowcontext.py (original)
+++ pypy/dist/pypy/objspace/flow/flowcontext.py Thu Oct 27 00:03:54 2005
@@ -246,7 +246,6 @@
return outcome, w_exc_cls, w_exc_value
def build_flow(self):
- from pypy.objspace.flow.objspace import UnwrapException
while self.pendingblocks:
block = self.pendingblocks.pop(0)
frame = self.create_frame()
Modified: pypy/dist/pypy/objspace/flow/framestate.py
==============================================================================
--- pypy/dist/pypy/objspace/flow/framestate.py (original)
+++ pypy/dist/pypy/objspace/flow/framestate.py Thu Oct 27 00:03:54 2005
@@ -1,6 +1,6 @@
from pypy.interpreter.pyframe import PyFrame, ControlFlowException
from pypy.interpreter.error import OperationError
-from pypy.interpreter.typedef import instantiate
+from pypy.rpython.objectmodel import instantiate
from pypy.objspace.flow.model import *
class FrameState:
Modified: pypy/dist/pypy/objspace/flow/specialcase.py
==============================================================================
--- pypy/dist/pypy/objspace/flow/specialcase.py (original)
+++ pypy/dist/pypy/objspace/flow/specialcase.py Thu Oct 27 00:03:54 2005
@@ -1,13 +1,8 @@
-import types, operator, sys
-from pypy.interpreter import pyframe, baseobjspace
-from pypy.interpreter.error import OperationError
from pypy.objspace.flow.objspace import UnwrapException
-from pypy.objspace.flow.model import Constant, Variable
+from pypy.objspace.flow.model import Constant
from pypy.objspace.flow.operation import OperationName, Arity
-from pypy.interpreter import pyopcode
from pypy.interpreter.gateway import ApplevelClass
from pypy.tool.cache import Cache
-from pypy.tool.sourcetools import NiceCompile, compile2
def sc_import(space, fn, args):
w_name, w_glob, w_loc, w_frm = args.fixedunpack(4)
Modified: pypy/dist/pypy/objspace/std/dictobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/dictobject.py (original)
+++ pypy/dist/pypy/objspace/std/dictobject.py Thu Oct 27 00:03:54 2005
@@ -8,7 +8,6 @@
from pypy.objspace.std.objspace import *
from pypy.interpreter import gateway
-from pypy.rpython.rarithmetic import r_uint
from pypy.rpython.objectmodel import r_dict
Modified: pypy/dist/pypy/objspace/std/dictproxyobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/dictproxyobject.py (original)
+++ pypy/dist/pypy/objspace/std/dictproxyobject.py Thu Oct 27 00:03:54 2005
@@ -1,5 +1,4 @@
from pypy.objspace.std.objspace import *
-from pypy.interpreter.typedef import GetSetProperty
def descr_get_dictproxy(space, w_obj):
return W_DictProxyObject(space, w_obj.getdict())
Modified: pypy/dist/pypy/objspace/std/fake.py
==============================================================================
--- pypy/dist/pypy/objspace/std/fake.py (original)
+++ pypy/dist/pypy/objspace/std/fake.py Thu Oct 27 00:03:54 2005
@@ -3,8 +3,8 @@
from pypy.interpreter import eval
from pypy.interpreter.function import Function, BuiltinFunction
from pypy.objspace.std.stdtypedef import *
-from pypy.objspace.std.objspace import W_Object, StdObjSpace
-from pypy.objspace.std.model import UnwrapError
+from pypy.objspace.std.objspace import StdObjSpace
+from pypy.objspace.std.model import W_Object, UnwrapError
# this file automatically generates non-reimplementations of CPython
# types that we do not yet implement in the standard object space
Modified: pypy/dist/pypy/objspace/std/listobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/listobject.py (original)
+++ pypy/dist/pypy/objspace/std/listobject.py Thu Oct 27 00:03:54 2005
@@ -5,7 +5,6 @@
from pypy.objspace.std import slicetype
from pypy.interpreter import gateway, baseobjspace
-from pypy.rpython.rarithmetic import r_uint
from pypy.objspace.std.listsort import TimSort
Modified: pypy/dist/pypy/objspace/std/longobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/longobject.py (original)
+++ pypy/dist/pypy/objspace/std/longobject.py Thu Oct 27 00:03:54 2005
@@ -1,8 +1,8 @@
-import sys, operator
+import sys
from pypy.objspace.std.objspace import *
from pypy.objspace.std.intobject import W_IntObject
from pypy.objspace.std.noneobject import W_NoneObject
-from pypy.rpython.rarithmetic import LONG_BIT, LONG_MASK, intmask, r_uint
+from pypy.rpython.rarithmetic import LONG_BIT, intmask, r_uint
import math
Modified: pypy/dist/pypy/objspace/std/longtype.py
==============================================================================
--- pypy/dist/pypy/objspace/std/longtype.py (original)
+++ pypy/dist/pypy/objspace/std/longtype.py Thu Oct 27 00:03:54 2005
@@ -1,11 +1,10 @@
from pypy.objspace.std.stdtypedef import *
from pypy.objspace.std.strutil import string_to_w_long, ParseStringError
from pypy.interpreter.error import OperationError
-from pypy.objspace.std.inttype import int_typedef
from pypy.interpreter.gateway import NoneNotWrapped
def descr__new__(space, w_longtype, w_x=0, w_base=NoneNotWrapped):
- from pypy.objspace.std.longobject import W_LongObject, args_from_long
+ from pypy.objspace.std.longobject import W_LongObject
w_value = w_x # 'x' is the keyword argument name in CPython
if w_base is None:
# check for easy cases
Modified: pypy/dist/pypy/objspace/std/objspace.py
==============================================================================
--- pypy/dist/pypy/objspace/std/objspace.py (original)
+++ pypy/dist/pypy/objspace/std/objspace.py Thu Oct 27 00:03:54 2005
@@ -2,7 +2,7 @@
from pypy.interpreter.baseobjspace import ObjSpace, BaseWrappable
from pypy.interpreter.error import OperationError, debug_print
from pypy.interpreter.typedef import get_unique_interplevel_subclass
-from pypy.interpreter.typedef import instantiate
+from pypy.rpython.objectmodel import instantiate
from pypy.interpreter.gateway import PyPyCacheDir
from pypy.tool.cache import Cache
from pypy.objspace.std.model import W_Object, UnwrapError
@@ -10,7 +10,6 @@
from pypy.objspace.std.multimethod import FailedToImplement
from pypy.objspace.descroperation import DescrOperation
from pypy.objspace.std import stdtypedef
-import types
import sys
import os
@@ -135,7 +134,7 @@
# generate on-the-fly
class Fake: pass
fake = Fake()
- import pypy.lib as lib
+ from pypy import lib
fname = os.path.join(os.path.split(lib.__file__)[0], pyname)
fake.filename = fname
fake.code = compile(file(fname).read(), fname, "exec")
Modified: pypy/dist/pypy/objspace/std/register_all.py
==============================================================================
--- pypy/dist/pypy/objspace/std/register_all.py (original)
+++ pypy/dist/pypy/objspace/std/register_all.py Thu Oct 27 00:03:54 2005
@@ -12,7 +12,8 @@
If the name doesn't exist then the alternative namespace is tried
for registration.
"""
- from pypy.objspace.std.objspace import StdObjSpace, W_ANY, W_Object
+ from pypy.objspace.std.objspace import StdObjSpace
+ from pypy.objspace.std.model import W_ANY, W_Object
namespaces = [StdObjSpace.MM, StdObjSpace]
if alt_ns:
namespaces.insert(0, alt_ns)
@@ -111,7 +112,7 @@
We try to add them in the order defined by the OP_CORRESPONDANCES
table, thus favouring swapping the arguments over negating the result.
"""
- from pypy.objspace.std.objspace import StdObjSpace, W_ANY
+ from pypy.objspace.std.objspace import StdObjSpace
originalentries = {}
for op in OPERATORS:
originalentries[op] = getattr(StdObjSpace.MM, op).signatures()
Modified: pypy/dist/pypy/objspace/std/stdtypedef.py
==============================================================================
--- pypy/dist/pypy/objspace/std/stdtypedef.py (original)
+++ pypy/dist/pypy/objspace/std/stdtypedef.py Thu Oct 27 00:03:54 2005
@@ -1,9 +1,10 @@
-from pypy.interpreter import eval, function, gateway
+from pypy.interpreter import gateway, baseobjspace, argument
from pypy.interpreter.error import OperationError
from pypy.interpreter.typedef import TypeDef, GetSetProperty, Member
from pypy.interpreter.typedef import descr_get_dict, descr_set_dict
from pypy.interpreter.baseobjspace import SpaceCache
-from pypy.objspace.std.model import MultiMethod, FailedToImplement
+from pypy.objspace.std.model import MultiMethod
+from pypy.objspace.std.multimethod import FailedToImplement
from pypy.tool.sourcetools import compile2
__all__ = ['StdTypeDef', 'newmethod', 'gateway',
@@ -246,13 +247,13 @@
def wrap_trampoline_in_gateway(func, methname, multimethod):
"""NOT_RPYTHON"""
- unwrap_spec = [gateway.ObjSpace] + [gateway.W_Root]*multimethod.arity
+ unwrap_spec = [baseobjspace.ObjSpace] + [baseobjspace.W_Root]*multimethod.arity
if multimethod.extras.get('varargs_w', False):
unwrap_spec.append('args_w')
if multimethod.extras.get('w_varargs', False):
unwrap_spec.append('w_args')
if multimethod.extras.get('general__args__', False):
- unwrap_spec.append(gateway.Arguments)
+ unwrap_spec.append(argument.Arguments)
return gateway.interp2app(func, app_name=methname, unwrap_spec=unwrap_spec)
def slicemultimethod(space, multimethod, typedef, result, local=False):
Modified: pypy/dist/pypy/objspace/std/stringobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/stringobject.py (original)
+++ pypy/dist/pypy/objspace/std/stringobject.py Thu Oct 27 00:03:54 2005
@@ -2,7 +2,7 @@
from pypy.objspace.std.objspace import *
from pypy.interpreter import gateway
-from pypy.rpython.rarithmetic import intmask, ovfcheck, _hash_string
+from pypy.rpython.rarithmetic import ovfcheck, _hash_string
from pypy.rpython.objectmodel import we_are_translated
from pypy.objspace.std.intobject import W_IntObject
from pypy.objspace.std.sliceobject import W_SliceObject
Modified: pypy/dist/pypy/objspace/std/strutil.py
==============================================================================
--- pypy/dist/pypy/objspace/std/strutil.py (original)
+++ pypy/dist/pypy/objspace/std/strutil.py Thu Oct 27 00:03:54 2005
@@ -2,7 +2,7 @@
Pure Python implementation of string utilities.
"""
-from pypy.rpython.rarithmetic import r_uint, ovfcheck, ovfcheck_float_to_int, parts_to_float
+from pypy.rpython.rarithmetic import ovfcheck, parts_to_float
from pypy.interpreter.error import OperationError
import math
More information about the Pypy-commit
mailing list