Repository navigation
feat(manifest): read exemptions from exclude-newer in [workspace] - #7246
Merged
Merged
Conversation
exclude-newer in [workspace]
This was referenced Oct 13, 2026
pavelzw
force-pushed
the
exclude-newer-exemptions-2-manifest
branch
2 times, most recently
from
October 13, 2026 11:37
db6d70d to
b87f59c
Compare
pavelzw
force-pushed
the
exclude-newer-exemptions-2-manifest
branch
from
October 13, 2026 13:20
b87f59c to
05bee0d
Compare
pavelzw
marked this pull request as ready for review
October 13, 2026 13:22
pavelzw
force-pushed
the
exclude-newer-exemptions-2-manifest
branch
2 times, most recently
from
October 13, 2026 13:56
5fa04ce to
05c974a
Compare
pavelzw
force-pushed
the
exclude-newer-exemptions-2-manifest
branch
from
October 13, 2026 20:49
05c974a to
9c96304
Compare
1 of 8 tasks
`exclude-newer` keeps accepting a bare cutoff string, and now also takes
a table with a `cutoff` and `exemptions`:
[workspace.exclude-newer]
cutoff = "7d"
exemptions = { py-rattler = "*", polars = "1.43.1" }
Exemptions are match specs, so a single vetted release can be allowed
through without lowering the cutoff for every future release of the
package.
`pypi-exclude-newer` is added to `[workspace]` with the same shape. Its
`cutoff` is optional and falls back to the conda cutoff. Exemptions only
support `"*"` for now because uv can only lift the cutoff per package.
pavelzw
force-pushed
the
exclude-newer-exemptions-2-manifest
branch
from
October 14, 2026 13:34
9c96304 to
a93b78b
Compare
An exemption written as an empty table, such as `polars = {}`, was
accepted and matched every release of the package, the same as `"*"`.
Exemptions loosen a supply-chain control, so a typo there should fail
loudly instead of exempting the package entirely.
Dependencies already reject an empty table, but that check lives in the
conversion to a full spec and not in the one to a binary spec that
exemptions use. The error points to `"*"` for exempting every release,
and leaves out `url`, `git` and `path`, which exemptions reject anyway.
The doc comment of the saturating timestamp conversion referred to the resolver in `features_ext.rs` for where the "never exclude by default" sentinel comes from. That resolver moved to `resolve_exclude_newer` in the manifest's `exclude_newer` module, so the reference was dangling.
The schema typed exemption tables like binary dependency tables, so it disagreed with pixi in both directions. It accepted `extras` and `when`, which pixi rejects because they do not select packages. It rejected `md5` and `sha256`, which pixi accepts, so editors flagged the most precise exemption: one vetted artifact pinned by its hash. The selector fields now live in a shared base table, with the binary dependency table adding `extras` and `when` on top and the exemption table adding the hashes. Exemption tables must also have at least one field, matching the parser's rejection of empty tables. Moving the fields reorders the binary dependency table's properties in the generated schemas without changing what they accept.
The examples exempted `polars = "1.43.1"`. A bare version like that is an ambiguous specifier, so pixi warns that it will become an error in the future. Examples that users copy should not trigger that warning, so they now use `"==1.43.1"`, matching the `pixi global` docs. Tests keep the bare version on purpose, since it is still accepted.
lucascolley
reviewed
Oct 14, 2026
lucascolley
left a comment
Member
There was a problem hiding this comment.
thanks Pavel, please could you review the four commits I just pushed?
A couple comments inline also
…newer configs Nothing in this change serializes the parsed configuration. The conda impl moves to the global manifest change that writes it back to disk.
Collaborator
Author
|
the four commits look good. i also took care of your pr comments. |
The conda and PyPI parsers were copies of each other apart from whether the cutoff is required and how the exemptions are read. A shared helper takes those two differences as arguments, so the error handling for the string and table forms lives in one place.
Listing every field of the detailed spec to spot a bare version took 16 lines. Comparing against a spec that carries only the version does the same, and still holds when a field is added to the spec later.
…ests Each exclude-newer test declared its own copy of the same struct and trait impls to call the resolver on the default feature, and this branch added two more copies. One wrapper next to the tests replaces all four.
Three test modules built the same timestamped repodata record by hand to check what an exclude-newer configuration excludes, and this branch added two of them. The builder now lives in `pixi_test_utils`, with an optional channel for the tests that check channel-specific exemptions.
lucascolley
reviewed
Oct 15, 2026
lucascolley
left a comment
Member
There was a problem hiding this comment.
pushed 4 more commits for you to review, plus one comment inline
Collaborator
Author
|
your commits look good, thanks! also resolved your inline comment |
lucascolley
approved these changes
Oct 15, 2026
This was referenced Oct 26, 2026
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.
Description
exclude-newerkeeps accepting a bare cutoff string, and now also takesa table with a
cutoffandexemptions:Exemptions are match specs, so a single vetted release can be allowed
through without lowering the cutoff for every future release of the
package. The
cutoffis required in the table form, since exemptionswithout one would do nothing.
pypi-exclude-neweris added to[workspace]with the same shape. Itscutoffis optional and falls back to the conda cutoff. Exemptions onlysupport
"*"for now because uv can only lift the cutoff per package.Part of #7179 and #6479.
Stack (review and merge in order):
exclude-newerin[workspace]#7246 👈 this PRexclude-newertables #7248exclude-newer#7249How Has This Been Tested?
cargo test -p pixi_manifest -p pixi_global -p pixi_core, pluscargo test -p pixi --test integration_rust exclude_newer. Adds parser tests for the bare and table forms, rejected exemption fields, the PyPI cutoff fallback, and integration tests for conda and PyPI exemptions against mock channels and indexes.AI Disclosure
Tools: Claude Code
Checklist:
schema/model.py.