Amaury Forgeot d'Arc avatar Amaury Forgeot d'Arc committed 24918e8

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

Comments (0)

Files changed (1)

pypy/module/sys/__init__.py

             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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.