
Dear fellow Geekos, Today it is my honor to inform you that https://build.opensuse.org/request/show/1240106 was accepted, so only 5 years after it became EOL [1], python2 is finally gone and not used anymore for anything in openSUSE. The openSUSE:Factory:python package had exactly 200 revisions since 2006-12-18 (starting at version 2.5) Rest In Peace Ciao Bernhard M. [1] https://www.python.org/doc/sunset-python-2/

WOW! Congrats all! On Wed, Jan 29, 2025 at 8:40 PM Bernhard M. Wiedemann via openSUSE Factory <factory@lists.opensuse.org> wrote:
Dear fellow Geekos,
Today it is my honor to inform you that https://build.opensuse.org/request/show/1240106 was accepted, so only 5 years after it became EOL [1], python2 is finally gone and not used anymore for anything in openSUSE.
The openSUSE:Factory:python package had exactly 200 revisions since 2006-12-18 (starting at version 2.5)
Rest In Peace
Ciao Bernhard M.
-- Best regards Luboš Kocman openSUSE Leap Release Manager

On Wednesday, January 29th, 2025 at 11:40 AM, Bernhard M. Wiedemann via openSUSE Factory <factory@lists.opensuse.org> wrote:
Dear fellow Geekos,
Today it is my honor to inform you that https://build.opensuse.org/request/show/1240106 was accepted, so only 5 years after it became EOL [1], python2 is finally gone and not used anymore for anything in openSUSE.
The openSUSE:Factory:python package had exactly 200 revisions since 2006-12-18 (starting at version 2.5)
Rest In Peace
Does this mean we can stop typing the annoying '3' extensions on python3 commands? Jon Cosby

I realy hope this would be the case. On Wed, 29 Jan 2025, 22:39 Jon Cosby via openSUSE Factory, < factory@lists.opensuse.org> wrote:
On Wednesday, January 29th, 2025 at 11:40 AM, Bernhard M. Wiedemann via openSUSE Factory <factory@lists.opensuse.org> wrote:
Dear fellow Geekos,
Today it is my honor to inform you that https://build.opensuse.org/request/show/1240106 was accepted, so only 5 years after it became EOL [1], python2 is finally gone and not used anymore for anything in openSUSE.
The openSUSE:Factory:python package had exactly 200 revisions since 2006-12-18 (starting at version 2.5)
Rest In Peace
Does this mean we can stop typing the annoying '3' extensions on python3 commands?
Jon Cosby

Am 29.01.25 um 22:39 schrieb Jon Cosby via openSUSE Factory:
On Wednesday, January 29th, 2025 at 11:40 AM, Bernhard M. Wiedemann via openSUSE Factory <factory@lists.opensuse.org> wrote:
Dear fellow Geekos,
Today it is my honor to inform you that https://build.opensuse.org/request/show/1240106 was accepted, so only 5 years after it became EOL [1], python2 is finally gone and not used anymore for anything in openSUSE.
The openSUSE:Factory:python package had exactly 200 revisions since 2006-12-18 (starting at version 2.5)
Rest In Peace
Does this mean we can stop typing the annoying '3' extensions on python3 commands?
Jon Cosby
The system interpreter will always be python3. I strongly object the idea to provide a system python command. System interpreters must not be ambiguous. You were never prohibited to set an alias for yourself. https://peps.python.org/pep-0394/ - Ben

