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

Check python pin compatibility with Requires-Python #4989

Merged
merged 14 commits into from
Jul 19, 2024

Conversation

blueraft
Copy link
Contributor

Summary

Resolves #4969

Test Plan

cargo test and manual tests.

@konstin konstin requested a review from zanieb July 11, 2024 09:44
@zanieb zanieb added enhancement New feature or improvement to existing functionality preview Experimental behavior labels Jul 11, 2024
@blueraft blueraft force-pushed the python-pin-compatibility branch from ab6ab5b to f8cfdcf Compare July 11, 2024 18:36
@zanieb zanieb self-assigned this Jul 15, 2024
@zanieb
Copy link
Member

zanieb commented Jul 15, 2024

I took a closer look and have some more substantive requested changes. Let me know if you have questions or if the scope is too big.

@blueraft blueraft force-pushed the python-pin-compatibility branch 3 times, most recently from 5bf20d9 to 107735d Compare July 15, 2024 22:00
@blueraft blueraft force-pushed the python-pin-compatibility branch from a377c35 to 6eaa07d Compare July 19, 2024 17:18
@zanieb
Copy link
Member

zanieb commented Jul 19, 2024

Ah terrifying you force pushed while I was editing locally :)

@zanieb
Copy link
Member

zanieb commented Jul 19, 2024

I'll make sure this is merged today

@blueraft
Copy link
Contributor Author

blueraft commented Jul 19, 2024

Ah terrifying you force pushed while I was editing locally :)

AHH! Sorry, was trying the pull in main and fix the merge conflicts. You can take over the branch :)

@zanieb
Copy link
Member

zanieb commented Jul 19, 2024

No problem haha it's your pull request! I'll take care of the remaining conflicts though :) thanks

@zanieb
Copy link
Member

zanieb commented Jul 19, 2024

Thanks for being patient with this one! I made some important fixes as well as some simplifications the code and tweaks to messages — we could probably make factor the code into something further easier to read but it seems decent for now.

Copy link
Contributor

@T-256 T-256 left a comment

Choose a reason for hiding this comment

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

Awsome!

@zanieb zanieb enabled auto-merge (squash) July 19, 2024 18:17
@zanieb zanieb merged commit 3ee3db2 into astral-sh:main Jul 19, 2024
54 checks passed
@blueraft
Copy link
Contributor Author

Thanks for the thorough review! Appreciate it

@blueraft blueraft deleted the python-pin-compatibility branch July 19, 2024 18:23
Updated `.python-version` from `[email protected]` -> `cpython`

----- stderr -----
warning: The requested Python version `cpython` resolves to `3.10.[X]` which is incompatible with the project `Requires-Python` requirement of `>=3.12`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Am I misunderstood or cpython must be resolved to 3.11? since context already contains it.

Copy link
Contributor

Choose a reason for hiding this comment

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

ref #5205

Copy link
Member

Choose a reason for hiding this comment

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

Yes that's problematic. cc @charliermarsh looks like this regressed.

Copy link
Member

Choose a reason for hiding this comment

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

This actually isn't a regression or related to #5205, we're just taking the first Python on the path. The problem here is that we need to respect Requires-Python on top of pinned version requests (😭).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uv python pin should check for compatibility with Requires-Python if present
3 participants