Skip to content

Add run_constrained support to grayskull dependency updates#5646

Open
ctcjab wants to merge 1 commit intoregro:mainfrom
chicagotrading:add-run-constrained-support
Open

Add run_constrained support to grayskull dependency updates#5646
ctcjab wants to merge 1 commit intoregro:mainfrom
chicagotrading:add-run-constrained-support

Conversation

@ctcjab
Copy link

@ctcjab ctcjab commented Feb 27, 2026

Description:

The update-grayskull inspection feature now updates run_constrained dependencies when bumping package versions. This prevents stale version constraints that can break downstream packages.

Changes:

  • Add "run_constrained" to SECTIONS_TO_PARSE
  • Add new SECTIONS_TO_UPDATE_CONSTRAINTS_ONLY constant for conservative updates
  • Add constraints_only parameter to _apply_env_dep_comparison()
  • Update _apply_dep_update_v1() and apply_dep_update() to handle run_constrained
  • Update generate_dep_hint() to show run_constrained updates

The constraints-only behavior for run_constrained:

  • ✅ Updates version constraints for packages in both recipe and grayskull
  • ❌ Does NOT add new packages (optional deps are maintainer's choice)
  • ❌ Does NOT remove packages (maintainer may have specific reasons)

This conservative approach fixes stale constraints while respecting maintainer decisions about which optional dependencies to include.

Checklist:

  • Pydantic model updated or no update needed

Cross-refs, links to issues, etc:

Fixes #5645

Real-world example: litellm-feedstock had stale uvicorn constraint >=0.31.1,<0.32.0 instead of upstream's >=0.32.1,<1.0.0, breaking packages like notebook_intelligence.

The update-grayskull inspection feature now updates run_constrained
dependencies when bumping package versions. This prevents stale version
constraints that can break downstream packages.

Changes:
- Add "run_constrained" to SECTIONS_TO_PARSE
- Add new SECTIONS_TO_UPDATE_CONSTRAINTS_ONLY for conservative updates
- Add constraints_only parameter to _apply_env_dep_comparison()
- Update _apply_dep_update_v1() and apply_dep_update() to handle
  run_constrained with constraints-only behavior
- Update generate_dep_hint() to show run_constrained updates

The constraints-only behavior for run_constrained:
- Updates version constraints for packages in both recipe and grayskull
- Does NOT add new packages (optional deps are maintainer's choice)
- Does NOT remove packages (maintainer may have specific reasons)

This fixes issues like litellm-feedstock where uvicorn constraint was
stale (>=0.31.1,<0.32.0) instead of upstream's (>=0.32.1,<1.0.0).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update-grayskull does not update run_constrained version constraints

1 participant