[pypy-svn] pypy default: On windows, fix sys.executable on top of bin/py.py: sys.__dict__ must not be

amauryfa commits-noreply at bitbucket.org
Mon Mar 21 20:09:05 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: 
Changeset: r42822:24918e8d21f9
Date: 2011-03-21 20:09 +0100
http://bitbucket.org/pypy/pypy/changeset/24918e8d21f9/

Log:	On windows, fix sys.executable on top of bin/py.py: sys.__dict__
	must not be realized before py.py startup code overrides
	sys.executable with its own value.

	This fixes a test in pypy/interpreter/test/test_zpy.py

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
@@ -110,7 +110,7 @@
             if _WIN:
                 from pypy.module.sys import vm
                 w_handle = vm.get_dllhandle(space)
-                space.setattr(self, space.wrap("dllhandle"), w_handle)
+                space.setitem(self.w_dict, space.wrap("dllhandle"), w_handle)
 
     def getmodule(self, name):
         space = self.space


More information about the Pypy-commit mailing list