Skip to content

Emit installed packages via importlib.metadata (fix uvx/no-pip run) - #27

Merged
jaraco merged 1 commit into
mainfrom
bugfix/26-uvx-no-pip
Aug 14, 2026
Merged

jaraco merged 1 commit into
mainfrom
bugfix/26-uvx-no-pip

Conversation

@jaraco

@jaraco jaraco commented Aug 14, 2026

Copy link
Copy Markdown
Member

Closes #26.

emit_installed_packages() — a CI-only diagnostic that prints the installed packages — shelled out to python -m pip list --format=freeze with check=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), and emit_installed_packages produces output in a venv with no pip present.

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>
@jaraco
jaraco merged commit 7014747 into main Aug 14, 2026
2 of 24 checks passed
@jaraco
jaraco deleted the bugfix/26-uvx-no-pip branch August 14, 2026 15:25
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.

coherent.test fails to run in a uvx environment (uv without pip)

1 participant