Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #9732
| From | Geoffrey Thomas <geofft@ldpreload.com> |
|---|---|
| Newsgroups | linux.debian.maint.python |
| Subject | Re: MBF for deprecating Python2 usage |
| Date | 2017-08-08 04:10 +0200 |
| Message-ID | <uc282-11e-7@gated-at.bofh.it> (permalink) |
| References | (4 earlier) <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> |
| Organization | linux.* mail to news gateway |
[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
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