Message287181
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. |
|
Date |
User |
Action |
Args |
2017-02-06 23:59:48 | paul.moore | set | recipients:
+ paul.moore, tim.golden, zach.ware, eryksun, steve.dower, wdhwg001, ricpol |
2017-02-06 23:59:48 | paul.moore | set | messageid: <1486425588.31.0.138912787082.issue28686@psf.upfronthosting.co.za> |
2017-02-06 23:59:48 | paul.moore | link | issue28686 messages |
2017-02-06 23:59:48 | paul.moore | create | |
|