[pypy-svn] r73833 - in pypy/trunk/pypy: module/sys objspace/std

benjamin at codespeak.net benjamin at codespeak.net
Sat Apr 17 20:26:41 CEST 2010


Author: benjamin
Date: Sat Apr 17 20:26:39 2010
New Revision: 73833

Modified:
   pypy/trunk/pypy/module/sys/__init__.py
   pypy/trunk/pypy/objspace/std/objspace.py
Log:
move file system encoding initialization back to sys's initialization

Modified: pypy/trunk/pypy/module/sys/__init__.py
==============================================================================
--- pypy/trunk/pypy/module/sys/__init__.py	(original)
+++ pypy/trunk/pypy/module/sys/__init__.py	Sat Apr 17 20:26:39 2010
@@ -1,5 +1,6 @@
-from pypy.interpreter.mixedmodule import MixedModule 
+from pypy.interpreter.mixedmodule import MixedModule
 from pypy.interpreter.error import OperationError
+from pypy.module.sys.interp_encoding import _getfilesystemencoding
 
 class Module(MixedModule):
     """Sys Builtin Module. """
@@ -86,6 +87,9 @@
         w_modules = self.get('modules')
         self.space.setitem(w_modules, w_name, w_module)
 
+    def init(self, space):
+        self.filesystemencoding = _getfilesystemencoding(space)
+
     def getmodule(self, name): 
         space = self.space
         w_modules = self.get('modules') 

Modified: pypy/trunk/pypy/objspace/std/objspace.py
==============================================================================
--- pypy/trunk/pypy/objspace/std/objspace.py	(original)
+++ pypy/trunk/pypy/objspace/std/objspace.py	Sat Apr 17 20:26:39 2010
@@ -84,13 +84,6 @@
         if self.config.objspace.std.withtproxy:
             transparent.setup(self)
 
-    def startup(self):
-        from pypy.module.sys.interp_encoding import _getfilesystemencoding
-
-        ObjSpace.startup(self)
-        self.sys.filesystemencoding = _getfilesystemencoding(self)
-
-
     def get_builtin_types(self):
         return self.builtin_types
 



More information about the Pypy-commit mailing list