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


Groups > linux.debian.maint.python > #9698

Re: MBF for deprecating Python2 usage

From Scott Kitterman <debian@kitterman.com>
Newsgroups linux.debian.maint.python
Subject Re: MBF for deprecating Python2 usage
Date 2017-08-04 23:10 +0200
Message-ID <uaS13-3Oj-19@gated-at.bofh.it> (permalink)
References <uawjU-5YP-3@gated-at.bofh.it> <uaBtf-1rM-9@gated-at.bofh.it> <uaLCi-867-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

On Friday, August 04, 2017 10:13:00 AM barry@debian.org wrote:
> On Aug 3, 2017, at 23:23, Scott Kitterman <debian@kitterman.com> wrote:
> > Read it.  I remain completely convinced that /usr/bin/python pointing at a
> > python3 version is utterly wrong and a disservice to our users.  Even
> > after we remove python2.7, people will be locally compiling it and using
> > it for a decade.
> I think it’s inevitable, and not doing so *eventually* will be a greater
> disservice.  Sure, not today, maybe not in 2020, but I don’t think we’ll be
> having this discussion in 2025.  If by then, 5 years after Python 2.7 EOL,
> users read on SO or some Learning Python site that they can just type
> ‘python' to get an interactive prompt, but it doesn’t work on Debian,
> they’ll think Debian is broken, not Python.  So I think it makes sense to
> consider how the transition will work.
> 
> You’re right that folks will still need Python 2 after 2020, and that their
> best option may be to build it themselves, but I don’t think they’ll be
> building and installing some old Debian package.  Instead they may build
> from source, which means they’ll be installing it into /usr/local/bin not
> /usr/bin, and they’ll have to change their shebang lines anyway.  And there
> will come a time when even Python 2.7 is unbuildable as toolchains and
> libraries evolve.  Upstream will stop tracking those changes so even the
> upstream git repo won’t give you buildable source.  There may be a bunch of
> third party forks, but I don’t think it’s our responsibility to ensure that
> Debian aligns with any of those hypotheticals.  Folks needing to stay on
> Python 2 will probably also just elect to not upgrade their OS, so what we
> do in future releases won’t matter to them.
> 
> Upstream and Debian already install a `python2` alias for `python`, and I
> think we need to join the chorus that in the future, the way to run Python
> 2 is via `python2`.  Yes, people will have legacy stuff around for a long
> time, but it’s better to begin the transition now rather than make a major
> break years from now.
> > Such a change would be actively user hostile.
> > 
> > When python2.7 goes away, /usr/bin/python should go too.
> 
> Maybe in the short term (as Matthias suggests), but I’m not so sure it’s
> best to disappear /usr/bin/python forever.  /usr/bin/python is not just the
> common shebang (and we should be actively transitioning to /usr/bin/python2
> for that), but it’s also the command line UI for people wanting to learn
> Python, or just wanting to get an interactive interpreter to play with.
> There will be a day when, if they get a command not found when typing
> `python` at a shell prompt, they will wonder why Debian is broken.
> 
> I think the transition should roughly be:
> 
> * Update policy and tooling so that any scripts that require Python 2 use
> /usr/bin/python2 in their shebang.
> 
> * Educate our users that they should be using `python2` for anything that
> has not been ported.
> 
> * Port as much as possible to Python 3 (eventually, everything maintained in
> Debian) and /usr/bin/python3 in their shebang.
> 
> * Plan for a date at which /usr/bin/python will point to Python 3.  I know
> that’s the most controversial bit, but I do think that as time goes on and
> we’re past 2020, it will be the choice that gives our users the best
> experience.
> 
> The discussion on linux-sig is a way to align the entire Python Linux
> ecosystem to the eventual goal, giving individual distros the leeway they
> need to time such transitions as they see fit to best serve their users. 
> I’m hoping more Debian Pythonistas will join that discussion, otherwise the
> outcome will be heavily weighted toward other Linux distros and Debian may
> find itself without a voice in the matter.

PEP-394 convinced me that upstream wasn't concerned about the same things 
Debian is concerned about.  Even though they did manage to say in the PEP:

> The main barrier to a distribution switching the python command from python2
> to python3 isn't breakage within the distribution, but instead breakage of
> private third party scripts developed by sysadmins and other users.
> Updating the python command to invoke python3 by default indicates that a
> distribution is willing to break such scripts with errors that are
> potentially quite confusing for users that aren't yet familiar with the
> backwards incompatible changes in Python 3.

they don't actually consider the implications of that statement.

The current discussion only seems to compound the error.  I don't see a lot of 
value in personally expending time on the upstream discussion.

If the primary concern is what happens when a user types "python", then can we 
address that in command-not-found and leave /usr/bin/python out of it?

Scott K

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

