Repository navigation
fix(scripts): replace pkg_resources in collect_info.py - #2386
Open
Hemang Varshney (hemv-857) wants to merge 1 commit into
Open
Hemang Varshney (hemv-857) wants to merge 1 commit into
Hemang Varshney (hemv-857) wants to merge 1 commit into
Conversation
setuptools 82 no longer ships pkg_resources, so collect_info.py failed on its first import. Use importlib.metadata and report packages that are not installed instead of raising DistributionNotFound.
Author
|
Gentle ping after three weeks. The change is one file ( CI here only reports the CLA check, so there is no test signal to read. Is there anything you would like changed before review? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/collect_info.pyimportspkg_resourcesat module level. setuptools 82 removed that module, so the script the bug template points users to dies before printing anything.wheelandcythonare build requirements, not runtime dependencies, soget_distributioncan also raiseDistributionNotFoundfor a normal install.Replace
pkg_resources.get_distributionwithimportlib.metadata.versionand printnot installedfor packages that are absent instead of raising.Fixes #2354.
Verification
With
qlibandfirestubbed,InfoCollector().qlib()now completes and prints values such as: