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

Warn when project defines a requires-python that pins to a .0 patch version #7426

Open
zanieb opened this issue Sep 16, 2024 · 3 comments · May be fixed by #8284
Open

Warn when project defines a requires-python that pins to a .0 patch version #7426

zanieb opened this issue Sep 16, 2024 · 3 comments · May be fixed by #8284
Labels
good first issue Good for newcomers projects Related to project management capabilities

Comments

@zanieb
Copy link
Member

zanieb commented Sep 16, 2024

As described in #7352 (comment)

If the user defines a Python requirement of ==3.12 this means ==3.12.0 which I don't think anyone really wants. We should suggest using ==3.12.* instead?

@edmorley
Copy link
Contributor

Similarly, it may be worth warning about ~=X.Y too (since it's confusingly not the same as ~=X.Y.0), xref #7682.

@zanieb zanieb added the good first issue Good for newcomers label Sep 25, 2024
@ianpaul10
Copy link
Contributor

Looking to get started on uv, I can take a look at this if no one has had a chance to tackle it yet.

@zanieb
Copy link
Member Author

zanieb commented Oct 3, 2024

Feel free!

zanieb added a commit that referenced this issue Oct 16, 2024
When patch version isn't specified and a matching version is referenced,
it will default patch to 0 which could be unclear/confusing. This PR
warns the user of that default.

<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

<!-- What's the purpose of the change? What does it do, and why? -->

The first part of this issue
#7426. Will tackle the second part
mentioned (`~=`) in a separate PR once I know this is the correct way to
warn users.

## Test Plan

<!-- How was it tested? -->

Unit tests were added

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
@ianpaul10 ianpaul10 linked a pull request Oct 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers projects Related to project management capabilities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants