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

Fix comparison when using greater than or equal in UP036 #7903

Closed
wants to merge 1 commit into from

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Oct 10, 2023

Closes #7902

@zanieb zanieb added the bug Something isn't working label Oct 10, 2023
@@ -256,11 +256,11 @@ fn compare_version(
Ok(if or_equal {
// Ex) `sys.version_info <= 3.8`. If Python 3.8 is the minimum supported version,
// the condition won't always evaluate to `false`, so we want to return `false`.
if_minor < py_minor
if_minor <= py_minor
Copy link
Member

Choose a reason for hiding this comment

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

I feel like we need different tie-breaking logic here depending on whether it's a great-than comparison or a less-than comparison, because this condition seems correct (and the comment does too) for less-than.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah this fix is incorrect — this is really hurting my brain haha

@github-actions
Copy link
Contributor

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

@zanieb
Copy link
Member Author

zanieb commented Oct 11, 2023

Replaced by #7920

@zanieb zanieb closed this Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UP036 (outdated-version-block) is off-by-one for the target version
2 participants