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


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

Re: MBF for deprecating Python2 usage

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Geoffrey Thomas <geofft@ldpreload.com>
Newsgroups linux.debian.maint.python
Subject Re: MBF for deprecating Python2 usage
Date Tue, 08 Aug 2017 04:10:02 +0200
Message-ID <uc282-11e-7@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> <ubYe6-6ih-19@gated-at.bofh.it> <ubZ0u-6St-15@gated-at.bofh.it> <ubZMR-7qT-11@gated-at.bofh.it> <ubZWy-7wz-3@gated-at.bofh.it> <uc1F0-zY-7@gated-at.bofh.it>
X-Original-To debian-python@lists.debian.org
X-Mailbox-Line From debian-python-request@lists.debian.org Tue Aug 8 02:03:22 2017
Old-Return-Path <geofft@ldpreload.com>
X-Amavis-Spam-Status No, score=-2.7 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7] autolearn=no autolearn_force=no
X-Policyd-Weight NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_MX=-3.1 (check from: .ldpreload. - helo: .sasl.smtp.pobox. - helo-domain: .pobox.) FROM/MX_MATCHES_NOT_HELO(DOMAIN)=0; rate: -6.1
Dkim-Signature v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date:from:to :subject:in-reply-to:message-id:references:mime-version :content-type; s=sasl; bh=CAl/y/V3Ro0MLcI2qu0bH/SUlt0=; b=MxJSb+ 2sMpkBwMZGiR8DpXYb//6R3ncrljr2AX4OAS+3f+xHxudVsS7yyDhoQz+Az+3SK6 +aoxN31LbHZ/UU4fE5lWWiIXNHLukVdcyNmSrsRopoICA/Q0pnLfwBCes6hIpFAd 8vUUzSMykJSAmUKWijT3ek8pyI05uTE/jMc8g=
User-Agent Alpine 2.11 (DEB 23 2013-08-11)
MIME-Version 1.0
Content-Type MULTIPART/MIXED; BOUNDARY="465974336-764691575-1502156705=:1801"
X-Pobox-Relay-ID 34240526-7BDB-11E7-9957-FE4B1A68708C-67873895!pb-smtp1.pobox.com
Dkim-Signature v=1; a=rsa-sha256; c=relaxed; d=ldpreload.com; h=date:from:to:subject:in-reply-to:message-id:references:mime-version:content-type; s=mesmtp; bh=PeuQvIBWXbKnvYyj6SDoOeWkkYq24JIr4K/MnlFChn4=; b=UGbSANfUFsBpjoLCPHvYOrMCitilLY+C2QpZPbdbq+/zfCEzsVTPNRraOEa7djXClkWb134tdaHxt6+exeBMSvfaYHk7dNCQDm/+pIbH2wOoRMA8w3JFLRyzRvbjr1gnHcRyjmjMC0cHj2qkqCOh2xdA6kIV4HnQaHWiDzncXgA=
X-Mailing-List <debian-python@lists.debian.org> archive/latest/15113
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/alpine.DEB.2.11.1708072135500.1801@titan.ldpreload.com
Approved robomod@news.nic.it
Lines 61
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Mon, 7 Aug 2017 21:45:05 -0400 (EDT)
X-Original-Message-ID <alpine.DEB.2.11.1708072135500.1801@titan.ldpreload.com>
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> <1502142757.2351.35.camel@ghic.org> <690EAE7E-8005-4723-891E-C2E30C3B35AD@debian.org> <85shh3lzp1.fsf@benfinney.id.au> <1502149701.2351.60.camel@ghic.org> <85inhyn8zk.fsf@benfinney.id.au>
Xref csiph.com linux.debian.maint.python:9732

Show key headers only | View raw


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

On Tue, 8 Aug 2017, Ben Finney wrote:

> The issue is: Invoking ‘python’ today gets an interpereter, Python 2,
> that will work with some code and not others. It should not tomorrow
> invoke an incompatible interpreter without *knowing* that the vast
> majority of scripts in the wild no longer expect Python 2 to come from
> that command.
>
> That day might never come, in which case the ‘python’ command will
> forever mean Python 2. That is, I'm saying, better than breaking that
> command in the near or medium future.
>
> I'm saying it's a bad idea for ‘python’ tomorrow to get an incompatible
> intepreter that won't run the same Python code. That interpreter is
> named ‘python3’ and should never be installed as ‘python’, because
> ‘python’ is a command that many scripts expect to invoke Python 2.

This conflates the role of the interactive Python interpreter (which is 
what Diane was referring to) and a script interpreter. #!/usr/bin/python 
and `python -c` are ABI referring to Python 2, yes, and can't start 
running Python 3 any more than /lib/libc.so.5 can start being glibc. But 
there's no reason this should prevent typing "python" from giving you a 
Python 3 interpreter.

Since I think it hasn't been linked recently on this list, I'll re-link 
this project, which separates the two roles:

     https://github.com/geofft/pythonmux
     https://ldpreload.com/blog/usr-bin-python-23

Keep in mind that we do intend to break the ability for /usr/bin/python to 
run Python 2 code in less than three years (unless we're interested in 
providing security support for Python 2 when it's dead upstream, which I 
hope nobody wants to do). We will not indefinitely provide a 
/usr/bin/python that runs Python 2; we probably will do so for at most one 
more stable release.

The only question is whether it should break by giving you an error 
message (either ENOENT or something printed on stderr), or break by trying 
to run the code as Python 3.

-- 
Geoffrey Thomas
https://ldpreload.com
geofft@ldpreload.com

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