On 2025-01-30 09:25, Ben Greiner wrote:
Am 29.01.25 um 22:39 schrieb Jon Cosby via openSUSE Factory:
On Wednesday, January 29th, 2025 at 11:40 AM, Bernhard M. Wiedemann via openSUSE Factory <factory@lists.opensuse.org> wrote:
Dear fellow Geekos,
Today it is my honor to inform you that https://build.opensuse.org/request/show/1240106 was accepted, so only 5 years after it became EOL [1], python2 is finally gone and not used anymore for anything in openSUSE.
The openSUSE:Factory:python package had exactly 200 revisions since 2006-12-18 (starting at version 2.5)
Rest In Peace
Does this mean we can stop typing the annoying '3' extensions on python3 commands?
Jon Cosby
The system interpreter will always be python3. I strongly object the idea to provide a system python command. System interpreters must not be ambiguous.
You were never prohibited to set an alias for yourself.
https://peps.python.org/pep-0394/
- Ben
I personally would prefer a system python command.
Distributors may choose to set the behavior of the python command as follows: python2, python3, not provide python command, allow python to be configurable by an end user or a system administrator.
So according to the PEP you referenced, a distributor may install a python command. And the PEP even states:
While far from being universally available, python remains the preferred spelling for explicitly invoking Python, as this is the spelling that virtual environments make consistently available across different platforms and Python installations.
The PEP also recommends the use of python in a shebang (given that the script is intended for virtual environments):
For scripts that are only expected to be run in an activated virtual environment, shebang lines can be written as #!/usr/bin/env python, as this instructs the script to respect the active virtual environment.
And a python command would guarantee those shebangs also work outside of virtual environments. Though I think the most compelling argument would be just user friendliness. Other popular distributions already have a python command pointing to python3.

Am 30.01.25 um 09:56 schrieb Rein Fernhout (Levitating):
On 2025-01-30 09:25, Ben Greiner wrote:
Am 29.01.25 um 22:39 schrieb Jon Cosby via openSUSE Factory:
Does this mean we can stop typing the annoying '3' extensions on python3 commands?
Jon Cosby
The system interpreter will always be python3. I strongly object the idea to provide a system python command. System interpreters must not be ambiguous.
You were never prohibited to set an alias for yourself.
https://peps.python.org/pep-0394/
- Ben
I personally would prefer a system python command.
Are you going to maintain and debug all the system packages getting python3 in openSUSE and still executing python2 in backported packages for 15.x as well? You are free to set it as system python on your personal machine, but please don't force it as distro default for everyone else.
Distributors may choose to set the behavior of the python command as follows: python2, python3, not provide python command, allow python to be configurable by an end user or a system administrator.
So according to the PEP you referenced, a distributor may install a python command.
You only pick one of the 3 "may" options. Picking python3 now, when 15.x picked python2 and Tumbleweed without python2 effectively being the user choice option will introduce much more confusion for end users and package maintainers than you anticipate.
And the PEP even states:
While far from being universally available, python remains the preferred spelling for explicitly invoking Python, as this is the spelling that virtual environments make consistently available across different platforms and Python installations.
We are talking about system interpreter, not virtual environments. Don't quote this statement out of context.
The PEP also recommends the use of python in a shebang (given that the script is intended for virtual environments):
For scripts that are only expected to be run in an activated virtual environment, shebang lines can be written as #!/usr/bin/env python, as this instructs the script to respect the active virtual environment.
Again. venv != system
And a python command would guarantee those shebangs also work outside of virtual environments.
When they should not. System scripts calling the wrong interpreter is a big no-go. We have multiflavor. Every script must be called in the right flavor environment. Using `python` and hoping for the best does not cut it.
Though I think the most compelling argument would be just user friendliness. Other popular distributions already have a python command pointing to python3.
And others do not. - Ben

On Wed Jan 29, 2025 at 10:39 PM CET, Jon Cosby via openSUSE Factory wrote:
Does this mean we can stop typing the annoying '3' extensions on python3 commands?
Actually, kind of, but mostly no. For many sometimes complicated reasons (mostly related to our liability and support) no *SUSE distribution will contain /usr/bin/python3 -> python symlink. However, if you want to make one AND YOU ARE WILLING KEEP BOTH PIECES TOGETHER IF YOU RUN SOME PYTHON2 SCRIPT AND BREAK YOUR SYSTEM, then you are free to run ~$ sudo ln -s /usr/bin/python3 /usr/local/bin/python (please, do NOT put that symlink to /usr/bin directly; you should not put anything manually in /usr outside of /usr/local subtree, those directories should be only under zypper management) and that should work quite well for most people. Best, Matěj -- http://matej.ceplovi.cz/blog/, @mcepl@en.osm.town GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 Oh, to be young, and to feel love’s keen sting. -- Albus Dumbledore

