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

2012-03-23 Thread Brad Allen
On Fri, Mar 23, 2012 at 3:46 PM, Glyph 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 agree.  I'm glad that

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

2012-03-23 Thread Glyph
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 agree. I'm glad that my bitter experience here might be useful to someone i

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

2012-03-23 Thread Brad Allen
On Thu, Mar 22, 2012 at 2:35 PM, Glyph Lefkowitz wrote: > Also, in order to execute in any installation environment where libraries are > found in non-default locations, you will need to set LD_LIBRARY_PATH.  Oh, > and you will also need to set $PATH on UNIX so that libraries can find their >

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 fin

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 p

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 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 developers. > > I think m

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 DI

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-04 Thread Nick Coghlan
On Mon, Dec 5, 2011 at 7:08 AM, Terry Reedy 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 implicitly addi

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) p

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 i

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

2011-12-04 Thread Martin Packman
On 04/12/2011, Tim Golden 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 the recent to-

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. My

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

2011-12-04 Thread Paul Moore
On 4 December 2011 12:20, Tim Golden 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 Python will w

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 Nick Coghlan
On Sun, Dec 4, 2011 at 8:59 PM, Tim Golden 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 recent to-and-fro >

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