[Python-Dev] Python 3 as a Default in Linux Distros

Laurent Gautier lgautier at gmail.com
Wed Jul 24 18:21:54 CEST 2013


On 07/24/2013 05:56 PM, Lennart Regebro wrote:
> On Wed, Jul 24, 2013 at 3:54 PM, Lennart Regebro <regebro at gmail.com> wrote:
>> On Wed, Jul 24, 2013 at 11:12 AM, Bohuslav Kabrda <bkabrda at redhat.com> wrote:
>>> - Should we point /usr/bin/python to Python 3 when we make the move?
>> No.
> To be more explicit. I think it's perfectly fine to not provide a
> /usr/bin/python at all, but I think pointing it to Python 3 will
> provide unhelpful error messages. Also having a /usr/bin/python that
> does nothing but say "You should use either /usr/bin/python2 or
> /usr/bin/python3" would work.
>
> But pointing it to Python 3 will make for unhelpful and confusing
> error messages for anyone having Python scripts using /usr/bin/python,
> which is the majority of people having python scripts at all.

I guess that the underlying idea is to make the majority of python 
scripts working with Python 3.

What about the following idea ?

- errors that are typical of "Python 2 script running with Python 
3"-specific are probably limited (e.g., use of unicode, use of xrange, 
etc...)

- /usr/bin/python could be a wrapper that tries to run it with Python 3 
and display an informative message if the errors above are occurring
(e.g., "Python 3 is the current release, and this script might be 
designed for the older Python 2 - please explicitly use python2 if you 
need it"

- /usr/bin/python could issue a warning in any case about the need to be 
explicit about python2/python3

>
> //Lennart
> _______________________________________________
> 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/lgautier%40gmail.com



More information about the Python-Dev mailing list