Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #17141 > unrolled thread

/usr/bin/python3 deprecation and enforcing /usr/bin/python

Started byAntoine Beaupré <anarcat@debian.org>
First post2025-11-12 17:00 +0100
Last post2025-11-14 19:00 +0100
Articles 13 — 10 participants

Back to article view | Back to linux.debian.maint.python


Contents

  /usr/bin/python3 deprecation and enforcing /usr/bin/python Antoine Beaupré <anarcat@debian.org> - 2025-11-12 17:00 +0100
    Re: /usr/bin/python3 deprecation and enforcing /usr/bin/python Santiago Vila <sanvila@debian.org> - 2025-11-12 17:20 +0100
      Re: /usr/bin/python3 deprecation and enforcing /usr/bin/python Matthias Klose <doko@debian.org> - 2025-11-12 18:40 +0100
        Re: /usr/bin/python3 deprecation and enforcing /usr/bin/python Santiago Vila <sanvila@debian.org> - 2025-11-12 19:00 +0100
    Re: /usr/bin/python3 deprecation and enforcing /usr/bin/python Jerome Kieffer <Jerome.Kieffer@esrf.fr> - 2025-11-12 18:10 +0100
    Re: /usr/bin/python3 deprecation and enforcing /usr/bin/python Jeremy Stanley <fungi@yuggoth.org> - 2025-11-12 18:30 +0100
      Re: /usr/bin/python3 deprecation and enforcing /usr/bin/python Matthias Klose <doko@debian.org> - 2025-11-12 18:50 +0100
    Re: /usr/bin/python3 deprecation and enforcing /usr/bin/python Andrey Rakhmatullin <wrar@debian.org> - 2025-11-13 17:30 +0100
      Re: /usr/bin/python3 deprecation and enforcing /usr/bin/python Alexandre Detiste <alexandre.detiste@gmail.com> - 2025-11-13 22:20 +0100
    Re: /usr/bin/python3 deprecation and enforcing /usr/bin/python Michael Kesper <michael@familie-kesper.de> - 2025-11-14 18:00 +0100
      Re: /usr/bin/python3 deprecation and enforcing /usr/bin/python Michael Kesper <michael@familie-kesper.de> - 2025-11-14 18:50 +0100
        Re: /usr/bin/python3 deprecation and enforcing /usr/bin/python Alexandru Mihail <alexandru.mihail2897@gmail.com> - 2025-11-14 20:10 +0100
    Re: /usr/bin/python3 deprecation and enforcing /usr/bin/python Stefano Rivera <stefanor@debian.org> - 2025-11-14 19:00 +0100

#17141 — /usr/bin/python3 deprecation and enforcing /usr/bin/python

FromAntoine Beaupré <anarcat@debian.org>
Date2025-11-12 17:00 +0100
Subject/usr/bin/python3 deprecation and enforcing /usr/bin/python
Message-ID<LQlqi-crw1-1@gated-at.bofh.it>
Hi!

Debian has shipped Python 3 as /usr/bin/python3 for a while now. For
some time, we've also shipped a python-is-python3 package that ships a
symlink from /usr/bin/python to /usr/bin/python as well, but it's not
installed by default.

