Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command to bump .python-version(s) files to latest patch version #7678

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

tfsingh
Copy link
Contributor

@tfsingh tfsingh commented Sep 25, 2024

This PR adds a command (uv python patch) which bumps the distributions listed in .python-versions(s) files to the latest patch version available.

The general strategy for finding the latest patch is to

  1. check downloads
  2. fallback to system versions

Note that tests may not be deterministic as patches are added — this has been documented. I picked Python versions that I believe should be installed on CI runners (based on this):

image

Closes #7569.

@zanieb
Copy link
Member

zanieb commented Sep 25, 2024

I think I'd spell this as a flag for uv python pin like --upgrade.

@tfsingh tfsingh marked this pull request as ready for review September 26, 2024 01:18
@tfsingh
Copy link
Contributor Author

tfsingh commented Sep 26, 2024

@zanieb @charliermarsh Any thoughts on how to best address the discrepancy in the Windows runners installing Python 3.8.10, while Ubuntu/Mac install 3.8.12? Looks like I shouldn't modify the CI script to specify a patch:

We do not test with Python patch versions on Windows, so we can use setup-python instead of our bootstrapping code, this is much faster on the extremely slow GitHub Windows runners.

My thought is to use a cfg! clause to skip the test on windows. I checked if we could potentially modify the version used by mac/ubuntu (3.8.12) to 3.8.10, but the runners don't seem to install 3.8.10 on Windows every time (see this job, where 3.10.11 was installed).

@zanieb
Copy link
Member

zanieb commented Sep 26, 2024

I would mark the test as requiring the python-patch feature

@tfsingh
Copy link
Contributor Author

tfsingh commented Sep 26, 2024

Thanks for the tip! Should be ready for a pass (failure seems unrelated)

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.

Allow updating .python-version and .python-versions files to latest patch version
2 participants