[issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-10-29 Thread Mike Kaplinskiy
Mike Kaplinskiy added the comment: Hey Nick, Definitely agree that this refactor is big enough to try adding target modules. There's a somewhat hidden feature in the second patch that does this: `use_globals_from_sys_modules` takes `sys.globals` from the `sys.modules` entry for the module

[issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-10-23 Thread Mike Kaplinskiy
Mike Kaplinskiy added the comment: Hey Nick, Sorry for the long delay. Unfortunately Python isn't my main work language anymore so working on this has proved to be quite a context switch. I'm going to try to finish this up now. The attached patch implements a new pattern for wrapping runpy

[issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-04-06 Thread Mike Kaplinskiy
Mike Kaplinskiy added the comment: ping -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26388> ___ ___ Python-bugs-list

[issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-02-23 Thread Mike Kaplinskiy
Mike Kaplinskiy added the comment: So how might I get this patch committed? :) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-02-22 Thread Mike Kaplinskiy
Mike Kaplinskiy added the comment: Looks like by signed CLA just made it through, so that should be settled. For the other bugs, it seems that overloading run_module & run_path seems to be getting a bit cumbersome, so it might make sense to have some sort of Runner object that has things

[issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-02-20 Thread Mike Kaplinskiy
Changes by Mike Kaplinskiy <mike.kaplins...@gmail.com>: -- keywords: +patch Added file: http://bugs.python.org/file41981/patch.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-02-18 Thread Mike Kaplinskiy
New submission from Mike Kaplinskiy: For the purposes of pex (https://github.com/pantsbuild/pex), it would be useful to allow calling run_module without sys.argv[0] changing. In general, this behavior is useful if the script intends to re-exec itself (so it needs to know the original