Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
[Scott Kitterman, 2015-04-14] Even after Python (meaning python2.7) is no longer in the archive (let alone part of some type of default install), people might still roll their own. I think the only possible answer to the question of what should /usr/bin/python point to when there's no python2 on the system is that it shouldn't exist. If you want python (which include /usr/bin/python), install it. If you want python3, then the interpreter you're looking for is found at /usr/bin/python3. There's no dilemma to solve. +1 PS will this meeting be streamed or recording available somewhere later? -- Piotr Ożarowski Debian GNU/Linux Developer www.ozarowski.pl www.griffith.cc www.debian.org GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645 -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150414065507.gf2...@sar0.p1otr.com
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On 14 April 2015 at 16:38, Scott Kitterman deb...@kitterman.com wrote: On Monday, April 13, 2015 10:36:43 PM Barry Warsaw wrote: On Apr 14, 2015, at 01:57 AM, Matthias Klose wrote: #! /bin/sh python=$(shuffle /usr/bin/python2 /usr/bin/python3) exec $python $@ That was more or less the joke I made at the Pycon Language Summit. It's too twisted *not* to implement. :) But the idea of a (perhaps less perverse) launcher would solve the PEP 394 dilemma of what /usr/bin/python should point to when there's no Python 2 on the system by default. E.g. maybe it reads a configuration file to determine whether it runs /usr/bin/python2 or /usr/bin/python3. Even after Python (meaning python2.7) is no longer in the archive (let alone part of some type of default install), people might still roll their own. I think the only possible answer to the question of what should /usr/bin/python point to when there's no python2 on the system is that it shouldn't exist. If you want python (which include /usr/bin/python), install it. If you want python3, then the interpreter you're looking for is found at /usr/bin/python3. There's no dilemma to solve. I agree. Maybe in 2029 we can revisit it, but I've seen absolutely no good reason to push on this other than 'Gentoo did it' - scratch that, absolutely no good reason to push on it. -Rob -- Robert Collins rbtcoll...@hp.com Distinguished Technologist HP Converged Cloud -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/CAJ3HoZ0BPr=fbnmqrwc5mz_bcj-bua4+qlu+a64c-vjzn7o...@mail.gmail.com
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On Apr 14, 2015, at 12:38 AM, Scott Kitterman wrote: If you want python (which include /usr/bin/python), install it. If you want python3, then the interpreter you're looking for is found at /usr/bin/python3. I just don't want it to fail mysteriously. When there's no Python 2 by default, command-not-found will solve the type-it-at-the-shell failure mode just fine: $ python The program 'python is currently not installed. You can install it by typing: sudo apt-get install python-for-dinosaurs But it fails unhelpfully when you use it in a shebang. $ /tmp/foo.py bash: /tmp/foo.py: /usr/bin/python: bad interpreter: No such file or directory Let's make the latter more helpful. Cheers, -Barry pgp6w4t1eCOgX.pgp Description: OpenPGP digital signature
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On 14 April 2015 at 08:10, Barry Warsaw ba...@python.org wrote: But it fails unhelpfully when you use it in a shebang. $ /tmp/foo.py bash: /tmp/foo.py: /usr/bin/python: bad interpreter: No such file or directory Let's make the latter more helpful. From a script authors point of view, it's currently safe to assume that a shebang like '#!/usr/bin/env python' will work on any Linux machine. In some cases (Arch) it may already refer to Python 3, but with some care it's entirely possible to write a script that can do the right thing on Python 2 or 3. If distros start to remove 'python', there's an interim period before it's safe to assume that 'python3' is available everywhere, and script authors currently don't have any good options to bridge that. I know Debian is all in on treating Python 2 and 3 as two entirely separate worlds, but that's not how everyone sees them. It would be nice to make some kind of affordance to people for whom they are two versions of the same language. Thomas
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
I'm planning on playing notekeeper, and I'll publish a summary of what was discussed to this thread, if that works. great, thanks -- Piotr Ożarowski Debian GNU/Linux Developer www.ozarowski.pl www.griffith.cc www.debian.org GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645 -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150414115737.gg2...@sar0.p1otr.com
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On Tue, Apr 14, 2015 at 08:55:07AM +0200, Piotr Ożarowski wrote: If you want python (which include /usr/bin/python), install it. If you want python3, then the interpreter you're looking for is found at /usr/bin/python3. There's no dilemma to solve. +1 +1, but only because I hate /usr/bin/python without a number. PS will this meeting be streamed or recording available somewhere later? Sadly no, this will just be a few of us during the sprints -- I'm planning on playing notekeeper, and I'll publish a summary of what was discussed to this thread, if that works. Paul -- .''`. Paul Tagliamonte paul...@debian.org | Proud Debian Developer : :' : 4096R / 8F04 9AD8 2C92 066C 7352 D28A 7B58 5B30 807C 2A87 `. `'` http://people.debian.org/~paultag `- http://people.debian.org/~paultag/conduct-statement.txt signature.asc Description: Digital signature
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
Hi debian-python (2015.04.13_22:17:03_+0200) Matthias and I are planning to have a Debian Python BoF at PyCon, tomorrow afternoon. I think lunch is 2pm, so 3pm? Meet outside the cPython sprint room? In case you didn't see the private mails: We've got a table in room 513b. Still on for 3pm SR -- Stefano Rivera http://tumbleweed.org.za/ +1 415 683 3272 -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150414182725.ga3...@bach.rivera.co.za
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
I'm trying to make sure I understand this subthread correctly. Is the following an accurate summary of the desires? 1. It should be possible, in Debian, not to ship Python 2 by default in the near future, and to remove Python 2 from the archive in the far future. 2. A huge number of existing/legacy scripts use #!/usr/bin/env python or perhaps #!/usr/bin/python to mean Python 2. Until at least 2020 (when Python 2.7 is desupported), it should be possible to install Python 2.7, whether through the package manager or otherwise, and have these scripts run correctly. If this is done, it should not break unrelated things in Debian, like Python 3.x-only scripts that ship with Debian. 3. It should be possible for authors of new both-Python-2-and-3 source to write scripts so that they run on both an existing/legacy machine with Python 2.x installed only, and on future machines with Python 3.x installed only. Legacy machines will have Python 2 at /usr/bin/python, and no wrapper. Future machines might have a wrapper. (For instance, it's OK if the mechanism to solve this does not address current Ubuntu releases that ship Python 3 only by default.) I think this is solvable by defining a standard to identify polyglot Python 2/3 source. For instance, say that polyglot scripts should start #!/usr/bin/env python # py23 and add a wrapper in /usr/bin (perhaps via dpkg-divert) that checks to see if the second line of its input is # py23 (or /^# *py23$/, or something). If so, it execs Python 3; if not, and if it can't find Python 2, it prints a useful error to stderr and exits. (For interactive use, it could print a warning and run Python 3, or silently exec Python 3, or something.) -- Geoffrey Thomas https://ldpreload.com geo...@ldpreload.com -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/alpine.deb.2.10.1504141028400.18...@cactuar.ldpreload.com
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On Tue, Apr 14, 2015 at 10:00:07AM -0400, Scott Kitterman wrote: It is, as I think it was you said, easy enough to write Python code these days that works for both python and python3. As an upstream developer, go ahead and do that and leave it to the distros to packageit appropriately for their environment. FWIW; the only place I even touch Python 2 code is in Debian, 100% of work and personal software is Python 3. So, I'm a bit of a radical here, but I'm pretty anti-Python 2. Most of my projects don't support Python 2 at all. I don't think it's possible to have something that at runtime call python2.7 or python3 based on what's in the code. I believe the shim would be to yell at the user to install a legacy thing, not switch between the two, that was a joke Barry made during the Language summit. Howabout we wait until *after* we try to hash this out in person. I'll write up thoughts and we can form consensus after, on list and in a public way. I think the spread of opinions voiced in this thread will be well represented in the room, so it should go well to figure out stuff that would be practical and implementable.. If anyone has *different* oppinions, you should give me an off-thread ping with your thoughts so I can bring them up today. Cheers, Tag -- .''`. Paul Tagliamonte paul...@debian.org | Proud Debian Developer : :' : 4096R / 8F04 9AD8 2C92 066C 7352 D28A 7B58 5B30 807C 2A87 `. `'` http://people.debian.org/~paultag `- http://people.debian.org/~paultag/conduct-statement.txt signature.asc Description: Digital signature
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On Tuesday, April 14, 2015 09:22:22 AM Thomas Kluyver wrote: On 14 April 2015 at 08:57, Scott Kitterman deb...@kitterman.com wrote: I have scripts I use locally that are untouched in almost a decade that use /usr/bin/python. I'm thinking about scripts that are written and distributed to people running on different, unknown, Linux distros. Obviously if you're only targeting your own machines, there's no problem. But if you want to write a script that will work for arbitrary Linux users, what should you do? I imagine it's not yet a safe assumption that python3 is installed everywhere, but on the other hand, Ubuntu and Fedora are both looking at dropping Python 2, so without some kind of compatibility shim it won't be safe to assume there's a python command. I'm using myself as a stand in for users generally in this example. I'm sure I'm not alone in this. Making /usr/bin/python point at python3 is just bad design. It is, as I think it was you said, easy enough to write Python code these days that works for both python and python3. As an upstream developer, go ahead and do that and leave it to the distros to packageit appropriately for their environment. In the case of Debian/Ubuntu, if something needs python (vice python3), it should have proper dependencies declared. What's there or not by default doesn't matter. I don't think it's possible to have something that at runtime call python2.7 or python3 based on what's in the code. The only thing it could select based on is what's in the shebang and that helps not at all because if the shebang isn't /usr/bin/python the launcher won't get called and if it is, you have to assume it's python2.7 that's meant. Scott K -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/2559043.CTEsoOA8ER@kitterma-e6430
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On 2015-04-14 at 09:22:22 -0400, Thomas Kluyver wrote: I'm thinking about scripts that are written and distributed to people running on different, unknown, Linux distros. Obviously if you're only targeting your own machines, there's no problem. But if you want to write a script that will work for arbitrary Linux users, what should you do? I imagine it's not yet a safe assumption that python3 is installed everywhere, but on the other hand, Ubuntu and Fedora are both looking at dropping Python 2, so without some kind of compatibility shim it won't be safe to assume there's a python command. If I was writing something new today I would use python3, put python3 in the shebang and just say that it needs python3 as a dependency, and let the users install it from the package manager if they need it. The only machines I can think of where python3 may not be available even as a package are old redhat ones where the version of python2 is so ancient that it doesn't have the compatibility features required to run py2/py3 code anyway. -- Elena ``of Valhalla'' -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150414140911.gc9...@virginsteele.home.trueelena.org
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On Tuesday, April 14, 2015 08:10:49 AM Barry Warsaw wrote: On Apr 14, 2015, at 12:38 AM, Scott Kitterman wrote: If you want python (which include /usr/bin/python), install it. If you want python3, then the interpreter you're looking for is found at /usr/bin/python3. I just don't want it to fail mysteriously. When there's no Python 2 by default, command-not-found will solve the type-it-at-the-shell failure mode just fine: $ python The program 'python is currently not installed. You can install it by typing: sudo apt-get install python-for-dinosaurs But it fails unhelpfully when you use it in a shebang. $ /tmp/foo.py bash: /tmp/foo.py: /usr/bin/python: bad interpreter: No such file or directory Let's make the latter more helpful. OK, but running an incompatible interpreter doesn't fall into that category. Scott K signature.asc Description: This is a digitally signed message part.
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On 14 April 2015 at 08:57, Scott Kitterman deb...@kitterman.com wrote: I have scripts I use locally that are untouched in almost a decade that use /usr/bin/python. I'm thinking about scripts that are written and distributed to people running on different, unknown, Linux distros. Obviously if you're only targeting your own machines, there's no problem. But if you want to write a script that will work for arbitrary Linux users, what should you do? I imagine it's not yet a safe assumption that python3 is installed everywhere, but on the other hand, Ubuntu and Fedora are both looking at dropping Python 2, so without some kind of compatibility shim it won't be safe to assume there's a python command. Thomas
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On Tuesday, April 14, 2015 08:24:01 AM Thomas Kluyver wrote: On 14 April 2015 at 08:10, Barry Warsaw ba...@python.org wrote: But it fails unhelpfully when you use it in a shebang. $ /tmp/foo.py bash: /tmp/foo.py: /usr/bin/python: bad interpreter: No such file or directory Let's make the latter more helpful. From a script authors point of view, it's currently safe to assume that a shebang like '#!/usr/bin/env python' will work on any Linux machine. In some cases (Arch) it may already refer to Python 3, but with some care it's entirely possible to write a script that can do the right thing on Python 2 or 3. If distros start to remove 'python', there's an interim period before it's safe to assume that 'python3' is available everywhere, and script authors currently don't have any good options to bridge that. I know Debian is all in on treating Python 2 and 3 as two entirely separate worlds, but that's not how everyone sees them. It would be nice to make some kind of affordance to people for whom they are two versions of the same language. My concern regarding the future of /usr/bin/python isn't for things that are being updated, but for things that aren't. Anything written for python3 already uses /usr/bin/python3, so there's no forward compatibility issue. I have scripts I use locally that are untouched in almost a decade that use /usr/bin/python. They work and require no maintenance. I've not ported them to python3, because there's no need. It would seriously break my expectations as an admin if at some point I upgraded to a new version of Debian and /usr/bin/python magically switched to python3 and all my stuff broke. It's at least half a decade too soon to even think about this (I know Arch went insane, but that's their problem IMO). Scott K -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/9342632.b15tYHvqKN@kitterma-e6430
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On 04/13/2015 11:07 PM, Donald Stufft wrote: On Apr 13, 2015, at 4:17 PM, Stefano Rivera stefa...@debian.org wrote: Matthias and I are planning to have a Debian Python BoF at PyCon, tomorrow afternoon. I think lunch is 2pm, so 3pm? Meet outside the cPython sprint room? Matthias wants to discuss general stretch goals for Python in Debian. I want to make concrete plans for py3k packages that are compatible with multiple interpreters. Does this mean PyPy too? It’d be great to have a (not just specific to Debian) standard for how to mark a binary for a particular Python that gracefully handles other interpreters too. Right now we have the de facto standard of binary, binaryX, and binaryX.Y but that really only sanely handles CPython. can we do that in a separate session? I'm not keen on introducing another hierarchy like /usr/lib/pypy2/dist-packages, and a hierarchy of pypy-* and pypy3-* packages. This is an issue for dependency tracking (for Debian packages), and multiarch able packages. I feel that deserves some more preparation, and time. Matthias -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/552c3eb1.20...@debian.org
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On Apr 13, 2015, at 10:17 PM, Stefano Rivera wrote: Matthias and I are planning to have a Debian Python BoF at PyCon, tomorrow afternoon. I think lunch is 2pm, so 3pm? Meet outside the cPython sprint room? +1; +1 Matthias wants to discuss general stretch goals for Python in Debian. I want to make concrete plans for py3k packages that are compatible with multiple interpreters. After a brief chat with paultag earlier today, I'd also like to talk about: * Moving the team to git + $patch_regime * Getting to no-python2-by-default * Bringing the relevant open-stack managed packages into the team * Possible /usr/bin/python launcher (what did I forget?) Cheers, -Barry -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150413163059.3666d3ec@anarchist
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On Mon, 13 Apr 2015, Barry Warsaw wrote: On Apr 13, 2015, at 10:17 PM, Stefano Rivera wrote: Matthias and I are planning to have a Debian Python BoF at PyCon, tomorrow afternoon. I think lunch is 2pm, so 3pm? Meet outside the cPython sprint room? +1; +1 Matthias wants to discuss general stretch goals for Python in Debian. I want to make concrete plans for py3k packages that are compatible with multiple interpreters. After a brief chat with paultag earlier today, I'd also like to talk about: * Moving the team to git + $patch_regime * Getting to no-python2-by-default * Bringing the relevant open-stack managed packages into the team * Possible /usr/bin/python launcher I'll be there, all of those sound fun to work on. -- Geoffrey Thomas https://ldpreload.com geo...@ldpreload.com -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/alpine.deb.2.10.1504131643320.18...@cactuar.ldpreload.com
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On Apr 13, 2015, at 4:17 PM, Stefano Rivera stefa...@debian.org wrote: Matthias and I are planning to have a Debian Python BoF at PyCon, tomorrow afternoon. I think lunch is 2pm, so 3pm? Meet outside the cPython sprint room? Matthias wants to discuss general stretch goals for Python in Debian. I want to make concrete plans for py3k packages that are compatible with multiple interpreters. Does this mean PyPy too? It’d be great to have a (not just specific to Debian) standard for how to mark a binary for a particular Python that gracefully handles other interpreters too. Right now we have the de facto standard of binary, binaryX, and binaryX.Y but that really only sanely handles CPython. --- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA signature.asc Description: Message signed with OpenPGP using GPGMail
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On April 13, 2015 4:30:59 PM EDT, Barry Warsaw ba...@debian.org wrote: On Apr 13, 2015, at 10:17 PM, Stefano Rivera wrote: Matthias and I are planning to have a Debian Python BoF at PyCon, tomorrow afternoon. I think lunch is 2pm, so 3pm? Meet outside the cPython sprint room? +1; +1 Matthias wants to discuss general stretch goals for Python in Debian. I want to make concrete plans for py3k packages that are compatible with multiple interpreters. After a brief chat with paultag earlier today, I'd also like to talk about: * Moving the team to git + $patch_regime * Getting to no-python2-by-default * Bringing the relevant open-stack managed packages into the team * Possible /usr/bin/python launcher What is a /usr/bin/python launcher? Scott K -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/a45bbe46-59f6-4eef-b102-741a43b3b...@kitterman.com
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
Hi Scott (2015.04.14_01:20:47_+0200) What is a /usr/bin/python launcher? I think that was what Donald was asking for. My gut feeling here is that that's a crazy idea. SR -- Stefano Rivera http://tumbleweed.org.za/ +1 415 683 3272 -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150413233159.gb3...@bach.rivera.co.za
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On 04/14/2015 01:20 AM, Scott Kitterman wrote: What is a /usr/bin/python launcher? #! /bin/sh python=$(shuffle /usr/bin/python2 /usr/bin/python3) exec $python $@ I agree it's not perfect, there should be a preference depending on the number of '2' and '3' digits in the date, when you're trying to execute it. -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/552c57e6.6010...@debian.org
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On Tuesday, April 14, 2015 01:57:26 AM Matthias Klose wrote: On 04/14/2015 01:20 AM, Scott Kitterman wrote: What is a /usr/bin/python launcher? #! /bin/sh python=$(shuffle /usr/bin/python2 /usr/bin/python3) exec $python $@ I agree it's not perfect, there should be a preference depending on the number of '2' and '3' digits in the date, when you're trying to execute it. So the goal is to break local python stuff someday? Somehow that doesn't strike me as a feature. Scott K -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/1705842.0hWDhC0SZA@kitterma-e6430
Re: PyCon BoF: Stretch goals for cPython, PyPy CFFI
On Monday, April 13, 2015 10:36:43 PM Barry Warsaw wrote: On Apr 14, 2015, at 01:57 AM, Matthias Klose wrote: #! /bin/sh python=$(shuffle /usr/bin/python2 /usr/bin/python3) exec $python $@ That was more or less the joke I made at the Pycon Language Summit. It's too twisted *not* to implement. :) But the idea of a (perhaps less perverse) launcher would solve the PEP 394 dilemma of what /usr/bin/python should point to when there's no Python 2 on the system by default. E.g. maybe it reads a configuration file to determine whether it runs /usr/bin/python2 or /usr/bin/python3. Even after Python (meaning python2.7) is no longer in the archive (let alone part of some type of default install), people might still roll their own. I think the only possible answer to the question of what should /usr/bin/python point to when there's no python2 on the system is that it shouldn't exist. If you want python (which include /usr/bin/python), install it. If you want python3, then the interpreter you're looking for is found at /usr/bin/python3. There's no dilemma to solve. Scott K -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/36643332.m5KcQVD1Ai@kitterma-e6430