-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Include location of bad METADATA files in errors #1664
Comments
By the way, what is the purpose of this repo? https://github.com/pypa/pkg_resources Is it still being used? |
I was planning to extract pkg_resources as a separate package and vendor it in setuptools (#863), but my work stalled on that and that repo is now stale. Presumably it wouldn't take much to merge it with recent changes found authoritatively in the setuptools repo. The one thing I want to avoid is maintaining the functionality in two places, so any transition should be clear-cut. Instead, I've been focusing my energy on importlib_resources, which promises to obviate many if not most of the use-cases of pkg_resources... and is planned to become part of the stdlib in Python 3.8. Funny (not funny) how my goal not to maintain the functionality in two places led me to just that approach. |
@zooba had a good suggestion here pypa/pip#6251 (comment) to make a custom type for these errors. That would let callers like pip provide more information to the user without having to expose an exception object or traceback. The exception could have as attributes the expected path of the METADATA file and, if applicable, the name of the attribute being accessed. |
I posted PR #1706 to address this. |
…ocation Include path in error message when version is missing (Fixes #1664)
pkg_resources
should probably be including the location of the errant METADATA (e.g. path to the file) in theValueError
message to make troubleshooting easier. Maybe someone can file an issue there.Originally posted by @cjerdonek in pypa/pip#6194 (comment)
The text was updated successfully, but these errors were encountered: