Author wolma
Recipients paul.moore, steve.dower, tim.golden, vinay.sajip, wolma, zach.ware
Date 2015-02-20.16:31:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1424449901.12.0.867836301186.issue23465@psf.upfronthosting.co.za>
In-reply-to
Content
> Hmm, I didn't know that (although virtualenv-based environments don't have an equivalent to pyvenv.cfg).

Well, that complicates things then :(
 
> But there's some confusion here. This patch only affects command line usage (running "py.exe" to start Python). I don't really see a use case for making "py -3" mean "the virtualenv if it's Python 3 otherwise ignore the virtualenv and use the system Python 3".
> 
> For scripts, shebang processing isn't altered. Nothing uses a virtualenv except "#!/usr/bin/env python". And that does so only because it searches PATH before looking at the registry. If you use "#!/usr/bin/env python3" it won't see a virtualenv because there is no python3.exe in a virtualenv...
>

Well, and that's exactly what I think is a mistake ...
 
> The scope of this PEP is just to make the "py" command (with no explicit version) use an active virtualenv before falling back to the default Python. This is specifically to allow people who don't put Python on their PATH but use virtualenvs to use "py" consistently, rather than having to switch to "python" when they are in a virtualenv. See the PEP (specifically the rationale section) for details.
> 

Right, just that

#!/usr/bin/env python3

is a very plausible shebang line for a Python3 script for use under UNIX where #!/usr/bin/env python typically means python2.

So, with the current patch users could still not use the py launcher from a virtual environment with scripts that are supposed to work under UNIX :(
History
Date User Action Args
2015-02-20 16:31:41wolmasetrecipients: + wolma, paul.moore, vinay.sajip, tim.golden, zach.ware, steve.dower
2015-02-20 16:31:41wolmasetmessageid: <1424449901.12.0.867836301186.issue23465@psf.upfronthosting.co.za>
2015-02-20 16:31:41wolmalinkissue23465 messages
2015-02-20 16:31:40wolmacreate