Re: [Python-Dev] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-02-22 Thread Nick Coghlan
On 17 February 2016 at 15:42, Gregory P. Smith wrote: > sys.argv represents the C main() argv array. Your inclination (in the > linked to bug above) to leave sys.argv[0] alone is a good one. > No, it doesn't - it represents the state of argv *after* CPython's main function is

Re: [Python-Dev] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-02-18 Thread Mike Kaplinskiy
Done: http://bugs.python.org/issue26388 On Wed, Feb 17, 2016 at 10:44 AM, Brett Cannon wrote: > > > On Tue, 16 Feb 2016 at 20:59 Mike Kaplinskiy > wrote: > >> Hey folks, >> >> I hope this is the right list for this sort of thing (python-ideas seemed

Re: [Python-Dev] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-02-17 Thread Brett Cannon
On Tue, 16 Feb 2016 at 20:59 Mike Kaplinskiy wrote: > Hey folks, > > I hope this is the right list for this sort of thing (python-ideas seemed > more far-fetched). > > For some context: there is currently a issue with pex that causes > sys.modules lookups to stop

Re: [Python-Dev] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-02-17 Thread Mike Kaplinskiy
On Tue, Feb 16, 2016 at 9:42 PM, Gregory P. Smith wrote: > > On Tue, Feb 16, 2016 at 9:00 PM Mike Kaplinskiy > wrote: > >> Hey folks, >> >> I hope this is the right list for this sort of thing (python-ideas seemed >> more far-fetched). >> >> For some

Re: [Python-Dev] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-02-16 Thread Gregory P. Smith
On Tue, Feb 16, 2016 at 9:00 PM Mike Kaplinskiy wrote: > Hey folks, > > I hope this is the right list for this sort of thing (python-ideas seemed > more far-fetched). > > For some context: there is currently a issue with pex that causes > sys.modules lookups to stop

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

2016-02-16 Thread Mike Kaplinskiy
Hey folks, I hope this is the right list for this sort of thing (python-ideas seemed more far-fetched). For some context: there is currently a issue with pex that causes sys.modules lookups to stop working for __main__. In turns this makes unittest.run() & pkg_resources.resource_* fail. The root