[pypy-svn] r57457 - pypy/branch/2.5-features/pypy/module/__builtin__

cfbolz at codespeak.net cfbolz at codespeak.net
Tue Aug 19 10:53:30 CEST 2008


Author: cfbolz
Date: Tue Aug 19 10:53:29 2008
New Revision: 57457

Modified:
   pypy/branch/2.5-features/pypy/module/__builtin__/importing.py
Log:
use the unwrap_spec for this unwrapping


Modified: pypy/branch/2.5-features/pypy/module/__builtin__/importing.py
==============================================================================
--- pypy/branch/2.5-features/pypy/module/__builtin__/importing.py	(original)
+++ pypy/branch/2.5-features/pypy/module/__builtin__/importing.py	Tue Aug 19 10:53:29 2008
@@ -152,8 +152,7 @@
     return None
 
 def importhook(space, modulename, w_globals=None,
-               w_locals=None, w_fromlist=None, w_level=-1):
-    level = space.int_w(w_level)
+               w_locals=None, w_fromlist=None, level=-1):
     if not modulename and level < 0: 
         raise OperationError(
             space.w_ValueError,
@@ -213,7 +212,7 @@
         space.setitem(space.sys.get('modules'), w(rel_modulename),space.w_None)
     return w_mod
 #
-importhook.unwrap_spec = [ObjSpace,str,W_Root,W_Root,W_Root,W_Root]
+importhook.unwrap_spec = [ObjSpace, str, W_Root, W_Root, W_Root, int]
 
 def absolute_import(space, modulename, baselevel, w_fromlist, tentative):
     lock = getimportlock(space)



More information about the Pypy-commit mailing list