[pypy-svn] r5077 - pypy/trunk/src/pypy/objspace/std

mwh at codespeak.net mwh at codespeak.net
Sat Jun 12 17:45:00 CEST 2004


Author: mwh
Date: Sat Jun 12 17:44:59 2004
New Revision: 5077

Modified:
   pypy/trunk/src/pypy/objspace/std/boolobject.py
   pypy/trunk/src/pypy/objspace/std/cpythonobject.py
   pypy/trunk/src/pypy/objspace/std/default.py
   pypy/trunk/src/pypy/objspace/std/dictobject.py
   pypy/trunk/src/pypy/objspace/std/floatobject.py
   pypy/trunk/src/pypy/objspace/std/intobject.py
   pypy/trunk/src/pypy/objspace/std/inttype.py
   pypy/trunk/src/pypy/objspace/std/listobject.py
   pypy/trunk/src/pypy/objspace/std/listtype.py
   pypy/trunk/src/pypy/objspace/std/longobject.py
   pypy/trunk/src/pypy/objspace/std/longtype.py
   pypy/trunk/src/pypy/objspace/std/objecttype.py
   pypy/trunk/src/pypy/objspace/std/objspace.py
   pypy/trunk/src/pypy/objspace/std/stringobject.py
   pypy/trunk/src/pypy/objspace/std/tupleobject.py
Log:
mass unrelativization of imports in the std objspace.


Modified: pypy/trunk/src/pypy/objspace/std/boolobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/boolobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/boolobject.py	Sat Jun 12 17:44:59 2004
@@ -1,9 +1,9 @@
 from pypy.objspace.std.objspace import *
-import intobject
+from pypy.objspace.std import intobject
 
 
 class W_BoolObject(W_Object):
-    from booltype import bool_typedef as typedef
+    from pypy.objspace.std.booltype import bool_typedef as typedef
 
     def __init__(w_self, space, boolval):
         W_Object.__init__(w_self, space)

Modified: pypy/trunk/src/pypy/objspace/std/cpythonobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/cpythonobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/cpythonobject.py	Sat Jun 12 17:44:59 2004
@@ -3,7 +3,7 @@
 
 from pypy.objspace.std.objspace import *
 from pypy.interpreter.function import Function
-from default import UnwrapError
+from pypy.objspace.std.default import UnwrapError
 import sys, operator, types
 
 class W_BuiltinFunctionObject(Function):

Modified: pypy/trunk/src/pypy/objspace/std/default.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/default.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/default.py	Sat Jun 12 17:44:59 2004
@@ -8,7 +8,7 @@
 
 def id__ANY(space, w_obj):
     #print 'id:', w_obj
-    import intobject
+    from pypy.objspace.std import intobject
     return intobject.W_IntObject(space, id(w_obj))
 
 # __init__ should succeed if called internally as a multimethod

Modified: pypy/trunk/src/pypy/objspace/std/dictobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/dictobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/dictobject.py	Sat Jun 12 17:44:59 2004
@@ -8,7 +8,7 @@
 from pypy.objspace.std.objspace import *
 from pypy.interpreter import gateway
 
-from restricted_int import r_uint
+from pypy.objspace.std.restricted_int import r_uint
 
 dummy = object()
 
@@ -155,7 +155,7 @@
 dict_has_key__Dict_ANY = contains__Dict_ANY
 
 def iter__Dict(space, w_dict):
-    import iterobject
+    from pypy.objspace.std import iterobject
     w_keys = dict_keys__Dict(space, w_dict)
     return iterobject.W_SeqIterObject(space, w_keys)
     

Modified: pypy/trunk/src/pypy/objspace/std/floatobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/floatobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/floatobject.py	Sat Jun 12 17:44:59 2004
@@ -1,5 +1,5 @@
 from pypy.objspace.std.objspace import *
-from noneobject import W_NoneObject
+from pypy.objspace.std.noneobject import W_NoneObject
 
 ##############################################################
 # for the time being, all calls that are made to some external
@@ -8,7 +8,7 @@
 ##############################################################
 
 import math
-from intobject import W_IntObject
+from pypy.objspace.std.intobject import W_IntObject
 
 class W_FloatObject(W_Object):
     """This is a reimplementation of the CPython "PyFloatObject" 

Modified: pypy/trunk/src/pypy/objspace/std/intobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/intobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/intobject.py	Sat Jun 12 17:44:59 2004
@@ -1,6 +1,6 @@
 from pypy.objspace.std.objspace import *
-from noneobject import W_NoneObject
-from restricted_int import r_int, LONG_BIT
+from pypy.objspace.std.noneobject import W_NoneObject
+from pypy.objspace.std.restricted_int import r_int, LONG_BIT
 
 """
 The implementation of integers is a bit difficult,
