<p>+1. No magic side effects will make everyone happier.</p>
<div class="gmail_quote">On Jul 11, 2013 5:48 PM, "Nick Coghlan" <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr">(Oops, started this yesterday, got distracted and never hit send)</p>
<p dir="ltr">On 11 July 2013 11:09, Richard Jones <<a href="mailto:richard@python.org" target="_blank">richard@python.org</a>> wrote:<br>
><br>
> On 11 July 2013 06:50, Paul Moore <<a href="mailto:p.f.moore@gmail.com" target="_blank">p.f.moore@gmail.com</a>> wrote:<br>
> > I think "python -m pip" should be the canonical form (used in documentation,<br>
> > examples, etc). The unittest module has taken this route, as has timeit.<br>
> > Traditionally, python-dev have been lukewarm about the -m interface, but its<br>
> > key advantage is that it bypasses all the issues around versioned<br>
> > executables, cross-platform issues, the general dreadfulness of script<br>
> > wrappers on Windows, etc, in one fell swoop.<br>
><br>
> "python -m pip" does make the bootstrapping a more complex proposition<br>
> - the stdlib would have to have something called "pip" that could be<br>
> overridden (while it is actually *running*) by something installed in<br>
> site-packages. Not easy.</p>
<p dir="ltr">I was thinking about that, and I'm wondering if the most sensible option may be to claim the "getpip" name on PyPI for ourselves and then do the following:</p>
<p dir="ltr">1. Provide "getpip" in the standard library for 3.4+ (and perhaps in a 2.7.x release)<br>
2. Install it to site-packages in the "Python launcher for Windows" installer for earlier versions</p>
<p dir="ltr">getpip would expose at least one function:</p>
<p dir="ltr">    def bootstrap(index_url=None, system_install=False):<br>
        ...</p>
<p dir="ltr">And executing it as a main module would either:</p>
<p dir="ltr">1. Do nothing, if "import pip" already works<br>
2. Call bootstrap with the appropriate arguments</p>
<p dir="ltr">That way, installation instructions can simply say to unconditionally do:</p>
<p dir="ltr">    python -m getpip</p>
<p dir="ltr">And that will either:</p>
<p dir="ltr">1. Report that pip is already installed;<br>
2. Bootstrap pip into the user environment; or<br>
3. Emit a distro-specific message if the distro packagers want to push users to use the system pip instead (since they get to patch the system Python and can tweak the system getpip however they want)</p>
<p dir="ltr">The 2.7 change would then be to create a new download that bundles the Windows launcher into the Windows installer.</p>
<p dir="ltr">Users aren't stupid - the problem with the status quo is really that the bootstrapping instructions are annoyingly complicated and genuinely confusing, not that an explicit bootstrapping step is needed in the first place.</p>


<p dir="ltr">Cheers,<br>
Nick.<br><br><br><br><br></p>
<p dir="ltr">><br>
> Thanks everyone for your brilliant feedback and discussion - I look<br>
> forward to being able to say something sensible about Windows in the<br>
> PEP :-)<br><br></p>
<p dir="ltr"> <br>
><br>
><br>
><br>
>      Richard<br><br><br></p>
<p dir="ltr">-- <br>
Nick Coghlan   |   <a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>   |   Brisbane, Australia</p>
<div style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 11 July 2013 06:50, Paul Moore <<a href="mailto:p.f.moore@gmail.com" target="_blank">p.f.moore@gmail.com</a>> wrote:<br>

> I think "python -m pip" should be the canonical form (used in documentation,<br>
> examples, etc). The unittest module has taken this route, as has timeit.<br>
> Traditionally, python-dev have been lukewarm about the -m interface, but its<br>
> key advantage is that it bypasses all the issues around versioned<br>
> executables, cross-platform issues, the general dreadfulness of script<br>
> wrappers on Windows, etc, in one fell swoop.<br>
<br>
"python -m pip" does make the bootstrapping a more complex proposition<br>
- the stdlib would have to have something called "pip" that could be<br>
overridden (while it is actually *running*) by something installed in<br>
site-packages. Not easy.<br>
<br>
Thanks everyone for your brilliant feedback and discussion - I look<br>
forward to being able to say something sensible about Windows in the<br>
PEP :-)<br>
<br>
<br>
     Richard<br>
</div>
<br>_______________________________________________<br>
Distutils-SIG maillist  -  <a href="mailto:Distutils-SIG@python.org">Distutils-SIG@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/distutils-sig" target="_blank">http://mail.python.org/mailman/listinfo/distutils-sig</a><br>
<br></blockquote></div>