On 31 August 2016 at 23:54, Charalampos Stratakis <cstra...@redhat.com> wrote:
> Hello Python-SIG,
>
> Currently I am working on some ideas regarding the python package.
>
> Nothing is too concrete yet, however the technical side should be fairly 
> simple.
>
> The first thing is renaming python to python2.

Moving "python" to a virtual provides (currently provided by python2)
makes sense to me as a starting point.

> Currently the python packaging guidelines, suggest that we use the 
> python_provides macro, for both python2 and python3 subpackages of whatever 
> python module someone might be packaging. The macro for python3 subacpakages, 
> currently, does nothing however sometime in the future  it would be great if 
> everything could switch to python 3. When this is done we can flip the switch 
> in the macros and the python3 subpackage will also provide the 
> python-<module> namespace, meaning essentially that when we speak about 
> python we talk about python3, and the python binary will be a symlink to 
> python3.

For /usr/bin/python, we had an upstream discussion about that at the
2015 language summit: https://lwn.net/Articles/640296/

The ideal point we'd like to get to is one where all distro provided
scripts actually have the appropriate major version in their shebang
lines, and the unqualifed "python" is something along the lines of a
user-configurable launcher, akin to the "py" launcher for Windows:
https://docs.python.org/3/using/windows.html#python-launcher-for-windows
(see https://www.python.org/dev/peps/pep-0397/ for more details on
that)

Debian's Geoffrey Thomas actually wrote a proof of concept launcher
that implements something along those lines (described at
https://ldpreload.com/blog/usr-bin-python-23 ), and as far as I know
the main blocker to it going any further has been finding someone that
has the time, energy, and inclination to pursue including it in a
distro as the official implementation of "/usr/bin/python", as well as
proposing it upstream as an amendment to the distro recommendations in
PEP 394.

The nice thing about the design of pythonmux is that, if Python 2 is
installed, it will use it automatically in non-interactive mode for
maximum compatibility with existing scripts, but if only Python 3 is
available, it will implicitly try that, rather than failing outright
the way a missing symlink will.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
python-devel mailing list
python-devel@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/python-devel@lists.fedoraproject.org

Reply via email to