Skip to content
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

PEP-514 support was removed in version 2.0 but is still documented #158

Open
TBBle opened this issue Apr 1, 2024 · 3 comments
Open

PEP-514 support was removed in version 2.0 but is still documented #158

TBBle opened this issue Apr 1, 2024 · 3 comments

Comments

@TBBle
Copy link

TBBle commented Apr 1, 2024

PR #135 removed WindowsFinder (which wrapped the vendored pep514tools library) and did not replace it with any equivalent support for PEP-514.

As noted in the PR description, this was somewhat intended, as it removed Windows-specific support (leaving only PATH-env searching), and PEP-514 is a Windows-specific mechanism.

However, the documentation was not updated for this change, and still claims PEP-514 compatibility, including a pep514 tag on PyPI.

Testing results on a Windows system with Python 3.9 and 3.10 installed but not in the PATH (inside a venv, I believe):

> pip install --quiet --upgrade "pythonfinder[cli]<2" && pyfinder --findall
Found python at the following locations:
3.10: 3.10.11 (64bit) @ C:\Program Files\Python310\python.exe
3.9: 3.9.10 (64bit) @ C:\Program Files\Python39\python.exe
> pip install --quiet --upgrade "pythonfinder[cli]" && pyfinder --findall
ERROR: No valid python versions found! Check your path and try again.
Please provide a command

The system's PyLauncher details:

> py --list
Installed Pythons found by C:\WINDOWS\py.exe Launcher for Windows
 (venv) *
 -3.10-64
 -3.9-64

See also #135 (comment) and python-poetry/poetry#2117 (comment)

@matteius
Copy link
Contributor

matteius commented Apr 1, 2024

This is something I am supportive of improving/fixing in terms of restoring the functionality. Is there a way to do so without vendoring in pep514tools? IIRC that library hasn't been updated in some time and there were other windows specific bugs we were trying to address by having the code paths be in-house and more similar across OS.

@TBBle
Copy link
Author

TBBle commented Apr 1, 2024

You'd have to implement the same registry searching logic documented in PEP-514. I had a quick look last month, and my recollection is that this is basically all pep514tools is doing, and it probably hasn't been updated because there's nothing that needs to change: The algorithm was finalised in 2016.

Although looking closer, I see some issues are open and unaddressed, including yours, so a local PEP-514 consumer implementation should be pretty simple. (pep514tools also supports manipulating the PEP 514 data, and we don't need that here)

@matteius
Copy link
Contributor

I haven't forgotten about this, here is my draft attempt: pypa/pipenv#6140

I made it against pipenv to run with the full test suite there and plan to backport the changes to a PR here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants