[pypy-svn] r70071 - in pypy/branch/import-builtin/pypy: config doc/config module/imp module/zipimport/test

afa at codespeak.net afa at codespeak.net
Fri Dec 11 17:43:08 CET 2009


Author: afa
Date: Fri Dec 11 17:43:07 2009
New Revision: 70071

Added:
   pypy/branch/import-builtin/pypy/doc/config/objspace.usemodules.imp.txt
Modified:
   pypy/branch/import-builtin/pypy/config/pypyoption.py
   pypy/branch/import-builtin/pypy/module/imp/__init__.py
   pypy/branch/import-builtin/pypy/module/imp/importing.py
   pypy/branch/import-builtin/pypy/module/zipimport/test/test_zipimport.py
Log:
More fixes after running tests on builtbot


Modified: pypy/branch/import-builtin/pypy/config/pypyoption.py
==============================================================================
--- pypy/branch/import-builtin/pypy/config/pypyoption.py	(original)
+++ pypy/branch/import-builtin/pypy/config/pypyoption.py	Fri Dec 11 17:43:07 2009
@@ -16,7 +16,7 @@
 
 default_modules = essential_modules.copy()
 default_modules.update(dict.fromkeys(
-    ["_codecs", "gc", "_weakref", "marshal", "errno",
+    ["_codecs", "gc", "_weakref", "marshal", "errno", "imp",
      "math", "_sre", "_pickle_support", "operator",
      "parser", "symbol", "token", "_ast", "_random", "__pypy__",
      "_testing"]))

Added: pypy/branch/import-builtin/pypy/doc/config/objspace.usemodules.imp.txt
==============================================================================
--- (empty file)
+++ pypy/branch/import-builtin/pypy/doc/config/objspace.usemodules.imp.txt	Fri Dec 11 17:43:07 2009
@@ -0,0 +1,2 @@
+Use the 'imp' module.
+This module is included by default.

Modified: pypy/branch/import-builtin/pypy/module/imp/__init__.py
==============================================================================
--- pypy/branch/import-builtin/pypy/module/imp/__init__.py	(original)
+++ pypy/branch/import-builtin/pypy/module/imp/__init__.py	Fri Dec 11 17:43:07 2009
@@ -10,6 +10,7 @@
         'PY_COMPILED':     'space.wrap(importing.PY_COMPILED)',
         'PKG_DIRECTORY':   'space.wrap(importing.PKG_DIRECTORY)',
         'C_BUILTIN':       'space.wrap(importing.C_BUILTIN)',
+        'C_EXTENSION':     'space.wrap(importing.C_EXTENSION)',
         'get_suffixes':    'interp_imp.get_suffixes',
 
         'get_magic':       'interp_imp.get_magic',

Modified: pypy/branch/import-builtin/pypy/module/imp/importing.py
==============================================================================
--- pypy/branch/import-builtin/pypy/module/imp/importing.py	(original)
+++ pypy/branch/import-builtin/pypy/module/imp/importing.py	Fri Dec 11 17:43:07 2009
@@ -17,9 +17,13 @@
 SEARCH_ERROR = 0
 PY_SOURCE = 1
 PY_COMPILED = 2
-PKG_DIRECTORY = 3
-C_BUILTIN = 4
-IMP_HOOK = 5
+C_EXTENSION = 3
+# PY_RESOURCE = 4
+PKG_DIRECTORY = 5
+C_BUILTIN = 6
+# PY_FROZEN = 7
+# PY_CODERESOURCE = 8
+IMP_HOOK = 9
 
 def find_modtype(space, filepart):
     """Check which kind of module to import for the given filepart,

Modified: pypy/branch/import-builtin/pypy/module/zipimport/test/test_zipimport.py
==============================================================================
--- pypy/branch/import-builtin/pypy/module/zipimport/test/test_zipimport.py	(original)
+++ pypy/branch/import-builtin/pypy/module/zipimport/test/test_zipimport.py	Fri Dec 11 17:43:07 2009
@@ -4,7 +4,7 @@
 import py
 import time
 import struct
-from pypy.module.__builtin__.importing import get_pyc_magic, _w_long
+from pypy.module.imp.importing import get_pyc_magic, _w_long
 from StringIO import StringIO
 
 from pypy.tool.udir import udir



More information about the Pypy-commit mailing list