Commits

Philip Jenvey  committed b402af2 Merge

merge default

  • Participants
  • Parent commits 460b29c, f2f4cb4
  • Branches py3k

Comments (0)

Files changed (9)

File pypy/annotation/signature.py

         inputcells[:] = args_s
 
 def finish_type(paramtype, bookkeeper, func):
-    from pypy.annotation.types import SelfTypeMarker
+    from pypy.rlib.types import SelfTypeMarker
     if isinstance(paramtype, SomeObject):
         return paramtype
     elif isinstance(paramtype, SelfTypeMarker):

File pypy/annotation/types.py

-from pypy.annotation import model
-from pypy.annotation.listdef import ListDef
-from pypy.annotation.dictdef import DictDef
-
-
-def none():
-    return model.s_None
-
-
-def float():
-    return model.SomeFloat()
-
-def singlefloat():
-    return model.SomeSingleFloat()
-
-def longfloat():
-    return model.SomeLongFloat()
-
-
-def int():
-    return model.SomeInteger()
-
-
-def unicode():
-    return model.SomeUnicodeString()
-
-def unicode0():
-    return model.SomeUnicodeString(no_nul=True)
-
-def str():
-    return model.SomeString()
-
-def str0():
-    return model.SomeString(no_nul=True)
-
-def char():
-    return model.SomeChar()
-
-
-def list(element):
-    listdef = ListDef(None, element, mutated=True, resized=True)
-    return model.SomeList(listdef)
-
-def array(element):
-    listdef = ListDef(None, element, mutated=True, resized=False)
-    return model.SomeList(listdef)
-
-def dict(keytype, valuetype):
-    dictdef = DictDef(None, keytype, valuetype)
-    return model.SomeDict(dictdef)
-
-
-def instance(class_):
-    return lambda bookkeeper: model.SomeInstance(bookkeeper.getuniqueclassdef(class_))
-
-class SelfTypeMarker(object):
-    pass
-
-def self():
-    return SelfTypeMarker()

File pypy/module/posix/test/test_posix2.py

 import signal
 
 def setup_module(mod):
+    usemodules = ['binascii', 'posix', 'struct', 'rctime']
     if os.name != 'nt':
-        mod.space = gettestobjspace(usemodules=['posix', 'fcntl', 'struct', 'signal'])
+        usemodules += ['fcntl']
     else:
         # On windows, os.popen uses the subprocess module
-        mod.space = gettestobjspace(usemodules=['posix', '_rawffi', 'thread', 'struct', 'signal'])
+        usemodules += ['_rawffi', 'thread']
+    mod.space = gettestobjspace(usemodules=usemodules)
     mod.path = udir.join('posixtestfile.txt')
     mod.path.write("this is a test")
     mod.path2 = udir.join('test_posix2-')
 
 
 class AppTestPosix:
-    spaceconfig = {
-        "usemodules": ["binascii", "struct", "rctime"],
-    }
 
     def setup_class(cls):
         cls.space = space

File pypy/rlib/objectmodel.py

 RPython-compliant way.
 """
 
+from __future__ import absolute_import
+
 import py
 import sys
 import types

File pypy/rlib/rgc.py

+from __future__ import absolute_import
+
 import gc
 import types
 

File pypy/rlib/signature.py

-from pypy.annotation import types
+from pypy.rlib import types
 
 def signature(*paramtypes, **kwargs):
     """Decorate a function to specify its type signature.

File pypy/rlib/test/test_objectmodel.py

 import py
 from pypy.rlib.objectmodel import *
-from pypy.annotation import types, model
+from pypy.rlib import types
+from pypy.annotation import model
 from pypy.translator.translator import TranslationContext, graphof
 from pypy.rpython.test.tool import BaseRtypingTest, LLRtypeMixin, OORtypeMixin
 from pypy.rpython.test.test_llinterp import interpret

File pypy/rlib/test/test_signature.py

 import py
 from pypy.rlib.signature import signature, finishsigs
-from pypy.annotation import types, model
+from pypy.rlib import types
+from pypy.annotation import model
 from pypy.translator.translator import TranslationContext, graphof
 
 

File pypy/rlib/types.py

+from pypy.annotation import model
+from pypy.annotation.listdef import ListDef
+from pypy.annotation.dictdef import DictDef
+
+
+def none():
+    return model.s_None
+
+
+def float():
+    return model.SomeFloat()
+
+def singlefloat():
+    return model.SomeSingleFloat()
+
+def longfloat():
+    return model.SomeLongFloat()
+
+
+def int():
+    return model.SomeInteger()
+
+
+def unicode():
+    return model.SomeUnicodeString()
+
+def str():
+    return model.SomeString()
+
+def char():
+    return model.SomeChar()
+
+
+def list(element):
+    listdef = ListDef(None, element, mutated=True, resized=True)
+    return model.SomeList(listdef)
+
+def array(element):
+    listdef = ListDef(None, element, mutated=True, resized=False)
+    return model.SomeList(listdef)
+
+def dict(keytype, valuetype):
+    dictdef = DictDef(None, keytype, valuetype)
+    return model.SomeDict(dictdef)
+
+
+def instance(class_):
+    return lambda bookkeeper: model.SomeInstance(bookkeeper.getuniqueclassdef(class_))
+
+class SelfTypeMarker(object):
+    pass
+
+def self():
+    return SelfTypeMarker()