-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Windows registry Python discovery (PEP 514) not working for "cpython" specs for distributions by unknown orgs #2491
Comments
For the avoidance of doubt, none of my Python interpreters are available on If I do add the relevant interpreters to Also, if I change the Windows Registry keys, and use the |
See also #1796 which introduced the organization name to implementation mapping. |
An alternative solution could be to accept additional custom keys. PEP 514 gives the following example:
Which could be extended for example using Downside is that such a key would be by convention and it may be undesirable to expect Python distributors to set such a key. The advantage would be speed since it would no longer require the interpreter to be executed. |
PR welcome. |
Sure. As an initial improvement, would the “SysImplementation“ solution be ok, @gaborbernat ? |
Sure. But note this must not be a breaking change, and what's there should still work as is today. |
@gaborbernat I have started to experiment with a solution to remove the Windows Registry-based pre-filtering. Let me know if that's a direction you're willing to consider. |
Thank you for your help on this @gaborbernat |
Thanks for the PR. |
hmm...possibility |
Issue
On Windows:
Output:
Seems this is due to logic here: https://github.com/pypa/virtualenv/blob/main/src/virtualenv/discovery/windows/__init__.py#L23
It lists
PythonCore
andContinuumAnalytics
as the 2 organizations mapping to theCPython
implementation. That logic is unfortunate, since many more organizations can decide to distribute CPython. For example, my firm uses a different organization name in the Windows registry, compliant with PEP 514 https://peps.python.org/pep-0514/.I guess the solution should be similar to how the implementation is looked up for
PATH
OS environment variable entries: execute the Python binary and inspect the "pyinfo" output.The text was updated successfully, but these errors were encountered: