[Python-Dev] Support the /usr/bin/python2 symlink upstream

Kerrick Staley mail at kerrickstaley.com
Tue Mar 1 22:50:34 CET 2011


I understand, but is it at least possible to officially recommend that
python, python2, and python3 all exist, that distributions point python to
python2, and that scripts specify which of python2 and python3 they are
using? This would create a redundant system that doesn't avoids problems
even if distributions do decide to ignore the second point. If not, can
someone point me to official documentation that recommends that python
always invoke Python2, so that I can take the case up with the Arch
developers?
Thanks,
Kerrick Staley

On Tue, Mar 1, 2011 at 3:26 PM, Eric Smith <eric at trueblade.com> wrote:

> On 3/1/2011 4:19 PM, Kerrick Staley wrote:
>
>> Hello,
>> There is a need for the default Python2 install to place a symlink at
>> /usr/bin/python2 that points to /usr/bin/python, or for the
>> documentation to recommend that packagers ensure that python2 is
>> defined. Also, all documentation should be changed to recommend that
>> "#!/usr/bin/env python2" be used as the shebang for Python 2 scripts.
>> This is needed because some distributions (Arch Linux, in particular),
>> point /usr/bin/python to /usr/bin/python3, while others (including
>> Slackware, Debian, and the BSDs, probably more) do not even define the
>> python2 command. This means that a script has no way of achieving
>> cross-platform compatibility. The point at which many distributions
>> begin to alias /usr/bin/python to /usr/bin/python3 is due soon, and for
>> the next couple of years, it would be best to use a python2 or python3
>> shebang in all scripts, making no assumptions about plain python, which
>> should only be invoked interactively. This email from about 3 years ago
>> seems relevant: :
>> http://mail.python.org/pipermail/python-3000/2008-March/012421.html
>> Again, this issue needs to be addressed by the Python developers
>> themselves so that different *nix distributions will handle it
>> consistently, allowing Python scripts to continue to be cross-platform.
>>
>>
> I believe we agreed at the language summit last year (or maybe even the
> year before) that "python" would always be python2.x, and "python3" would be
> python3.x.
>
> And by "always" we indeed meant forever. To do otherwise would break
> scripts even many, many years from now.
>
> Eric.
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/mail%40kerrickstaley.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110301/ba55518e/attachment.html>


More information about the Python-Dev mailing list