This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.moore
Recipients eryksun, paul.moore, ricpol, steve.dower, tim.golden, wdhwg001, zach.ware
Date 2017-02-06.23:59:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486425588.31.0.138912787082.issue28686@psf.upfronthosting.co.za>
In-reply-to
Content
I agree, I don't particularly want versioned executables. I'm not sure I see much point to even having versioned launchers - "py -2" and "py -3" seem fine to me if needed.

The only use cases I can see are:

1. Use the Python executable that's first on PATH: "py"
2. Use the specific system installation of Python X[.Y]: "py -X[.Y]"

For shebang usage:

1. Use the Python executable that's first on PATH: "#!/usr/bin/env python"
2. Use the specific system installation of Python X[.Y]: "#!/usr/bin/pythonX[.Y]"
3. Use a specific interpreter: "#!<absolute path>"

The Unix ability to have 2 different versions of Python on PATH and select which you use based on executable name doesn't exist on Windows, and so there's no equivalent of the Unix "#!/usr/bin/env pythonX[.Y]"

If you want your script to fail under certain conditions - whether it's that the interpreter is a version you don't support, or something else, then test for that case and fail with an error. Checking runtime conditions doesn't need to be handled by the shebang.

The only change I'd consider reasonable here would be a doc change to explain the behaviour a bit more clearly. I might try to put something together if I have the time.
History
Date User Action Args
2017-02-06 23:59:48paul.mooresetrecipients: + paul.moore, tim.golden, zach.ware, eryksun, steve.dower, wdhwg001, ricpol
2017-02-06 23:59:48paul.mooresetmessageid: <1486425588.31.0.138912787082.issue28686@psf.upfronthosting.co.za>
2017-02-06 23:59:48paul.moorelinkissue28686 messages
2017-02-06 23:59:48paul.moorecreate