[pypy-commit] pypy py3.5: Back out ce4d4b3c159f, i.e. redo 26dfa2f67afd, in the py3.5 branch where

arigo pypy.commits at gmail.com
Tue Sep 13 05:44:15 EDT 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r87067:438fce751fce
Date: 2016-09-13 11:43 +0200
http://bitbucket.org/pypy/pypy/changeset/438fce751fce/

Log:	Back out ce4d4b3c159f, i.e. redo 26dfa2f67afd, in the py3.5 branch
	where imports are done differently. I'll see what exactly this
	breaks in py3.5 before deciding something, e.g., a space option we'd
	need to set in the tests that do break. I'm not doing it in py3k
	this time.

diff --git a/pypy/module/sys/__init__.py b/pypy/module/sys/__init__.py
--- a/pypy/module/sys/__init__.py
+++ b/pypy/module/sys/__init__.py
@@ -139,10 +139,16 @@
         space = self.space
 
         if not space.config.translating:
-            from pypy.module.sys.interp_encoding import _getfilesystemencoding
-            self.filesystemencoding = _getfilesystemencoding(space)
+            ##from pypy.module.sys.interp_encoding import _getfilesystemencoding
+            ##self.filesystemencoding = _getfilesystemencoding(space)
             # XXX the two lines above take a few seconds to run whenever
-            # we initialize the space
+            # we initialize the space; for tests, use a simpler version.
+            # Check what exactly breaks, if anything, in py3.5.  This is
+            # not strictly necessary but is an extremely nice-to-have
+            # feature: running just one test for example take 3.5
+            # seconds instead of 11.
+            from pypy.module.sys.interp_encoding import base_encoding
+            self.filesystemencoding = base_encoding
 
     def flush_std_files(self, space):
         w_stdout = space.sys.getdictvalue(space, 'stdout')


More information about the pypy-commit mailing list