@@ -18,7 +18,7 @@
 """
 
 class W_IntObject(W_Object):
-    from inttype import int_typedef as typedef
+    from pypy.objspace.std.inttype import int_typedef as typedef
     
     def __init__(w_self, space, intval):
         W_Object.__init__(w_self, space)

Modified: pypy/trunk/src/pypy/objspace/std/inttype.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/inttype.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/inttype.py	Sat Jun 12 17:44:59 2004
@@ -2,7 +2,7 @@
 from pypy.interpreter.error import OperationError
 
 def descr__new__(space, w_inttype, w_value=None, w_base=None):
-    from intobject import W_IntObject
+    from pypy.objspace.std.intobject import W_IntObject
     if w_base is None:
         w_base = space.w_None
     if w_value is None:

Modified: pypy/trunk/src/pypy/objspace/std/listobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/listobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/listobject.py	Sat Jun 12 17:44:59 2004
@@ -1,11 +1,11 @@
 from pypy.objspace.std.objspace import *
-from intobject import W_IntObject
-from sliceobject import W_SliceObject
-from tupleobject import W_TupleObject
+from pypy.objspace.std.intobject import W_IntObject
+from pypy.objspace.std.sliceobject import W_SliceObject
+from pypy.objspace.std.tupleobject import W_TupleObject
 
-import slicetype
+from pypy.objspace.std import slicetype
 from pypy.interpreter import gateway
-from restricted_int import r_int, r_uint
+from pypy.objspace.std.restricted_int import r_int, r_uint
 
 
 class W_ListObject(W_Object):
@@ -90,7 +90,7 @@
     return w_res
 
 def iter__List(space, w_list):
-    import iterobject
+    from pypy.objspace.std import iterobject
     return iterobject.W_SeqIterObject(space, w_list)
 
 def add__List_List(space, w_list1, w_list2):

Modified: pypy/trunk/src/pypy/objspace/std/listtype.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/listtype.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/listtype.py	Sat Jun 12 17:44:59 2004
@@ -14,7 +14,7 @@
 # ____________________________________________________________
 
 def descr__new__(space, w_listtype, *args_w, **kwds_w):
-    from listobject import W_ListObject
+    from pypy.objspace.std.listobject import W_ListObject
     w_obj = space.allocate_instance(W_ListObject, w_listtype)
     w_obj.__init__(space, [])
     return w_obj

Modified: pypy/trunk/src/pypy/objspace/std/longobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/longobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/longobject.py	Sat Jun 12 17:44:59 2004
@@ -1,8 +1,8 @@
 import sys
 from pypy.objspace.std.objspace import *
-from intobject import W_IntObject
-from floatobject import W_FloatObject
-from noneobject import W_NoneObject
+from pypy.objspace.std.intobject import W_IntObject
+from pypy.objspace.std.floatobject import W_FloatObject
+from pypy.objspace.std.noneobject import W_NoneObject
 
 class W_LongObject(W_Object):
     """This is a non-reimplementation of longs.

Modified: pypy/trunk/src/pypy/objspace/std/longtype.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/longtype.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/longtype.py	Sat Jun 12 17:44:59 2004
@@ -1,7 +1,7 @@
 from pypy.objspace.std.stdtypedef import *
 
 def descr__new__(space, w_longtype, w_value=None):
-    from longobject import W_LongObject
+    from pypy.objspace.std.longobject import W_LongObject
     if w_value is None:
         value = 0L
     elif space.is_true(space.isinstance(w_value, space.w_str)):

Modified: pypy/trunk/src/pypy/objspace/std/objecttype.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/objecttype.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/objecttype.py	Sat Jun 12 17:44:59 2004
@@ -23,7 +23,7 @@
 
 def descr__new__(space, w_type, *args_w, **kwds_w):
     # XXX 2.2 behavior: ignoring all arguments
-    from objectobject import W_ObjectObject
+    from pypy.objspace.std.objectobject import W_ObjectObject
     w_obj = space.allocate_instance(W_ObjectObject, w_type)
     w_obj.__init__(space)
     return w_obj

Modified: pypy/trunk/src/pypy/objspace/std/objspace.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/objspace.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/objspace.py	Sat Jun 12 17:44:59 2004
@@ -53,17 +53,17 @@
         class result:
             "Import here the types you want to have appear in __builtin__."
 