Matěj Cepl writes:
Actually, kind of, but mostly no. For many sometimes complicated reasons (mostly related to our liability and support) no *SUSE distribution will contain /usr/bin/python3 -> python symlink. However, if you want to make one AND YOU ARE WILLING KEEP BOTH PIECES TOGETHER IF YOU RUN SOME PYTHON2 SCRIPT AND BREAK YOUR SYSTEM, then you are free to run
~$ sudo ln -s /usr/bin/python3 /usr/local/bin/python
(please, do NOT put that symlink to /usr/bin directly; you should not put anything manually in /usr outside of /usr/local subtree, those directories should be only under zypper management)
So what is one supposed to do with scripts that start with "#! env python"? Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

Jan Engelhardt writes:
On Sunday 2025-02-02 14:42, ASSI wrote:
So what is one supposed to do with scripts that start with "#! env python"?
Translate 'em or trash 'em.
That'd be the thing to do if they were my own (I don't do Python), but in the case that triggered the questions it's ntpsec upstream that ships a waf that comes with an old-style shebang and it's actually supposed to cope with both versions just fine. So whoever wrote those scripts clearly expected that there was a "python" in path that was either version 2 or 3, while Factory/Tumbleweed seem to assume that just asking for "pathon" implies python2. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Terratec KOMPLEXER: http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

Am 02.02.25 um 19:13 schrieb ASSI:
Jan Engelhardt writes:
On Sunday 2025-02-02 14:42, ASSI wrote:
So what is one supposed to do with scripts that start with "#! env python"? Translate 'em or trash 'em. That'd be the thing to do if they were my own (I don't do Python), but in the case that triggered the questions it's ntpsec upstream that ships a waf that comes with an old-style shebang and it's actually supposed to cope with both versions just fine. So whoever wrote those scripts clearly expected that there was a "python" in path that was either version 2 or 3, while Factory/Tumbleweed seem to assume that just asking for "pathon" implies python2.
Assuming there is at lease /usr/bin/env instead of just env, that's totally fine for end users and anything that is to be deployed in a venv. See EP394 mentioned earlier in this thread. Still, linux distribution packaging has it's own demands and needs to deal with the shebang. Always has been. https://github.com/rpm-software-management/rpmlint/blob/d0dcc4c1a163c4f7923f... That's why we have, for python, the `%python<flavor>_fix_shebang` macro. The usual way to install entrypoints through `%python_clone -a` also deals with it. https://github.com/openSUSE/python-rpm-macros/pull/164 https://en.opensuse.org/openSUSE:Packaging_Python#Dependency_on_/usr/bin/pyt...
Regards, Achim.
- Ben

On Sun Feb 2, 2025 at 2:43 PM CET, ASSI wrote:
So what is one supposed to do with scripts that start with "#! env python"?
Throw them away, because they never could work (the line should be at least `#!/usr/bin/env python`), but otherwise you should check that they are py3k compatible, fix them if not, send patches upstream, and then change the shebang line to `#!/usr/bin/env python3`. Best, Matěj -- http://matej.ceplovi.cz/blog/, @mcepl@en.osm.town GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 The difference between death and taxes is death doesn’t get worse every time Congress meets -- Will Rogers

On 2025-01-29 20:40, Bernhard M. Wiedemann via openSUSE Factory wrote:
Dear fellow Geekos,
Today it is my honor to inform you that https://build.opensuse.org/request/show/1240106 was accepted, so only 5 years after it became EOL [1], python2 is finally gone and not used anymore for anything in openSUSE.
anything? Laicolasse:~ # python[tab][tab] python python2 python2.7 python3 python3.11 python3.12 python3.6 python3.6m Laicolasse:~ # That's Leap 15.6. -- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)

Op donderdag 30 januari 2025 00:12:34 Midden-Europese standaardtijd schreef Carlos E. R.:
anything?
Laicolasse:~ # python[tab][tab] python python2 python2.7 python3 python3.11 python3.12 python3.6 python3.6m Laicolasse:~ #
That's Leap 15.6. I'd keep those as a sweet memory and put them on a tape for old time sake.
-- Gertjan Lettink a.k.a. Knurpht openSUSE Forums Team openSUSE Mods Team

