[Python-Dev] Issue 13524: subprocess on Windows
ncoghlan at gmail.com
Sun Dec 4 21:52:14 CET 2011
That's why I'm suggesting we look specifically at the cases where *Python*
misbehaves in an empty environment on Windows. Those are legitimately our
The problem in *general* is a platform one, so I don't think it makes sense
for us to modify the environment that has explicitly been passed in (e.g.
how would you test running without SystemRoot if subprocess added it
An extra parameter in the already confusing Popen signature wouldn't be
clearer than explicitly copying os.environ and modifying it.
Nick Coghlan (via Gmail on Android, so likely to be more terse than usual)
On Dec 4, 2011 10:22 PM, "Tim Golden" <mail at timgolden.me.uk> wrote:
> On 04/12/2011 11:42, Nick Coghlan wrote:
>> There's actually two questions to be answered:
>> 1. What should we do in 3.2 and 2.7?
>> 2. Should we do anything more in 3.3?
> 1. Unset 'SystemRoot' in a windows shell
>> 2. Run the test suite and observe the scale of the breakage
> Sorry; something I should have highlighted in the earlier post.
> Behaviour varies between Windows versions. On WinXP, if you
> unset SystemRoot in a cmd shell, you won't be able to run the
> test suite: Python won't even start up. On Win7 Python will
> start but, eg, the random module will fail.
> This is actually a separate issue: how much of Python will work
> without a valid SystemRoot. The OP's issue was that if you use
> subprocess to start an arbitrary process (you get the same problem
> if you try "notepad.exe") and pass it an env block without a valid
> SystemRoot then that process will likely fail to start up. And it
> won't be obvious why.
> The case where someone tries to run Python (in general) without
> a valid SystemRoot is a tiny cornercase and you'd be quite right
> to push that back and say "Don't do that". I don't believe we have
> to test for it or add code to work around it.
> While I put the idea forward, I agree that an exception is more likely
> than not to break existing code. I just can't see any clear alternative,
> apart from option 1: we do nothing.
> Python-Dev mailing list
> Python-Dev at python.org
> Unsubscribe: http://mail.python.org/**mailman/options/python-dev/**
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev