fix(update): detect local-path installs instead of blaming PyPI propagation#57
Merged
Conversation
…gation When getop is installed from a checkout (pipx install /path, uv tool install /path, pip install -e), pipx/uv record that spec and their upgrade commands reinstall from disk forever — update would try anyway, see the version not move, and print the misleading "PyPI is still propagating the release" fallback. Detect the case via the PEP 610 direct_url.json that every installer writes for path/URL installs (PyPI installs have none): report the real source, print the installer-appropriate command to switch back to PyPI (pipx needs uninstall+install — its uv backend refuses --force over a foreign venv), and skip the doomed upgrade. --json gains a local_source key; --check reports the same and exits 0. Fixes #56 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
release-please bumps pyproject.toml but not the lockfile's own-package entry, so the first uv run after each release dirties the tree. Co-Authored-By: Claude Fable 5 <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.
Fixes #56.
Problem
With getop installed from a local checkout (
pipx install /path/to/getop),getop updatewould runpipx upgrade, which re-resolves the recorded spec and reinstalls from disk — so the version never moves, andupdateprinted the fallback message for a different failure mode: "1.2.0 isn't installable yet — PyPI is still propagating the release."Fix
Instead of shelling out to
pipx list --json(issue's suggestion), read the PEP 610direct_url.jsonfrom the installed distribution: every installer (pip, pipx, uv) writes it for local-path/URL/editable installs, and PyPI installs have none — one check covers pipx,uv tool, and pip alike, including the uv-tool case the issue deferred.When a local source is detected and an update is available:
pipx uninstall getop && pipx install getop(pipx's uv backend refuses--forceover a foreign venv),uv tool install --force getop, or plain pip upgrade.updateexits 1 (nothing was updated);--checkreports the same and exits 0.--jsongains alocal_sourcekey (nullfor PyPI installs).Verification
uv run pytest -q— 138 passed (5 new tests: direct_url parsing incl. absent/malformed, blocked-update exit 1 with no "propagating" text,--checkexit 0,--jsonkey, per-method hints)uv run getop update --jsonin the dev checkout (an editable path install) correctly reports"local_source": "…/getop"; the released PyPI pipx install has nodirect_url.json, matching thenullpath🤖 Generated with Claude Code