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

do not imply pre-release when != operator is used #7974

Merged
merged 9 commits into from
Oct 21, 2024

Conversation

Czaki
Copy link
Contributor

@Czaki Czaki commented Oct 7, 2024

Summary

closes #6640

Test Plan

Could you suggest how I should test it?

(already tested locally)

@charliermarsh
Copy link
Member

This looks right to me! It will need to be part of 0.5.0 so I'll add it to that milestone.

@charliermarsh
Copy link
Member

I think you could write a test like prerelease_upper_bound_exclude... flask<2.0.1, !=2.0.0rc1 and ensure that 2.0.0rc2 is not selected.

@charliermarsh charliermarsh self-assigned this Oct 9, 2024
@charliermarsh charliermarsh added bug Something isn't working breaking A breaking change labels Oct 9, 2024
@@ -84,6 +84,7 @@ impl PrereleaseStrategy {

if specifier
.iter()
.filter(|spec| (spec.operator() != &Operator::NotEqual))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@charliermarsh I just spot that there is NotEqualStar operator also defined. Should I add it here? Is flask!=2.0.0rc* valid inequality?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think you should add that here too.

.filter(|spec| (spec.operator() != &Operator::NotEqual))
.filter(|spec| {
(spec.operator() != &Operator::NotEqual)
&& (spec.operator() != &Operator::NotEqualStar)
Copy link
Member

Choose a reason for hiding this comment

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

You might be interested in something like: !matches!(spec.operator(), Operator::NotEqual | Operator::NotEqualStar)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks

@zanieb
Copy link
Member

zanieb commented Oct 21, 2024

@Czaki it looks like this has some unrelated changes in it now.

@charliermarsh
Copy link
Member

I backed them out. @zanieb, want to merge into 0.5 branch?

@charliermarsh charliermarsh changed the base branch from main to tracking/050 October 21, 2024 17:51
Czaki and others added 9 commits October 21, 2024 13:52
One of the most common and most diverse are errors users encounter in Python packaging are build failures. They usually show lengthy, sometimes nested stack traces with no clear indication of what went wrong and how to fix it, while blocking the user.

We already catch four common cases with dedicated, actionable help messages. For all other errors, we link to a dedicated help page enumerating typical causes and their solutions.
@charliermarsh charliermarsh merged commit 12576bc into astral-sh:tracking/050 Oct 21, 2024
63 checks passed
@Czaki Czaki deleted the fix_ne_pre branch October 21, 2024 18:27
zanieb pushed a commit that referenced this pull request Oct 21, 2024
closes #6640

Could you suggest how I should test it?

(already tested locally)

---------

Co-authored-by: konstin <[email protected]>
Co-authored-by: Charles Tapley Hoyt <[email protected]>
Co-authored-by: Charlie Marsh <[email protected]>
zanieb pushed a commit that referenced this pull request Oct 22, 2024
closes #6640

Could you suggest how I should test it?

(already tested locally)

---------

Co-authored-by: konstin <[email protected]>
Co-authored-by: Charles Tapley Hoyt <[email protected]>
Co-authored-by: Charlie Marsh <[email protected]>
@zanieb zanieb mentioned this pull request Oct 22, 2024
zanieb pushed a commit that referenced this pull request Oct 24, 2024
closes #6640

Could you suggest how I should test it?

(already tested locally)

---------

Co-authored-by: konstin <[email protected]>
Co-authored-by: Charles Tapley Hoyt <[email protected]>
Co-authored-by: Charlie Marsh <[email protected]>
@zanieb zanieb mentioned this pull request Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A breaking change bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't enable pre-releases when != is used with pre-release specifier
4 participants