-
Notifications
You must be signed in to change notification settings - Fork 774
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Support PEP 582 (__pypackages__) #1441
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
Comments
Thanks for the feature request. Just a side note that mypy doesn't support PEP 582 currently either. See python/mypy#10633. |
This feels like a pretty unfortunate spec for analyzers... We already have issues resolving imports from scripts, and it seems like this PEP goes and makes it so that every script can have its own separate site-packages folder. It won't be as simple as asking python what the search paths are, because now there's a slew of paths that depend on which file is going to be read. |
Note that PEP 582 doesn't mention the layout of Kushal Das, the author of PEP 582, used a layout of Therefore, I don't recommend starting the work to support PEP 582 in IDE before that point is clarified. |
@kushaldas @zooba @dstufft @ncoghlan can any of you comment on the PEP 582 spec ambiguity above regarding directory layout? Apologies if I have the handles of any of the PEP authors wrong. |
The ambiguity is because the PEP is unfinished and has never been reviewed by anyone in a position to accept/approve it. The intent is that the "root" of a project (i.e. the directory that contains the script that is run directly) has a subdirectory that is added to sys.path. So it's one extra location relative to the main file, much like an explicitly configured PYTHONPATH value. The feature creep led to people demanding separate directories based on Python version/tags, and then more directories for scripts and PATH entries. That's the point where I gave up on it, deciding that people couldn't possibly envision new tools and approaches for solving those issues and I couldn't be bothered trying to explain it. I have no idea what anyone else has done with the idea, but I'm not aware of any approved PEPs about it. |
Moving this issue to discussion as an enhancement request for comments and upvotes. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Tools like Pyflow and PDM are package managers using Pep582 specification to install packages. It'd be good if Pylance supported it.
The text was updated successfully, but these errors were encountered: