Skip to content

build: restrict dependency cooldown to pypi index#672

Merged
gsprochette merged 1 commit into
mainfrom
build/restrict-dependency-cooldown-to-pypi-index
Jun 4, 2026
Merged

build: restrict dependency cooldown to pypi index#672
gsprochette merged 1 commit into
mainfrom
build/restrict-dependency-cooldown-to-pypi-index

Conversation

@gsprochette
Copy link
Copy Markdown
Collaborator

Description

This PR changes the scope of the dependency cooldown introduced in #660 because the cooldown was affecting extra indices which contain wheels without a release date.

Doing uv pip install torch==2.12 torchvision --index-url https://download.pytorch.org/whl/cu126 (or any extra index) would fail because the wheels on the extra index lack a release date and therefore are excluded by the cooldown condition.
This means only the blackwell-specific cu130 pypi wheels for torch 2.11 and 2.12 are currently considered compatible.

The fix consists in applying the cooldown only to the pypi index instead of globally

[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple"
default = true
exclude-newer = "1 week"

Since pypi doesn't allow wheels to specify external urls, this is carried recursively to all pypi dependencies. In pruna the only extra index url is our pythonanywhere index which we trust, and other indices would have been manually added by the user and therefore their responsability.

This requires uv>=0.11.5 hence the uv version bump in the CI, and the early versions after 0.11.5 raise an experimental warning for the per-index exclude-newer feature.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactor (no functional change)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Testing

uv pip install torch==2.12 torchvision --index-url https://download.pytorch.org/whl/cu126 now runs.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code, especially for agent-assisted changes
  • I updated the documentation where necessary

Thanks for contributing to Pruna! We're excited to review your work.

New to contributing? Check out our Contributing Guide for everything you need to get started.

Note:

  • Draft PRs or PRs without a clear and detailed overview may be delayed.
  • Please mark your PR as Ready for Review and ensure the sections above are filled out.
  • Contributions that are entirely AI-generated without meaningful human review are discouraged.

@gsprochette gsprochette requested a review from gtregoat June 4, 2026 11:51
Copy link
Copy Markdown
Member

@gtregoat gtregoat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gsprochette gsprochette merged commit 0c548ac into main Jun 4, 2026
9 checks passed
@gsprochette gsprochette deleted the build/restrict-dependency-cooldown-to-pypi-index branch June 4, 2026 13:52
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.

2 participants