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


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

Re: MBF for deprecating Python2 usage

Path csiph.com!feeder.erje.net!2.eu.feeder.erje.net!feeds.phibee-telecom.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Ole Streicher <olebole@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: MBF for deprecating Python2 usage
Date Fri, 04 Aug 2017 17:10:02 +0200
Message-ID <uaMoG-br-11@gated-at.bofh.it> (permalink)
References <uawjU-5YP-3@gated-at.bofh.it> <uazhM-8iN-19@gated-at.bofh.it> <uaBtf-1rM-9@gated-at.bofh.it> <uaLCi-867-15@gated-at.bofh.it>
X-Mailbox-Line From debian-python-request@lists.debian.org Fri Aug 4 15:09:10 2017
Old-Return-Path <news@liska.ath.cx>
X-Amavis-Spam-Status No, score=-5.759 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, HEADER_FROM_DIFFERENT_DOMAINS=0.001, LDO_WHITELIST=-5, SARE_LWSHORTT=1.24] autolearn=no autolearn_force=no
X-Policyd-Weight using cached result; rate: -7
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
Lines 56
X-Mailing-List <debian-python@lists.debian.org> archive/latest/15077
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/87shh7z8q2.fsf@debian.org
Approved robomod@news.nic.it
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Fri, 04 Aug 2017 16:52:05 +0200
X-Original-Message-ID <87shh7z8q2.fsf@debian.org>
X-Original-References <f8492955-8f73-8a18-456d-5bb400b5aff7@debian.org> <3109A909-3338-4717-BFD2-D65E9206FD7F@debian.org> <9614BFBC-E260-48A6-B722-DDD41E715A20@kitterman.com> <92E6FF73-391C-45FE-A213-6AAED284629D@debian.org>
Xref csiph.com linux.debian.maint.python:9696

Show key headers only | View raw


barry@debian.org writes:
> On Aug 3, 2017, at 23:23, Scott Kitterman <debian@kitterman.com> wrote:
> 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.

It is very usual to use "#!/usr/bin/env python" as shebang, exactly for
the case that python is not installed in /usr/bin.

>> 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.

That is -- at least in my environmet -- "ipython", or (for Python 3)
"ipython3".

> 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.

IMO it would be better to communicate that the best way for an
interactive session is "ipython3" (or "python3", if you insist). I would
wonder when todays tutorials (that cover Python 3) recommend to use
plain "python".

> 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.

I disagree here, and I don't see an advantage over letting
/usr/bin/python just die with Python 2.

I would also like to point PEP 394, which has a number of arguments why
/usr/bin/python should remain as Python 2.

https://www.python.org/dev/peps/pep-0394/

Best regards

Ole

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