Repository navigation
Emit installed packages via importlib.metadata (fix uvx/no-pip run) - #27
Merged
Merged
Conversation
emit_installed_packages() shelled out to `python -m pip list` with check=True, which is fatal when pip is absent — as it is in a uv-provisioned environment under `uvx`. Use importlib.metadata instead, removing the pip dependency entirely and making the CI-only diagnostic robust regardless of runner. Closes #26. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Closes #26.
emit_installed_packages()— a CI-only diagnostic that prints the installed packages — shelled out topython -m pip list --format=freezewithcheck=True. That's fatal when pip is absent, which is the case in a uv-provisioned environment (e.g.uvx --from coherent.test python -m coherent.test, as coherent-oss/system now uses). pipx's venvs bundle pip; uv's don't.Switch to
importlib.metadata.distributions(), which needs no external tool and works in any environment. Verified locally: the module doctests pass (12/12), andemit_installed_packagesproduces output in a venv with no pip present.