Why Ubuntu doesn’t support certain form of shebang for Python?

Barry Warsaw barry at ubuntu.com
Wed Nov 12 23:18:48 UTC 2014


On Nov 11, 2014, at 03:52 PM, Neal McBurnett wrote:

>I should have clarified my point better.  Scott's message recommended putting
>python, rather than python2 in shebangs, since it works in more distros.
>That seems to be In contrast with PEP 394, which says to use python2 rather
>than python, unless the code works in both python 2.x and python 3.x.  That
>is in order to facilitate migration, and it would be necessary before anyone
>could make the next step you talk of (pointing python to python 3).
>
>That's why I'm wondering where the PEP 394 approach doesn't currently work,
>and when we might indeed recommend following the current PEP 394 standard.

PEP 394 is just an informational PEP, so while I think it can be a useful
vehicle for helping guide downstream consumers, it doesn't have to be taken as
a set in stone.

For Ubuntu and Debian, it really won't matter much in practice if the shebang
is python or python2.

As I mentioned, I don't expect /usr/bin/python to point to Python 3 in Ubuntu
anytime soon, or even ever.  Python 2.7 will be bug fix released upstream
until 2020 (see PEP 373) so we have at least 6 years to fret about it.

Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20141112/e1020350/attachment.sig>


More information about the Ubuntu-devel-discuss mailing list