Path: csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod From: Geoffrey Thomas Newsgroups: linux.debian.maint.python Subject: Re: MBF for deprecating Python2 usage Date: Tue, 08 Aug 2017 04:10:02 +0200 Message-ID: References: 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: 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: archive/latest/15113 List-ID: List-URL: 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: X-Original-References: <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 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --465974336-764691575-1502156705=:1801 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 8 Aug 2017, Ben Finney wrote: > The issue is: Invoking =E2=80=98python=E2=80=99 today gets an interperete= r, 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 =E2=80=98python=E2=80=99 com= mand 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 =E2=80=98python=E2=80=99 tomorrow to get a= n incompatible > intepreter that won't run the same Python code. That interpreter is > named =E2=80=98python3=E2=80=99 and should never be installed as =E2=80= =98python=E2=80=99, because > =E2=80=98python=E2=80=99 is a command that many scripts expect to invoke = Python 2. This conflates the role of the interactive Python interpreter (which is=20 what Diane was referring to) and a script interpreter. #!/usr/bin/python=20 and `python -c` are ABI referring to Python 2, yes, and can't start=20 running Python 3 any more than /lib/libc.so.5 can start being glibc. But=20 there's no reason this should prevent typing "python" from giving you a=20 Python 3 interpreter. Since I think it hasn't been linked recently on this list, I'll re-link=20 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= =20 run Python 2 code in less than three years (unless we're interested in=20 providing security support for Python 2 when it's dead upstream, which I=20 hope nobody wants to do). We will not indefinitely provide a=20 /usr/bin/python that runs Python 2; we probably will do so for at most one= =20 more stable release. The only question is whether it should break by giving you an error=20 message (either ENOENT or something printed on stderr), or break by trying= =20 to run the code as Python 3. --=20 Geoffrey Thomas https://ldpreload.com geofft@ldpreload.com --465974336-764691575-1502156705=:1801--