MBF for deprecating Python2 usage Matthias Klose <doko@debian.org> - 2017-08-04 00:00 +0200
  Re: MBF for deprecating Python2 usage barry@debian.org - 2017-08-04 03:10 +0200
    Re: MBF for deprecating Python2 usage Scott Kitterman <debian@kitterman.com> - 2017-08-04 05:30 +0200
      Re: MBF for deprecating Python2 usage Piotr Ożarowski <piotr@debian.org> - 2017-08-04 08:10 +0200
      Re: MBF for deprecating Python2 usage barry@debian.org - 2017-08-04 16:20 +0200
        Re: MBF for deprecating Python2 usage Ole Streicher <olebole@debian.org> - 2017-08-04 17:10 +0200
          Re: MBF for deprecating Python2 usage Barry Warsaw <barry@debian.org> - 2017-08-04 17:50 +0200
        Re: MBF for deprecating Python2 usage Scott Kitterman <debian@kitterman.com> - 2017-08-04 23:10 +0200
          Re: MBF for deprecating Python2 usage Barry Warsaw <barry@debian.org> - 2017-08-05 03:40 +0200
            Re: MBF for deprecating Python2 usage Scott Kitterman <debian@kitterman.com> - 2017-08-05 04:10 +0200
          Re: MBF for deprecating Python2 usage Geoffrey Thomas <geofft@ldpreload.com> - 2017-08-08 00:50 +0200
        Re: MBF for deprecating Python2 usage Diane Trout <diane@ghic.org> - 2017-08-08 00:00 +0200
          Re: MBF for deprecating Python2 usage Barry Warsaw <barry@debian.org> - 2017-08-08 00:50 +0200
            Re: MBF for deprecating Python2 usage Ben Finney <bignose@debian.org> - 2017-08-08 01:40 +0200
              Re: MBF for deprecating Python2 usage Diane Trout <diane@ghic.org> - 2017-08-08 01:50 +0200
                Re: MBF for deprecating Python2 usage Ben Finney <bignose@debian.org> - 2017-08-08 03:40 +0200
                Re: MBF for deprecating Python2 usage Barry Warsaw <barry@debian.org> - 2017-08-08 04:00 +0200
                Re: MBF for deprecating Python2 usage Ben Finney <bignose@debian.org> - 2017-08-08 04:20 +0200
                Re: MBF for deprecating Python2 usage Diane Trout <diane@ghic.org> - 2017-08-08 05:10 +0200
                Re: MBF for deprecating Python2 usage Ben Finney <bignose@debian.org> - 2017-08-08 05:30 +0200
                Re: MBF for deprecating Python2 usage Diane Trout <diane@ghic.org> - 2017-08-08 05:40 +0200
                Re: MBF for deprecating Python2 usage Ben Finney <bignose@debian.org> - 2017-08-08 06:00 +0200
                Re: MBF for deprecating Python2 usage Barry Warsaw <barry@debian.org> - 2017-08-08 07:00 +0200
                Re: MBF for deprecating Python2 usage Geoffrey Thomas <geofft@ldpreload.com> - 2017-08-08 04:10 +0200
                Re: MBF for deprecating Python2 usage Ben Finney <bignose@debian.org> - 2017-08-08 04:30 +0200
                Re: MBF for deprecating Python2 usage Diane Trout <diane@ghic.org> - 2017-08-08 05:20 +0200
                Re: MBF for deprecating Python2 usage Ben Finney <bignose@debian.org> - 2017-08-08 05:40 +0200
                Re: MBF for deprecating Python2 usage Steve Langasek <vorlon@debian.org> - 2017-08-08 07:30 +0200
                Re: MBF for deprecating Python2 usage Ben Finney <bignose@debian.org> - 2017-08-08 08:20 +0200
                Re: MBF for deprecating Python2 usage Geoffrey Thomas <geofft@ldpreload.com> - 2017-08-10 17:40 +0200
                Re: MBF for deprecating Python2 usage Ole Streicher <olebole@debian.org> - 2017-08-08 21:20 +0200
                Re: MBF for deprecating Python2 usage Scott Kitterman <debian@kitterman.com> - 2017-08-08 21:30 +0200
    Re: MBF for deprecating Python2 usage Matthias Klose <doko@debian.org> - 2017-08-04 13:00 +0200
      Re: MBF for deprecating Python2 usage Scott Kitterman <debian@kitterman.com> - 2017-08-04 14:40 +0200
  Re: MBF for deprecating Python2 usage Adrian Bunk <bunk@debian.org> - 2017-08-07 00:00 +0200
  Re: MBF for deprecating Python2 usage Adrian Bunk <bunk@debian.org> - 2017-08-07 01:00 +0200
  Re: MBF for deprecating Python2 usage Christian Seiler <christian@iwakd.de> - 2017-08-07 01:10 +0200

csiph-web