-
Notifications
You must be signed in to change notification settings - Fork 90
Description
Summary
The update-grayskull inspection feature updates version constraints in run dependencies but ignores run_constrained dependencies. This causes stale version constraints that can break downstream packages.
Problem
When a package author updates version constraints for optional dependencies in their pyproject.toml, the conda-forge autotick bot:
- ✅ Bumps the package version number
- ✅ Updates the source checksum
- ❌ Does NOT update
run_constrainedversion constraints
This leaves run_constrained with stale constraints that may conflict with other packages.
Root Cause
In conda_forge_tick/update_deps.py:
SECTIONS_TO_PARSE = ["host", "run"]
SECTIONS_TO_UPDATE = ["run"]The run_constrained section is not included in either constant.
Real-World Example: litellm-feedstock
The litellm package changed its uvicorn constraint on Feb 14, 2026:
- Before:
^0.31.1(Poetry caret syntax →>=0.31.1,<0.32.0) - After:
>=0.32.1,<1.0.0(explicit range)
See upstream commit: BerriAI/litellm@81be07a
However, the conda-forge feedstock (litellm-feedstock) still has:
run_constrained:
- uvicorn >=0.31.1,<0.32.0 # STALE - should be >=0.32.1,<1.0.0This breaks packages like notebook_intelligence that depend on litellm, because the solver cannot find a uvicorn version satisfying both >=0.32.1 (from other deps) and <0.32.0 (from stale litellm constraint).
Impact
- Downstream packages fail to solve during conda/mamba install
- Users get confusing "Could not solve for environment specs" errors
- Manual PRs are required to fix constraints (e.g., litellm-feedstock#317)
Proposed Solution
Add run_constrained support with constraints-only behavior:
- ✅ Update version constraints for packages that exist in both recipe and grayskull
- ❌ Do NOT add new packages (optional deps are maintainer's choice)
- ❌ Do NOT remove packages (maintainer may have specific reasons)
This conservative approach fixes stale constraints without making unwanted changes to optional dependency lists.
Suggested Implementation
SECTIONS_TO_PARSE = ["host", "run", "run_constrained"]
SECTIONS_TO_UPDATE = ["run"]
SECTIONS_TO_UPDATE_CONSTRAINTS_ONLY = ["run_constrained"] # NewThen modify _apply_env_dep_comparison() and related functions to support a constraints_only mode that only updates existing packages.
I'm happy to submit a PR implementing this fix.
Environment
- Affected feedstock: litellm-feedstock (and likely others using
run_constrained) - Bot config:
bot: inspection: update-grayskull