-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow windows launcher to specify bit lengths with & without minor version #74477
Comments
Currently you can use, assuming all are installed: py -2 # gets the latest python 2 with 64 bit as the default But you cannot use: py -2-32 # Usage Error but would be handy for the latest 32 bit python 2 Note that you also cannot use: For testing packages and programs it would be very useful to be able to specify any of:
|
Also noted when looking at the code that the validate function, (validate_version), has a couple of issues:
I am not sure if these potential issues warrant a separate ticket. |
I don't see a pressing need to support a -64 architecture suffix. If you run 3.6 and get a 32-bit version, you can assume there's no 64-bit version installed and error out if you need 64-bit. That said, supporting this suffix would make the interface and error handling more consistent. I also noticed the problem with double-digit minor versions, but that's years away. It would be an obvious problem resolved early in 3.10 development, assuming 3.10 even uses the py launcher as it exists today. I'd just kick the can on that one. Maybe add a comment noting the potential problem. |
I believe that I have a fix in pull request bpo-1488 for the following points, and have manually tested for them:
CLA - Signed and submitted but not a working day yet. All automatic checks passed. Will add another push to update to the help message. |
The actual change I want here is to support Company/Tag pairs as defined in PEP-514. There is no suffix on 64-bit CPython tags, so interpreting "-64" is going outside the PEP. I'd also be okay with a strict mode that requires -32 for 32-bit interpreters, rather than assuming the language version is close enough. Perhaps a "-only" flag or suffix? |
With a few more minutes thought, being able to nicely support PEP-514 here might be too much for this poor launcher to handle, so it may just be best to do that as a separate tool. (In particular, the matching rules would have to change from "enter a Python version" to "enter some convenient search pattern as a command line option", and that's a non-trivial change.) Given that, I'm in favour of this change. When Eryk says the code is good (and the CLA notice comes through), I'll merge it. |
CLA Now showing on profile. |
Closing as committed in 870f6a1 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: