Repository navigation
fix: resolve ~= specifiers with PEP 440 semantics - #1111
Merged
Merged
Conversation
semver accepts `~=` as a tilde range, so `~=0.9` was resolved as `>=0.9.0 <0.10.0` instead of PEP 440's `>=0.9, ==0.*`, and the highest strategy never picked versions beyond 0.9.x. Only evaluate `~=` as PEP 440. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
luketainton
pushed a commit
to luketainton/luke_rsu
that referenced
this pull request
Oct 28, 2026
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | action | patch | `v10.3.2` → `v10.3.3` | --- ### Release Notes <details> <summary>astral-sh/setup-uv</summary> ### [`v10.3.3`](https://github.com/astral-sh/setup-uv/releases/tag/v10.3.3): 🌈 Use Astral mirror for version manifests with GitHub fallback [Compare Source](astral-sh/setup-uv@v10.3.2...v10.3.3) ##### Changes This release contains something that should have been included a very long time ago. Sorry for sleeping on that. This action now retrieves the release manifest that contains the available versions, their download links and checksums from the Astral mirror, rather than trying GitHub first. This should present much more stable. (Known checksums are still checked, so the security impact does not change) Also a big thank you to [@​soujasK](https://github.com/soujasK) for a set of bugfixes 👏 ##### 🐛 Bug fixes - Use Astral mirror for version manifests with GitHub fallback [@​eifinger](https://github.com/eifinger) ([#​1119](astral-sh/setup-uv#1119)) - fix: allow whitespace in uv requirement specifiers [@​soujasK](https://github.com/soujasK) ([#​1112](astral-sh/setup-uv#1112)) - fix: resolve \~= specifiers with PEP 440 semantics [@​soujasK](https://github.com/soujasK) ([#​1111](astral-sh/setup-uv#1111)) - fix: only report a saved cache when saving succeeded [@​soujasK](https://github.com/soujasK) ([#​1110](astral-sh/setup-uv#1110)) ##### 🧰 Maintenance - chore: update known checksums for 0.13.6 @​[github-actions\[bot\]](https://github.com/apps/github-actions) ([#​1117](astral-sh/setup-uv#1117)) ##### 📚 Documentation - docs: use JSDoc for compatible release specifier comment [@​eifinger](https://github.com/eifinger) ([#​1113](astral-sh/setup-uv#1113)) - docs: update version references to v10.3.2 @​[github-actions\[bot\]](https://github.com/apps/github-actions) ([#​1104](astral-sh/setup-uv#1104)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE5MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==--> Reviewed-on: https://git.tainton.uk/repos/rsu/pulls/64 Co-authored-by: renovate[bot] <renovate-bot@git.tainton.uk>
luketainton
pushed a commit
to luketainton/repos_labmcp
that referenced
this pull request
Oct 28, 2026
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | action | patch | `v10.3.2` → `v10.3.3` | --- ### Release Notes <details> <summary>astral-sh/setup-uv</summary> ### [`v10.3.3`](https://github.com/astral-sh/setup-uv/releases/tag/v10.3.3): 🌈 Use Astral mirror for version manifests with GitHub fallback [Compare Source](astral-sh/setup-uv@v10.3.2...v10.3.3) ##### Changes This release contains something that should have been included a very long time ago. Sorry for sleeping on that. This action now retrieves the release manifest that contains the available versions, their download links and checksums from the Astral mirror, rather than trying GitHub first. This should present much more stable. (Known checksums are still checked, so the security impact does not change) Also a big thank you to [@​soujasK](https://github.com/soujasK) for a set of bugfixes 👏 ##### 🐛 Bug fixes - Use Astral mirror for version manifests with GitHub fallback [@​eifinger](https://github.com/eifinger) ([#​1119](astral-sh/setup-uv#1119)) - fix: allow whitespace in uv requirement specifiers [@​soujasK](https://github.com/soujasK) ([#​1112](astral-sh/setup-uv#1112)) - fix: resolve \~= specifiers with PEP 440 semantics [@​soujasK](https://github.com/soujasK) ([#​1111](astral-sh/setup-uv#1111)) - fix: only report a saved cache when saving succeeded [@​soujasK](https://github.com/soujasK) ([#​1110](astral-sh/setup-uv#1110)) ##### 🧰 Maintenance - chore: update known checksums for 0.13.6 @​[github-actions\[bot\]](https://github.com/apps/github-actions) ([#​1117](astral-sh/setup-uv#1117)) ##### 📚 Documentation - docs: use JSDoc for compatible release specifier comment [@​eifinger](https://github.com/eifinger) ([#​1113](astral-sh/setup-uv#1113)) - docs: update version references to v10.3.2 @​[github-actions\[bot\]](https://github.com/apps/github-actions) ([#​1104](astral-sh/setup-uv#1104)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE5MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==--> Reviewed-on: https://git.tainton.uk/repos/labmcp/pulls/87 Reviewed-by: Luke Tainton <luke@tainton.uk> Co-authored-by: renovate[bot] <renovate-bot@git.tainton.uk>
Doridian
pushed a commit
to FoxDenHome/core
that referenced
this pull request
Oct 28, 2026
…10.3.3 (#288) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [https://github.com/astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | action | patch | `v10.3.2` → `v10.3.3` | --- ### Release Notes <details> <summary>astral-sh/setup-uv (https://github.com/astral-sh/setup-uv)</summary> ### [`v10.3.3`](https://github.com/astral-sh/setup-uv/releases/tag/v10.3.3): 🌈 Use Astral mirror for version manifests with GitHub fallback [Compare Source](astral-sh/setup-uv@v10.3.2...v10.3.3) #### Changes This release contains something that should have been included a very long time ago. Sorry for sleeping on that. This action now retrieves the release manifest that contains the available versions, their download links and checksums from the Astral mirror, rather than trying GitHub first. This should present much more stable. (Known checksums are still checked, so the security impact does not change) Also a big thank you to [@​soujasK](https://github.com/soujasK) for a set of bugfixes 👏 #### 🐛 Bug fixes - Use Astral mirror for version manifests with GitHub fallback [@​eifinger](https://github.com/eifinger) ([#​1119](astral-sh/setup-uv#1119)) - fix: allow whitespace in uv requirement specifiers [@​soujasK](https://github.com/soujasK) ([#​1112](astral-sh/setup-uv#1112)) - fix: resolve \~= specifiers with PEP 440 semantics [@​soujasK](https://github.com/soujasK) ([#​1111](astral-sh/setup-uv#1111)) - fix: only report a saved cache when saving succeeded [@​soujasK](https://github.com/soujasK) ([#​1110](astral-sh/setup-uv#1110)) #### 🧰 Maintenance - chore: update known checksums for 0.13.6 @​[github-actions\[bot\]](https://github.com/apps/github-actions) ([#​1117](astral-sh/setup-uv#1117)) #### 📚 Documentation - docs: use JSDoc for compatible release specifier comment [@​eifinger](https://github.com/eifinger) ([#​1113](astral-sh/setup-uv#1113)) - docs: update version references to v10.3.2 @​[github-actions\[bot\]](https://github.com/apps/github-actions) ([#​1104](astral-sh/setup-uv#1104)) </details> --- ### Configuration 📅 **Schedule**: (in timezone America/Los_Angeles) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE5MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Reviewed-on: https://git.foxden.network/FoxDen/core/pulls/288
eifinger
pushed a commit
that referenced
this pull request
Nov 12, 2026
## Summary `<=`, `==` and `>` with a partial version are valid PEP 440 specifiers, but the resolver tries them as semver ranges first, and semver reads them differently: | specifier | semver (before) | PEP 440 (what uv enforces) | |---|---|---| | `<=0.5` | `<0.6.0`, installs 0.5.31 | `<=0.5.0`, installs 0.5.0 | | `==0.5` | `==` is stripped and `0.5` is read as `0.5.x`, installs 0.5.31 | `==0.5.0`, installs 0.5.0 | | `>0.5` with `resolution-strategy: lowest` | `>=0.6.0`, installs 0.6.0 | `>0.5.0`, installs 0.5.1 | So `required-version = "<=0.5"` or `"==0.5"` in `uv.toml` / `pyproject.toml` installs a uv that does not satisfy the project's own `required-version`, and uv refuses to run there (`Required uv version ... does not match the running version ...`). This is the same problem #1111 fixed for `~=`. Instead of adding more operators to that check, specifiers that `@renovatebot/pep440` accepts as a valid range now skip the semver evaluation, and `==` is only stripped from a full version, so `==0.5` stays a PEP 440 pin. Notes: - Semver-only syntax is not valid PEP 440 and still goes through semver: `0.4.x`, `^0.5`, `~0.5`, `>=0.4.0 <0.5.0` and a bare `0.5`. - Inputs that are valid in both, like `>=0.4.0` from the docs, now go through PEP 440. They mean the same in both, and the PEP 440 path uses the same first-match lookup over the manifest. - Full pins like `==0.9.26` still resolve as explicit versions, and compound specifiers like `>=0.4,<=0.5` already went through PEP 440. ## Test plan - Added cases for `<=0.9` and `==0.9` with the default strategy and `>0.9` with `lowest` in `download-version.test.ts`. All three fail without the change. - `npm ci --ignore-scripts`, then `npm run build`, `npm run check` (no fixes), `npm run package` and `npm run test:unit` on macOS with Node 24.13.0: 179 tests across 16 suites pass. The rebuilt `dist/setup/index.cjs` only differs in the changed functions. Co-authored-by: Claude Opus 5.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.
Summary
~=is the PEP 440 compatible release operator, but the resolver triessemver.validRange()first, and semver accepts~=as a tilde range:~=0.9>=0.9.0 <0.10.0>=0.9, ==0.*So with the default
higheststrategy,version: "~=0.9"(orrequired-version = "~=0.9"picked up throughversion-file) installs the highest 0.9.x instead of the highest 0.x. The same happens withmanifest-file, wheretc.evaluateVersionsis semver-based.This skips the semver evaluation for specifiers containing
~=, so they are only evaluated with@renovatebot/pep440. No semver range legitimately uses~=.Notes:
~=X.Yresolved incorrectly.~=X.Y.Zgives the same result in both, and compound specifiers like~=0.9, !=0.9.3were already rejected by semver and fell through to PEP 440.minSatisfyinggets the same check for consistency. The lower bound is the same under both interpretations, solowestdidn't produce wrong results before.~=1is invalid PEP 440. semver used to resolve it to 1.x; it now fails withNo version found for ~=1, same as other invalid specifiers.Test plan
~=0.9with the default manifest and withmanifest-file. Both returned0.9.26instead of0.10.2before the change.npm run allon Ubuntu (WSL) with Node 24.19.0: build, Biome (no fixes), packaging, and 161 tests across 15 suites pass. The rebuiltdist/setup/index.cjsonly differs in the changed lines.