Mailinglist Archive: opensuse-factory (914 mails)

< Previous Next >
Re: [opensuse-factory] Switching default python to Python 3
On Wednesday 28 June 2017, Robert Schweikert wrote:
On 06/28/2017 12:05 PM, Michael Schroeder wrote:
On Wed, Jun 28, 2017 at 11:55:30AM -0400, Robert Schweikert wrote:
Python 2 is not going to be around forever and for better or worse
in some way or another the interests of openSUSE TW and openSUSE
Leap are tied to SLE. SLE has a 10 year life cycle and having
Python 2 as the default python interpreter in 2028 is not

I don't see what the SLE life cycle has to do with this.

Well, in 2 years 9 months and 14 days [1] Python 2 will no longer be
maintained upstream.

This is much longer than most other software shipped with SLE will be
maintained by upstream ...

BTW I don't believe that python2 will disappear in 3 years. We will see.

This would imply that if SLE sticks with Python
2 as the default interpreter SUSE would be maintaining, on their own,
Python 2 for roughly 9 years. I'd say that is unrealistic and thus it
is a pretty good bet that SLE 15 will have Python 3 as the default

It would make more sense to not have /usr/bin/python at all if python2
is not installed. Pointing it to python3 makes no sense. The OP already
said that using non-versioned shebang *is* broken. But there are no
python3 scripts with non-versioned shebang. So we would only break py2
users for no reason. That's sooo obvious. I'm glad that somebody in
this thread found PEP 394 to avoid a wrong decision for SLE/openSUSE.

I already eluded to what that implies w.r.t the relation
between TW and Leap.

You need
to backport fixes to outdated python code anyway after a couple of

Thus at some point
the switch needs to be made, which means things will be broken. I
hate when things break as much as the next person. But in the end
that is the decision the Python community made.

AFAIK the Python community currently wants /usr/bin/python to be

Ah yes of course, the PEP. Well what if that pep changes in 2 years 9
months and 13 days, can we then switch everything overnight? And
probably most importantly will all those scripts that would be broken
if we switch now be fixed?

I'd say the answer to both questions is NO. So, IMHO it is prudent to
be pragmatic and give people a reasonably long runway. Switch the
default while we still provide the safety blanket of
/usr/bin/python2. If we switch when there is no safety blanket it is

Therefore we have to deal with it sooner or later.

Now lets argue a bit about why it may be a good idea to do in TW
what SLE is planning to do.
- Lets say TW stays with Python 2 as the default interpreter, i.e.
for now we don't break anything. But SLE switches to Python 3 as
the default interpreter.

What SLE? SLE-15? SLE-16? Is that already decided?

See above, SLE-15 yes. Given the upstream timeline [1] how would one
realistically expect SUSE as a business to support Python 2 on its
own with no help from upstream for roughly 9 years?


Distinguished Architect LINUX
Team Lead Public Cloud
IRC: robjo
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >