Mailinglist Archive: opensuse-factory (914 mails)

< Previous Next >
[opensuse-factory] Switching default python to Python 3
Fellow openSUSists,

this has been a long time coming, and I'd now like to start the actual process
of switching the
default Python implementation to Python 3 in Tumbleweed.

First of all, big thanks to everyone who is converting (or has converted) their
packages to
singlespec. That alone makes the Python 3 switch much easier than it would be

Then, details.

* in the coming weeks. I'd like to do some tests and gather feedback before
actually moving forward.
A heads-up e-mail will come before anything is actually headed to TW.

* Python 2 is very near its end of life [1], the vast majority of our stuff
already works
in python3. We want to have python3 as default in SLE 15, so now's a very
good time to start.

What will happen:
* `python` package will be renamed to `python2` and will obsolete/provide
`python <= 2.7.13`
* `python3` already provides `python = 3.6` and will also obsolete `python <
This should mean that if you don't require python2 on your system, it will be
otherwise it will be replaced by python2.
* /usr/bin/python will be switched to point to /usr/bin/python3. Other
unversioned python binaries
will also be switched.
* python packages in patterns will be replaced by the corresponding python3 ones

What else will happen:
* Stuff will break! The breakage will be contained to a testing project at
* python packages that are not yet converted to singlespec will switch over to
Some of them will magically continue working, others will break.
* For those we will also start getting file conflicts with python3 versions.
A good opportunity to revisit and either completely drop the python2 version,
to singlespec, or to explicitly-python2 package.
* python packages that _are_ converted to singlespec will work just fine
* as will explicitly-python3 packages from d:l:py3
* packages that _require_ python stuff will also magically get python3. They
very well also break
* through this, we will learn where we still depend on Python 2, and hopefully
fix it
* note that if a script is using "/usr/bin/python" as shebang (or worse,
"/usr/bin/env python"),
it's already wrong. The shebang must be versioned, unless the script actually
with an arbitrary python version



< Previous Next >