<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 28 April 2018 at 01:37, Petr Viktorin <span dir="ltr"><<a href="mailto:encukou@gmail.com" target="_blank">encukou@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
After discussion on the [Pull Request], my update to PEP 394 changed scope somewhat. The new major changes are:<br>
<br>
- The `python` command may not exist at all in some cases (see the PEP for details)<br>
- The paragraph about the anticipated future where python points to Python 3 is removed. (We'd rather see a future where `python` doesn't exist and one always has to specify `python2` or `python3`.)<br></blockquote><div> </div>That isn't currently *my* desired future, as I don't want to see a python3 to python4 naming transition at any point, I want a transition from python3 back to an unqualified name to accurately reflect the change in version management philosophy resulting from the extended Python 3 migration. (And then "python3" would linger solely as a backwards compatibility remnant, even if it referred to python 4+, or a switch to some kind of CalVer based versioning scheme)<br></div><div class="gmail_quote"><div><br></div><div>However, it may be possible to solve two problems at once here, as one of the issues we have in writing cross-platform instructions for both Windows and *nix systems is that "python" isn't guaranteed to be on the Windows path, but the "py" launcher *is*. This means the most robust tooling invocations on Windows are of the form "py -m pip ...", since they don't care about how your system PATH is configured. Getting not only "python", but also scripts installed with "py -m pip install --user..." to be reliably on the PATH is an arcane problem with assorted complications stemming from the differences between per-machine and per-user installations of Windows applications, and the "py -m module ..." approach avoids that mess entirely (as long as the tools of interest correctly support invocation via "-m").<br><br></div><div>The downside of those instructions is that it means we have a platform split where, depending on how your system is setup, which version of Python you're using, and whether or not you're running in a virtual environment, you need to invoke Python from the command line as one of:<br><br></div><div>- python<br></div><div>- python3<br></div><div>- py<br></div><div><br>(more details at <a href="https://github.com/pypa/python-packaging-user-guide/issues/396">https://github.com/pypa/python-packaging-user-guide/issues/396</a> )<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks for everyone involved, especially Guido for pitching in with the intended direction -- which was not clear from (or is genuinely different from) the 7-year-old PEP!<br></blockquote><div><br></div><div>It's a change, and not one that's been explicitly discussed with the current authors of the PEP yet (although I do see that Barry has chimed in on the PR).<br><br></div><div>I think it's a reasonable way for us to go, *if* it's accompanied by an explicit decision that we want to drive cross-platform convergence around "py" as the convention for unqualified version independent access to a Python interpreter (regardless of whether or not a virtual environment is active or not)<br><br></div><div>The key missing piece for doing that would be to define how we'd want a `py` launcher to work on *nix systems, and then provide that as part of CPython 3.8+ (and potentially backport it to a 3.7x maintenance release).<br></div><div><br></div></div>Cheers,<br></div><div class="gmail_extra">Nick.<br><br></div><div class="gmail_extra">P.S. Note that on Windows, `py` always refers specifically to the launcher (it 
doesn't get shadowed in virtual environments), but the launcher itself 
is virtual environment aware (see 
<a href="https://www.python.org/dev/peps/pep-0486/">https://www.python.org/dev/peps/pep-0486/</a> for details).<br></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">Nick Coghlan   |   <a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>   |   Brisbane, Australia</div>
</div></div>