On 2025-01-30 01:35, Knurpht-openSUSE wrote:
Op donderdag 30 januari 2025 00:12:34 Midden-Europese standaardtijd schreef Carlos E. R.:
anything?
Laicolasse:~ # python[tab][tab] python python2 python2.7 python3 python3.11 python3.12 python3.6 python3.6m Laicolasse:~ #
That's Leap 15.6. I'd keep those as a sweet memory and put them on a tape for old time sake.
I did not put them there, all those were added automatically by YaST. -- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)

On Thursday 2025-01-30 02:31, Carlos E. R. wrote:
On 2025-01-30 01:35, Knurpht-openSUSE wrote:
Laicolasse:~ # python[tab][tab] python python2 python2.7 python3 python3.11 python3.12 python3.6 python3.6m Laicolasse:~ #
That's Leap 15.6. I'd keep those as a sweet memory and put them on a tape for old time sake.
I did not put them there, all those were added automatically by YaST.
Well, rest assured then YaST will remove them too, (well, libzypp) when the time comes.

On 2025-01-30 07:14, Jan Engelhardt wrote:
On Thursday 2025-01-30 02:31, Carlos E. R. wrote:
On 2025-01-30 01:35, Knurpht-openSUSE wrote:
Laicolasse:~ # python[tab][tab] python python2 python2.7 python3 python3.11 python3.12 python3.6 python3.6m Laicolasse:~ #
That's Leap 15.6. I'd keep those as a sweet memory and put them on a tape for old time sake.
I did not put them there, all those were added automatically by YaST.
Well, rest assured then YaST will remove them too, (well, libzypp) when the time comes.
Till that happens, probably in Leap 16, I suspect someone will have to maintain it. I understand that some other package demands python2, no idea which. -- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)

On Thu, 2025-01-30 at 00:12 +0100, Carlos E. R. wrote:
On 2025-01-29 20:40, Bernhard M. Wiedemann via openSUSE Factory wrote:
Dear fellow Geekos,
Today it is my honor to inform you that https://build.opensuse.org/request/show/1240106 was accepted, so only 5 years after it became EOL [1], python2 is finally gone and not used anymore for anything in openSUSE.
anything?
Laicolasse:~ # python[tab][tab] python python2 python2.7 python3 python3.11 python3.12 python3.6 python3.6m Laicolasse:~ #
That's Leap 15.6.
Python 2 was only removed from Factory - Leap 15.6 won't be affected by that. You can expect python2 not to exist in the upcoming Leap 16.0 Cheers, Dominique

Hello Carlos We will not drop it from 15.6 such changes shall not happen in the maintenance phase. Don't worry Leap 16.0 does not have it. So not in "openSUSE" is a bit of an overstatement. More matching would be in a currently developed openSUSE distros :-) Cheers Lubos On Thu, Jan 30, 2025 at 12:13 AM Carlos E. R. <robin.listas@telefonica.net> wrote:
On 2025-01-29 20:40, Bernhard M. Wiedemann via openSUSE Factory wrote:
Dear fellow Geekos,
Today it is my honor to inform you that https://build.opensuse.org/request/show/1240106 was accepted, so only 5 years after it became EOL [1], python2 is finally gone and not used anymore for anything in openSUSE.
anything?
Laicolasse:~ # python[tab][tab] python python2 python2.7 python3 python3.11 python3.12 python3.6 python3.6m Laicolasse:~ #
That's Leap 15.6.
-- Cheers / Saludos,
Carlos E. R. (from 15.5 x86_64 at Telcontar)
-- Best regards Luboš Kocman openSUSE Leap Release Manager

On 2025-01-30 11:05, Lubos Kocman via openSUSE Factory wrote:
Hello Carlos
We will not drop it from 15.6 such changes shall not happen in the maintenance phase. Don't worry Leap 16.0 does not have it. So not in "openSUSE" is a bit of an overstatement.
More matching would be in a currently developed openSUSE distros :-)
That makes sense, thanks. -- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)
participants (12)
-
ASSI
-
Ben Greiner
-
Bernhard M. Wiedemann
-
Carlos E. R.
-
Dominique Leuenberger
-
Hakim Maghraoui
-
Jan Engelhardt
-
Jon Cosby
-
Knurpht-openSUSE
-
Lubos Kocman
-
Matěj Cepl
-
Rein Fernhout (Levitating)