-            from objecttype import object_typedef
-            from booltype   import bool_typedef
-            from inttype    import int_typedef
-            from floattype  import float_typedef
-            from tupletype  import tuple_typedef
-            from listtype   import list_typedef
-            from dicttype   import dict_typedef
-            from stringtype import str_typedef
-            from typetype   import type_typedef
-            from slicetype  import slice_typedef
-            from longtype   import long_typedef
+            from pypy.objspace.std.objecttype import object_typedef
+            from pypy.objspace.std.booltype   import bool_typedef
+            from pypy.objspace.std.inttype    import int_typedef
+            from pypy.objspace.std.floattype  import float_typedef
+            from pypy.objspace.std.tupletype  import tuple_typedef
+            from pypy.objspace.std.listtype   import list_typedef
+            from pypy.objspace.std.dicttype   import dict_typedef
+            from pypy.objspace.std.stringtype import str_typedef
+            from pypy.objspace.std.typetype   import type_typedef
+            from pypy.objspace.std.slicetype  import slice_typedef
+            from pypy.objspace.std.longtype   import long_typedef
 	return [value for key, value in result.__dict__.items()
                       if not key.startswith('_')]   # don't look
 
@@ -139,19 +139,19 @@
         # The object implementations that we want to 'link' into PyPy must be
         # imported here.  This registers them into the multimethod tables,
         # *before* the type objects are built from these multimethod tables.
-        import objectobject
-        import boolobject
-        import intobject
-        import floatobject
-        import tupleobject
-        import listobject
-        import dictobject
-        import stringobject
-        import typeobject
-        import sliceobject
-        import longobject
-        import noneobject
-	import cpythonobject
+        from pypy.objspace.std import objectobject
+        from pypy.objspace.std import boolobject
+        from pypy.objspace.std import intobject
+        from pypy.objspace.std import floatobject
+        from pypy.objspace.std import tupleobject
+        from pypy.objspace.std import listobject
+        from pypy.objspace.std import dictobject
+        from pypy.objspace.std import stringobject
+        from pypy.objspace.std import typeobject
+        from pypy.objspace.std import sliceobject
+        from pypy.objspace.std import longobject
+        from pypy.objspace.std import noneobject
+	from pypy.objspace.std import cpythonobject
 	# hack to avoid imports in the time-critical functions below
         global W_ObjectObject, W_BoolObject, W_IntObject, W_FloatObject
 	global W_TupleObject, W_ListObject, W_DictObject, W_StringObject

Modified: pypy/trunk/src/pypy/objspace/std/stringobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/stringobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/stringobject.py	Sat Jun 12 17:44:59 2004
@@ -73,19 +73,19 @@
 
 from pypy.objspace.std.objspace import *
 from pypy.interpreter import gateway
-from intobject   import W_IntObject
-from sliceobject import W_SliceObject
-import slicetype
-from listobject import W_ListObject
-from noneobject import W_NoneObject
-from tupleobject import W_TupleObject
+from pypy.objspace.std.intobject   import W_IntObject
+from pypy.objspace.std.sliceobject import W_SliceObject
+from pypy.objspace.std import slicetype
+from pypy.objspace.std.listobject import W_ListObject
+from pypy.objspace.std.noneobject import W_NoneObject
+from pypy.objspace.std.tupleobject import W_TupleObject
 
 # XXX consider reimplementing _value to be a list of characters
 #     instead of a plain string
 
 
 class W_StringObject(W_Object):
-    from stringtype import str_typedef as typedef
+    from pypy.objspace.std.stringtype import str_typedef as typedef
 
     def __init__(w_self, space, str):
         W_Object.__init__(w_self, space)
@@ -933,7 +933,7 @@
 
 
 def iter__String(space, w_list):
-    import iterobject
+    from pypy.objspace.std import iterobject
     return iterobject.W_SeqIterObject(space, w_list)
 
 

Modified: pypy/trunk/src/pypy/objspace/std/tupleobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/tupleobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/tupleobject.py	Sat Jun 12 17:44:59 2004
@@ -1,7 +1,7 @@
 from pypy.objspace.std.objspace import *
-from intobject import W_IntObject
-from sliceobject import W_SliceObject
-import slicetype
+from pypy.objspace.std.intobject import W_IntObject
+from pypy.objspace.std.sliceobject import W_SliceObject
+from pypy.objspace.std import slicetype
 
 
 class W_TupleObject(W_Object):
@@ -49,7 +49,7 @@
     return W_TupleObject(space, subitems)
 
 def iter__Tuple(space, w_tuple):
-    import iterobject
+    from pypy.objspace.std import iterobject
     return iterobject.W_SeqIterObject(space, w_tuple)
 
 def add__Tuple_Tuple(space, w_tuple1, w_tuple2):



More information about the Pypy-commit mailing list