Skip uv dependencies pinned to a source that can never be updated - #16132
Open
Dichotomia wants to merge 1 commit into
Open
Skip uv dependencies pinned to a source that can never be updated#16132Dichotomia wants to merge 1 commit into
Dichotomia wants to merge 1 commit into
Conversation
Dichotomia
force-pushed
the
uv-skip-git-and-url-sources
branch
from
September 2, 2026 13:03
6d448ca to
8a9b5c2
Compare
5 tasks
Dichotomia
force-pushed
the
uv-skip-git-and-url-sources
branch
2 times, most recently
from
September 3, 2026 16:17
fa9e4f4 to
4e98092
Compare
Dichotomia
force-pushed
the
uv-skip-git-and-url-sources
branch
3 times, most recently
from
September 3, 2026 21:45
86d6f9e to
7ccfe29
Compare
Contributor
|
@Dichotomia 👋🏻 , thanks for the contribution. Let me know when the PR is ready for review. |
Author
|
It is, and it will stop moving now: |
Dependabot resolves every entry in `[project.dependencies]` against a package index. A dependency pinned to a `url` source in `[tool.uv.sources]`, or to a `git` source carrying no tag, is not a registry dependency, so that lookup either finds nothing - the pin is never updated and no error says why - or finds an unrelated package that happens to share the name, and proposes a version of it. A `git` source carrying a tag is left alone: the tag gives an ordering, so such a pin can be read from the remote and written back rather than skipped. What this covers is the residue, the shapes from which no ordering can be derived, and dependabot#16129 asks for both halves. The Poetry path in this same parser already skips these source kinds, through UNSUPPORTED_DEPENDENCY_TYPES, so this makes the PEP 621 path consistent with it rather than introducing a new policy. `path` entries keep their current behaviour: they are the subject of dependabot#14644. `index` entries are real registry dependencies and must keep being checked. The table is read per manifest rather than from the memoised root document, because pep621_pep735_dependencies is also called for workspace members. Both sides of the name comparison are normalised, since uv matches under PEP 508 normalisation while the table key is written as the author typed it. The branch is squashed, so the spec work is no longer visible as its own step: the fixture asserts the complete set of names the parser emits, and the boundary between what is skipped and what is kept was checked in both directions by breaking the predicate - removing the skip puts the url and untagged git entries back in that set, and widening it to `git` alone drops the tagged one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Dichotomia
force-pushed
the
uv-skip-git-and-url-sources
branch
from
September 7, 2026 07:35
7ccfe29 to
7369465
Compare
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.
What are you trying to accomplish?
Dependabot resolves every entry in
[project.dependencies]against a package index. A dependencypinned to a
urlsource in[tool.uv.sources], or to agitsource carrying no tag, is not aregistry dependency, so that lookup either:
upstream releases went by over seventeen days with daily runs and
patterns: ["*"], and none wasproposed;
That second outcome is the same failure #14728 described one layer down, where
pin_pep508_entrywasrewriting
"pkg @ git+https://…"intopkg==<version>. #14729 fixed it there, and its comment —"already pinned to a URL" — is the same reasoning applied to the updating side.
Details and the code walk-through are in #16129.
Anything you want to highlight for special attention from reviewers?
Which source kinds, and why a tagged git source is not one of them.
urlalways, andgitonlywhen the entry carries no tag. A tag gives an ordering, so such a pin can be read from the remote and
written back — skipping it would forgo an update that is available. #16151 does exactly that, which
makes these two changes complementary rather than alternatives: this one covers the shapes no
ordering can be derived from, which #16151 leaves with no source and therefore still resolved against
an index.
pathentries keep their current behaviour. They are the subject of [UV] ignore sources #14644 and changing them herewould conflate two requests.
indexentries are real registry dependencies and must keep being checked.Consistency rather than a new policy. The Poetry path in this same parser already skips these
source kinds, through
UNSUPPORTED_DEPENDENCY_TYPES. This makes the PEP 621 path behave the same way.Why the table is read per manifest.
PyprojectDocument.from_file(pyproject_file)rather than thememoised root document, because
pep621_pep735_dependenciesis also called for workspace members.Why both names are normalised. uv applies PEP 508 normalisation when matching a source to a
dependency, while the table key is written as the author typed it, so
normaliseis applied to bothsides.
Not covered. A PEP 508 direct reference written inline (
"pkg @ git+https://…") has the sameproblem, but
uv/helpers/lib/parser.pyemits no url for it, so surfacing one is a wider change.How will you know you've accomplished your goal?
The spec reuses the existing
uv_mixed_sources.tomlfixture, extended with agit-and-tag entry sothat the boundary between what is skipped and what is kept is asserted rather than implied. It checks
the complete set of names the parser emits, so a dependency appearing or disappearing both fail it.
Removing the skip yields
git-packageandurl-packagein that set; narrowing it togitalonedrops
tagged-packagefrom it.Checklist