[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-03-24 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Py

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-26 Thread Steve Dower
Steve Dower added the comment: It's in, and we are of course free to modify this further if virtualenv starts including pyvenv.cfg files or some other way to resolve the version number without launching it. -- ___ Python tracker

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2eb99070a38f by Steve Dower in branch 'default': Issue #23465: Implement PEP 486 - Make the Python Launcher aware of virtual environments (patch by Paul Moore) https://hg.python.org/cpython/rev/2eb99070a38f -- nosy: +python-dev ___

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-26 Thread Steve Dower
Steve Dower added the comment: I'll get it. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-26 Thread Paul Moore
Paul Moore added the comment: The PEP has now been accepted, and as far as I am aware this patch is complete. If anyone has any review comments, please speak up, otherwise I believe this is ready to be committed, if some kind soul is willing :-) --

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-21 Thread Paul Moore
Paul Moore added the comment: > As an alternative, virtualenv could be changed to create a pyvenv.cfg file > with the interpreter version like pyvenv does. Seems pretty simple and > unproblematic to me and it might actually be useful to know the interpreter > version without running it in othe

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-21 Thread Wolfgang Maier
Wolfgang Maier added the comment: >> 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 :( > > Correct. That's not the problem this PEP is intended to solve. Granted :) > Another PEP could be wr

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-20 Thread Paul Moore
Paul Moore added the comment: On 20 February 2015 at 16:31, Wolfgang Maier wrote: >> 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 Py

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-20 Thread Wolfgang Maier
Wolfgang Maier added the comment: > 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 Pyth

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-20 Thread Paul Moore
Paul Moore added the comment: Hmm, I didn't know that (although virtualenv-based environments don't have an equivalent to pyvenv.cfg). 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 -

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-20 Thread Wolfgang Maier
Wolfgang Maier added the comment: isn't the pyvenv.cfg file specifying the version ? -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-20 Thread Paul Moore
Paul Moore added the comment: That's correct. The problem here is that it's not possible to know what version of Python a virtualenv has (at least, not without running it, which isn't appropriate in the launcher). So the only case it's possible to support is #!python. --

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-20 Thread Wolfgang Maier
Wolfgang Maier added the comment: am I correct that when a script contains a shebang line like: #! python3 or #! python3.4 i.e., one indicating just a version of, but not a full path to the interpreter, the current patch would not use an active virtualenv even if it has a suitable version ?

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-15 Thread Tim Golden
Changes by Tim Golden : -- components: +Windows nosy: +tim.golden, zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-14 Thread Vinay Sajip
Vinay Sajip added the comment: The patch looks good to me, too. The standalone launcher has basic tests: https://bitbucket.org/pypa/pylauncher/src/4613e10e26a8ca98d4fa4609c6659ef6b623baef/tests.py?at=default To do a proper job, you need to have multiple Pythons installed, ideally 32- and 64-b

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-14 Thread Steve Dower
Steve Dower added the comment: I don't think there are any tests for the launcher at all, though it would be fairly simple to write a Python script that runs ``py -c "import sys; print(sys.prefix)"`` and checks the output. The patch looks fine to me, once I noticed that venv_python is a static

[issue23465] Implement PEP 486 - Make the Python Launcher aware of virtual environments

2015-02-14 Thread Paul Moore
New submission from Paul Moore: Implementation of PEP 486 (Make the Python Launcher aware of virtual environments). Tested manually on my local PC - there aren't currently any tests for the launcher that I can see (and I'm not entirely sure how I'd write such a test) so the patch includes code