Skip to content

Fix diagnostics package version lookup#1974

Open
wunianze666-netizen wants to merge 1 commit into
bitsandbytes-foundation:mainfrom
wunianze666-netizen:fix/diagnostics-importlib-metadata
Open

Fix diagnostics package version lookup#1974
wunianze666-netizen wants to merge 1 commit into
bitsandbytes-foundation:mainfrom
wunianze666-netizen:fix/diagnostics-importlib-metadata

Conversation

@wunianze666-netizen

Copy link
Copy Markdown

Summary

  • switch diagnostics package version lookup to importlib.metadata`n- handle PackageNotFoundError through the imported metadata module
  • add a focused regression test for installed and missing packages

Why

get_package_version() currently calls importlib.metadata without importing the submodule first, so the helper can raise AttributeError before reaching its fallback path.

Testing

  • compiled the updated source files locally
  • ran an isolated Python verification script that stubs heavy runtime dependencies and checks both installed and missing package paths

Issue linkage: not tied to an existing tracked issue.

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

Successfully merging this pull request may close these issues.

1 participant