Re: Multirelease effort: Moving to Python 3

2013-07-19 Thread Nick Coghlan
On 07/19/2013 01:56 PM, Andrew McNabb wrote:
> On Thu, Jul 18, 2013 at 11:24:22AM -0400, Bohuslav Kabrda wrote:
>>
>> From packaging point of view, this will probably require:
>> 1) Renaming python package to python2
>> 2) Renaming python3 package to python
>> 3) Switching the %{?with_python3} conditionals in specfiles to 
>> %{?with_python2} (we will probably create a script to automate this, at 
>> least partially)
> 
> Renaming the python package to python2 kind of makes sense, but renaming
> the python3 package to python seems needlessly confusing.  Wouldn't it
> make sense to just keep python2 and python3 side by side without
> ambiguity until some long future date when python2 disappears?

I wrote PEP 394 after Arch forced the issue (by switching the python
symlink to Python 3), and my preferred/suggested approach is to actually
declare "/usr/bin/python" the domain of the user/sysadmin, and have all
system packages use the qualified python3 naming.

Although, if PEP 432 comes to fruition, then we may be able to have a
shiny new pysystem (or some other name) that has all the defaults
flipped to lock things down (i.e. ignoring user settings) by the time
Fedora gets to Python 3 by default.

Also (switching hats back to the one in my sig). If the default
installation client changes, that could mean some fun for Beaker
(although I guess we already support alternate installation tools on the
older RHEL releases...). Manageable, but glad I'm not finding out about
this when someone files a bug complaining that they can't install a new
Fedora release in Beaker :)

Cheers,
Nick.

-- 
Nick Coghlan
Red Hat Infrastructure Engineering & Development, Brisbane

Testing Solutions Team Lead
Beaker Development Lead (http://beaker-project.org/)
___
python-devel mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/python-devel

Re: Multirelease effort: Moving to Python 3

2013-07-19 Thread Toshio Kuratomi
On Fri, Jul 19, 2013 at 02:41:23AM -0400, Bohuslav Kabrda wrote:
> - Original Message -
> > On Thu, Jul 18, 2013 at 11:24:22AM -0400, Bohuslav Kabrda wrote:
> > > Hi all,
> > > as a new Fedora Python maintainer, I have set myself a goal of moving
> > > Fedora to Python 3 as a default.
> > 
> > I'm not sure we want to make python3 default depending on what your
> > definition of default is.
> > 
> > /usr/bin/python should refer to python2 --
> > http://www.python.org/dev/peps/pep-0394/  I'd be -1 to changing this
> > 
> 
> So, my definition of default is "all system tools use Python 3, it is the 
> only Python that gets to minimal buildroot/minimal Fedora installation" - 
> that means:

I'm okay with this portion of the definition.  One note is I would be hesitant
about the timing of python3 being the only python that is installed into the
minimal buildroot. This should probably happen in rawhide right after
a branching.  

> - livecd can still ship Python 2

I would consider this to be the goal that we should shoot for, though.  We
are constantly fighting for space on the install images and we know that
people who install Fedora would like to have the ability to slim down what
is installed.  Shooting for no-python2 on the livecds and after that, no
python2 on the install dvds, and still later, no need for python2 in the
packages in the repository seem like milestones that have actual real value
for end users.

> - /usr/bin/python points to Python 3

I am firmly against this.  more depth was in my reply to mmaslano although
I'll reply to one thing here:

>   - Please note, that the pep you're referring to also states that "python
>   should refer to the same target as python2 but may refer to python3 on
>   some bleeding edge distributions", so this wouldn't really be going
>   against the pep.
>
This is a misinterpretion of the PEP.  (This section is confusing, though:
"python should refer to the same target as python2" is a recommendation to
distributions.  "but may refer to python3 on some bleeding edge
distributions" is a statement of fact for end users to watch out for) See
the recommendation section:

"For the time being, it is recommended that python should refer to python2
(however, some distributions have already chosen otherwise; see the
Rationale and Migration Notes below)."

and Future Changes Section:
http://www.python.org/dev/peps/pep-0394/#future-changes-to-this-recommendation

"
It is anticipated that there will eventually come a time where the third
party ecosystem surrounding Python 3 is sufficiently mature for this
recommendation to be updated to suggest that the python symlink refer to
python3 rather than python2.

This recommendation will be periodically reviewed over the next few years,
and updated when the core development team judges it appropriate.
"

The "may refer to python3" phrase is an acknowledgment that arch has moved
to /usr/bin/python == python3 and isn't going to revert even though upstream
thinks it's a... premature time to make that switch.  (To be fair to arch,
the discussion and PEP happened as a result of arch making that switch so
they'd already committed to that before the consensus was formed that this
would be a bad thing to do atthis time.  We don't have that excuse ;-)

If you'd like to read the discussions for yourself, there are three threads
linked from the PEP.  An even earlier one is at:
http://mail.python.org/pipermail/python-dev/2010-November/105252.html


> 
> > The python package itself should probably also remain python2 due to
> > dependencies and expectations from other distros and documentation --
> > I think I'd be -1 to changing this
> > 
> > The Fedora live images contain only python3, not python2 -- I'd be heavily
> > in favour of this. +1
> > 
> > > This is going to be a multirelease effort
> > > that is going to affect lots of Fedora parts. Since we will need to switch
> > > default package manager from Yum to DNF (which is supposed to work with
> > > Python 3), we will need to wait for that. I've been told that DNF should
> > > be default in F22, so that's my target, too. That should also give
> > > everyone else plenty of time to work on other essential packages to make
> > > this happen.
> > 
> > Getting there at the same time as we get to DNF sounds like a good timeline.
> > (But see my note on anaconda below).  +1
> > 
> > > Here is my analysis/proposal:
> > > Before switching, we need to make sure that everything "important" (*) is
> > > Python 3 compatible. There are three steps I see in this transition:
> > > 1) Getting rid of Python 2 in mock minimal buildroot.
> > 
> > I'm not sure about this one as it will cause a lot of package churn.  It
> > might be a necessary pain pointi or it might be a pain point we want to
> > defer until later in our porting efforts.  Have to think about it more.
> > 
> 
> If you look at the minimal mock buildroot for rawhide now, the only thing 
> that is drawing in Python is gdb be