I'm assuming that most distributions outside of Debian, at this point,
have shipped /usr/bin/python as Python 3 for couple of years, as far as
I know (although I haven't surveyed that formally).

I've been wondering whether it's time we finally make this
change. Concretely, I think it means:

 1. deprecating /usr/bin/python3
 2. shipping Python 3 as /usr/bin/python directly

I think we should do this for Debian 14 (forky), and stop shipping
python3 altogether in Debian 15 (?).

Thoughts?

A.
-- 
If ease of use was the ultimate aim for a tool,
the bicycle would never have evolved beyond the tricycle.
                        — Doug Engelbart, 1925-2013

[toc] | [next] | [standalone]


#17142

FromSantiago Vila <sanvila@debian.org>
Date2025-11-12 17:20 +0100
Message-ID<LQlJD-crUb-3@gated-at.bofh.it>
In reply to#17141
On Wed, Nov 12, 2025 at 10:49:08AM -0500, Antoine Beaupré wrote:

> I think we should do this for Debian 14 (forky), and stop shipping
> python3 altogether in Debian 15 (?).
> 
> Thoughts?

If possible, please make the transition to be smooth
(i.e. not another gcc-15 or CMake 4).

Thanks.

[toc] | [prev] | [next] | [standalone]


#17145

FromMatthias Klose <doko@debian.org>
Date2025-11-12 18:40 +0100
Message-ID<LQmZ6-csC7-5@gated-at.bofh.it>
In reply to#17142
On 11/12/25 17:13, Santiago Vila wrote:
> On Wed, Nov 12, 2025 at 10:49:08AM -0500, Antoine Beaupré wrote:
> 
>> I think we should do this for Debian 14 (forky), and stop shipping
>> python3 altogether in Debian 15 (?).
>>
>> Thoughts?
> 
> If possible, please make the transition to be smooth
> (i.e. not another gcc-15 or CMake 4).

please stop the ranting.  This has nothing to do on the python ML, and 
you could raise your concerns in a more civilized way on appropriate 
channels.

thanks, Matthias

[toc] | [prev] | [next] | [standalone]


#17147

FromSantiago Vila <sanvila@debian.org>
Date2025-11-12 19:00 +0100
Message-ID<LQnip-csJw-5@gated-at.bofh.it>
In reply to#17145
On Wed, Nov 12, 2025 at 06:33:45PM +0100, Matthias Klose wrote:
> On 11/12/25 17:13, Santiago Vila wrote:
> > On Wed, Nov 12, 2025 at 10:49:08AM -0500, Antoine Beaupré wrote:
> > 
> > > I think we should do this for Debian 14 (forky), and stop shipping
> > > python3 altogether in Debian 15 (?).
> > > 
> > > Thoughts?
> > 
> > If possible, please make the transition to be smooth
> > (i.e. not another gcc-15 or CMake 4).
> 
> please stop the ranting.  This has nothing to do on the python ML, and you
> could raise your concerns in a more civilized way on appropriate channels.

It was never my intention to rant. My suggestion for this to be as
smooth as possible has everything to do on the python ML, and afaik I
have not said anything which could be characterized as "non-civilized".

So please do not overreact.

Thanks.

[toc] | [prev] | [next] | [standalone]


#17143

FromJerome Kieffer <Jerome.Kieffer@esrf.fr>
Date2025-11-12 18:10 +0100
Message-ID<LQmw1-csrZ-7@gated-at.bofh.it>
In reply to#17141
Hi,

I am against deprecating python3 ... it is used a bit everywhere and
every `venv` provides both python and python3.

What will occur when python4 arrives ?

Cheers,

Jerome
On Wed, 12 Nov 2025 10:49:08 -0500
Antoine Beaupré <anarcat@debian.org> wrote:

> Hi!
> 
> Debian has shipped Python 3 as /usr/bin/python3 for a while now. For
> some time, we've also shipped a python-is-python3 package that ships a
> symlink from /usr/bin/python to /usr/bin/python as well, but it's not
> installed by default.
> 
> I'm assuming that most distributions outside of Debian, at this point,
> have shipped /usr/bin/python as Python 3 for couple of years, as far as
> I know (although I haven't surveyed that formally).
> 
> I've been wondering whether it's time we finally make this
> change. Concretely, I think it means:
> 
>  1. deprecating /usr/bin/python3
>  2. shipping Python 3 as /usr/bin/python directly
> 
> I think we should do this for Debian 14 (forky), and stop shipping
> python3 altogether in Debian 15 (?).
> 
> Thoughts?
> 
> A.
> -- 
> If ease of use was the ultimate aim for a tool,
> the bicycle would never have evolved beyond the tricycle.
>                         — Doug Engelbart, 1925-2013
> 


-- 
Jérôme Kieffer
tel +33 476 882 445

[toc] | [prev] | [next] | [standalone]


#17144

FromJeremy Stanley <fungi@yuggoth.org>
Date2025-11-12 18:30 +0100
Message-ID<LQmPo-csyG-3@gated-at.bofh.it>
In reply to#17141

[Multipart message — attachments visible in raw view] — view raw

On 2025-11-12 10:49:08 -0500 (-0500), Antoine Beaupré wrote:
[...]
>I've been wondering whether it's time we finally make this 
>change. Concretely, I think it means:
>
> 1. deprecating /usr/bin/python3
> 2. shipping Python 3 as /usr/bin/python directly
>
>I think we should do this for Debian 14 (forky), and stop shipping 
>python3 altogether in Debian 15 (?).
[...]

I can understand the need for #2, but I don't see why you'd ever do 
#1. For that matter, the python3 link is still included by upstream 
Cpython when doing a `make install` or in a stdlib-created venv. 
Lots of user-written scripts use python3 in their shebangs. It's not 
harming anything simply by existing, so why deprecate something that 
can't/shouldn't be removed?
-- 
Jeremy Stanley

[toc] | [prev] | [next] | [standalone]


#17146

FromMatthias Klose <doko@debian.org>
Date2025-11-12 18:50 +0100
Message-ID<LQn8J-csFL-1@gated-at.bofh.it>
In reply to#17144
On 11/12/25 17:39, Jeremy Stanley wrote:
> On 2025-11-12 10:49:08 -0500 (-0500), Antoine Beaupré wrote:
> [...]
>> I've been wondering whether it's time we finally make this change. 
>> Concretely, I think it means:
>>
>> 1. deprecating /usr/bin/python3
>> 2. shipping Python 3 as /usr/bin/python directly
>>
>> I think we should do this for Debian 14 (forky), and stop shipping 
>> python3 altogether in Debian 15 (?).
> [...]
> 
> I can understand the need for #2, but I don't see why you'd ever do #1. 
> For that matter, the python3 link is still included by upstream Cpython 
> when doing a `make install` or in a stdlib-created venv. Lots of user- 
> written scripts use python3 in their shebangs. It's not harming anything 
> simply by existing, so why deprecate something that can't/shouldn't be 
> removed?

I also don't see the need for #1, but how much of a problem is #1? Or, 
as mentioned on irc, is that an ansible only issue?

Please note, that we still have the python-is-python3 package, which 
currently is ok to use, the package description says:

  No packages may declare dependencies on this package.

So you can use it in autopkg test triggers and build dependencies.

Shipping the /usr/bin/python symlink in an existing package will make it 
much more difficult to get rid off it later again.

Matthias

[toc] | [prev] | [next] | [standalone]


#17149

FromAndrey Rakhmatullin <wrar@debian.org>
Date2025-11-13 17:30 +0100
Message-ID<LQImR-cHjs-1@gated-at.bofh.it>
In reply to#17141

[Multipart message — attachments visible in raw view] — view raw

Related, is it time to reintroduce executables without a "3" suffix 
(things like ipython)?

-- 
WBR, wRAR

[toc] | [prev] | [next] | [standalone]


#17151

FromAlexandre Detiste <alexandre.detiste@gmail.com>
Date2025-11-13 22:20 +0100
Message-ID<LQMTv-cKrl-7@gated-at.bofh.it>
In reply to#17149
And using those when they are there

For example moving usage of

    /usr/bin/py.test + /usr/bin/py.test-3 + /usr/bin/pytest-3

to

    /usr/bin/pytest

Sometimes it's juste dropping a patch that did it the other way around
years before.

Greetings

Le jeu. 13 nov. 2025 à 17:21, Andrey Rakhmatullin <wrar@debian.org> a écrit :
>
> Related, is it time to reintroduce executables without a "3" suffix
> (things like ipython)?
>
> --
> WBR, wRAR

[toc] | [prev] | [next] | [standalone]


#17153

FromMichael Kesper <michael@familie-kesper.de>
Date2025-11-14 18:00 +0100
Message-ID<LR5jr-cWWi-7@gated-at.bofh.it>
In reply to#17141
Hi all,

On 12.11.25 16:49, Antoine Beaupré wrote:
> I've been wondering whether it's time we finally make this
> change. Concretely, I think it means:
> 
>   1. deprecating /usr/bin/python3
>   2. shipping Python 3 as /usr/bin/python directly

What would be a motivation to warrant such a breaking change?
Every script / program for Python3 I know uses
#!/usr/bin/env python3
(acknowledging virtualenv usage) or
#!/usr/bin/python3

So this would be a very bad move for what gain exactly?

All the best
Michael

Just a Debian and Python3 user

[toc] | [prev] | [next] | [standalone]


#17154

FromMichael Kesper <michael@familie-kesper.de>
Date2025-11-14 18:50 +0100
Message-ID<LR65P-cXx4-9@gated-at.bofh.it>
In reply to#17153
Hi Alexandru, hi all,

On 14.11.25 18:11, Alexandru Mihail wrote:
> Exactly what I was saying before in this thread as well. The amount of scripts with the #!/usr/bin/python3 shebang in the wild is staggering. I'm not saying
> that it's good practice but it must be considered.
> Maybe we could do a very gradual change, warning users in apt changes
> for several versions of python before pulling the rug maybe in Debian

I question the whole move as such.
No gradual change can fix a broken move.
Have a look at e.g. https://docs.python.org/3/tutorial/interpreter.html#source-code-encoding
That's just one example of official docs using
#!/usr/bin/env python3

So please consider not changing the status quo at all, making life miserable for everyone using Python on Debian.

Best
Michael

[toc] | [prev] | [next] | [standalone]


#17156

FromAlexandru Mihail <alexandru.mihail2897@gmail.com>
Date2025-11-14 20:10 +0100
Message-ID<LR7lg-cYyP-19@gated-at.bofh.it>
In reply to#17154
Yeah, Michael I think you're right. In hindsight I agree with your stance.
> 
> I question the whole move as such.
> No gradual change can fix a broken move.
> Have a look at e.g. https://docs.python.org/3/tutorial/interpreter.html#source-code-encoding
> That's just one example of official docs using
> #!/usr/bin/env python3
> 
> So please consider not changing the status quo at all, making life miserable for everyone using Python on Debian.
> 
> Best
> Michael
> 

[toc] | [prev] | [next] | [standalone]


#17155

FromStefano Rivera <stefanor@debian.org>
Date2025-11-14 19:00 +0100
Message-ID<LR6fv-cXB4-13@gated-at.bofh.it>
In reply to#17141
Hi Antoine (2025.11.12_15:49:08_+0000)
>I've been wondering whether it's time we finally make this
>change. Concretely, I think it means:
>
> 1. deprecating /usr/bin/python3
> 2. shipping Python 3 as /usr/bin/python directly
>
>I think we should do this for Debian 14 (forky), and stop shipping
>python3 altogether in Debian 15 (?).

I don't see 1. as a real option at this point. Yes, it'll get less 
useful to keep /usr/bin/python3 if we have /usr/bin/python, but upstream 
installs a python3 binary (IIRC mostly because we asked for it) and 
virtualenv etc. do.

Deperaction discussions should probably happen upstream, once we've 
added /usr/bin/python back. We can start them and say that we're not 
against it.

Stefano

-- 
Stefano Rivera
   http://tumbleweed.org.za/
   +1 415 683 3272

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web