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

2020-11-10 Thread William Schwartz
Change by William Schwartz : -- nosy: +William.Schwartz ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2020-11-04 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2017-02-08 Thread Piotr Dobrogost
Changes by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker ___

[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-24 Thread Nick Coghlan
Nick Coghlan added the comment: Ah, very nice. (And no worries on taking an as-you-have-time approach to this - you'll see from the dates on some of the referenced issues below that even I'm in that situation where runpy is concerned) I think you're right that offering a 2-phase load/run API

[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 Nick Coghlan
Nick Coghlan added the comment: Thanks for the ping. The actual code changes look OK to me for the initially proposed design, which means the main missing piece would be documentation updates (both to the docstrings and to runpy module reference). However, thinking about how those docs might

[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 ___ ___ Python-bugs-list mailing 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 ___ ___

[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 like

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

2016-02-22 Thread Nick Coghlan
Nick Coghlan added the comment: The PSF also has a Contributor Licensing Agreement in place for contributions to CPython, so if you could sign that, that would be great: https://www.python.org/psf/contrib/contrib-form/ Highlights from a contributor point of view: - the CLA explicitly licenses

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

2016-02-22 Thread Nick Coghlan
Nick Coghlan added the comment: This seems like a reasonable enhancement to me, but I'd appreciate your thoughts on how it might relate to a couple of other proposed ideas: * Supporting execution-by-module-name in pdb et al: https://bugs.python.org/issue9325 * Supporting configurable target

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

2016-02-20 Thread Mike Kaplinskiy
Changes by Mike Kaplinskiy : -- keywords: +patch Added file: http://bugs.python.org/file41981/patch.diff ___ Python tracker

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

2016-02-18 Thread Eric Snow
Eric Snow added the comment: python-dev thread: https://mail.python.org/pipermail/python-dev/2016-February/143374.html Notably: https://github.com/pantsbuild/pex/pull/211 -- nosy: +eric.snow ___ Python tracker

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

2016-02-18 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list

[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