Wire exclude-newer policy into libmambapy Database#905
Draft
jezdez wants to merge 2 commits into
Draft
Conversation
7 tasks
c83f07b to
19d6814
Compare
3 tasks
4ea1409 to
266b91f
Compare
266b91f to
da4c7c4
Compare
2 tasks
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
Updates the libmamba solver backend for conda/conda#15761's conda-owned
ExcludeNewerPolicy.This PR now consumes the resolved policy from conda instead of reparsing raw
context.exclude_newerin the solver plugin. That keeps duration/date parsing, date-only semantics, zero-duration behavior, and command-timenowresolution centralized in conda.Changes
supports_exclude_newer_global = TrueonLibMambaSolver.exclude_newer_packagepolicies.self.exclude_newer_policyintoLibMambaIndexHelper.exclude_newer_timestamponly when a global cutoff is active.jezdez/conda@feature/repodata-filter-cooldownuntil Add first-party --exclude-newer policy conda#15761 lands.Limitations
This remains draft work because native libmamba support is still needed. It depends on mamba-org/mamba#4228 adding
exclude_newer_timestamptoDatabase::Settings/ libmambapy.This PR supports the global cutoff only. Per-package overrides require upstream libmamba/libmambapy support for package-specific cutoffs before this solver can set
supports_exclude_newer_package = True.Part of conda/conda#15759.
Validation
uv run --no-project --with ruff ruff check conda_libmamba_solver/index.py conda_libmamba_solver/solver.py tests/test_index.py tests/test_solver.pyuv run --no-project --with ruff ruff format --check conda_libmamba_solver/index.py conda_libmamba_solver/solver.py tests/test_index.py tests/test_solver.pyPYTHONPATH=/Users/jezdez/Code/git/conda:. /Users/jezdez/miniforge3/envs/cls-dev/bin/python -m pytest -o addopts='' tests/test_index.py::test_exclude_newer_timestamp_unset tests/test_index.py::test_exclude_newer_timestamp_uses_resolved_global_cutoff tests/test_solver.py::test_solver_declares_global_exclude_newer_support_only -qPYTHONPATH=/Users/jezdez/Code/git/conda:. /Users/jezdez/miniforge3/envs/cls-dev/bin/python -m compileall -q conda_libmamba_solver/index.py conda_libmamba_solver/solver.py tests/test_index.py tests/test_solver.pygit diff --checkChecklist - did you ...
newsdirectory (using the template) for the next release's release notes?