Re: [Python-Dev] Issue 13524: subprocess on Windows

2012-03-23 Thread Brad Allen
On Fri, Mar 23, 2012 at 3:46 PM, Glyph gl...@twistedmatrix.com wrote: On Mar 23, 2012, at 1:26 PM, Brad Allen wrote: Thanks, Glyph. In that case maybe the Python subprocess docs need not single out SystemRoot, but instead plaster a big warning around the use of the 'env' parameter. I

Re: [Python-Dev] Issue 13524: subprocess on Windows

2012-03-22 Thread Glyph Lefkowitz
On Mar 21, 2012, at 4:38 PM, Brad Allen wrote: I tripped over this one trying to make one of our Python at work Windows compatible. We had no idea that a magic 'SystemRoot' environment variable would be required, and it was causing issues for pyzmq. It might be nice to reflect the findings

Re: [Python-Dev] Issue 13524: subprocess on Windows

2012-03-21 Thread Brad Allen
I tripped over this one trying to make one of our Python at work Windows compatible. We had no idea that a magic 'SystemRoot' environment variable would be required, and it was causing issues for pyzmq. It might be nice to reflect the findings of this email thread on the subprocess documentation

Re: [Python-Dev] Issue 13524: subprocess on Windows

2011-12-05 Thread Martin v. Löwis
Thoughts? Apparently, there are at least two users of SystemRoot: - side-by-side (fusion?) apparently uses it to locate the WinSxS folder, at least on some Windows releases, - certain registry keys contain SystemRoot, in particular the path names of crypto providers (this apparently is XP

Re: [Python-Dev] Issue 13524: subprocess on Windows

2011-12-05 Thread Tim Golden
On 05/12/2011 08:10, Martin v. Löwis wrote: I agree with Nick that we shouldn't do anything except perhaps for documentation changes. There are many other environment variables whose absence could also cause failures to run the executable, such as PATH, LD_LIBRARY_PATH, etc. Even not passing

Re: [Python-Dev] Issue 13524: subprocess on Windows

2011-12-05 Thread Nick Coghlan
On Mon, Dec 5, 2011 at 7:01 PM, Tim Golden m...@timgolden.me.uk wrote: We could probably do with a HOWTO (or blog post or whatever) on using subprocess on Windows, not least because a fair amount of the docs are Unix-centric and actually very slightly confusing for naive Windows-based

[Python-Dev] Issue 13524: subprocess on Windows

2011-12-04 Thread Tim Golden
http://bugs.python.org/issue13524 Someone raised issue13524 yesterday to illustrate that a subprocess will crash immediately if an environment block is passed which does not contain a valid SystemRoot environment variable. Note that the calling (Python) process is unaffected; this isn't -

Re: [Python-Dev] Issue 13524: subprocess on Windows

2011-12-04 Thread Nick Coghlan
On Sun, Dec 4, 2011 at 8:59 PM, Tim Golden m...@timgolden.me.uk wrote: So... what's our take on this? As I see it we could: 1) Do nothing: it's the caller's responsibility to understand the   complications of the chosen Operating System. 2) Add a doc warning (ironically, considering the

Re: [Python-Dev] Issue 13524: subprocess on Windows

2011-12-04 Thread Tim Golden
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? Agreed. 1. Unset 'SystemRoot' in a windows shell 2. Run the test suite and observe the scale of the breakage Sorry; something I

Re: [Python-Dev] Issue 13524: subprocess on Windows

2011-12-04 Thread Paul Moore
On 4 December 2011 12:20, Tim Golden m...@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? See below... This is actually a separate issue: how much of

Re: [Python-Dev] Issue 13524: subprocess on Windows

2011-12-04 Thread Tim Golden
On 04/12/2011 12:41, Paul Moore wrote: I'm not 100% clear on the problem here. From how I'm reading things, the problem is that not supplying SystemRoot will cause (some or all) invocations of subprocess.Popen to fail - it's not specific to starting Python. That's basically the situation.

Re: [Python-Dev] Issue 13524: subprocess on Windows

2011-12-04 Thread Martin Packman
On 04/12/2011, Tim Golden m...@timgolden.me.uk wrote: Someone raised issue13524 yesterday to illustrate that a subprocess will crash immediately if an environment block is passed which does not contain a valid SystemRoot environment variable. ... 2) Add a doc warning (ironically, considering

Re: [Python-Dev] Issue 13524: subprocess on Windows

2011-12-04 Thread Nick Coghlan
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 issue. 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

Re: [Python-Dev] Issue 13524: subprocess on Windows

2011-12-04 Thread Terry Reedy
On 12/4/2011 5:59 AM, Tim Golden wrote: http://bugs.python.org/issue13524 Someone raised issue13524 yesterday to illustrate that a subprocess will crash immediately if an environment block is passed which does not contain a valid SystemRoot environment variable. Note that the calling (Python)

Re: [Python-Dev] Issue 13524: subprocess on Windows

2011-12-04 Thread Nick Coghlan
On Mon, Dec 5, 2011 at 7:08 AM, Terry Reedy tjre...@udel.edu wrote: My inclination would be #4 on Windows, certainly for 3.3, unless there is a clear reason not to. Yes, there is: that environment is the *exact* environment that should be passed to the child processes. It's not our place to go