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

Avoid Removing Quotes From Requirement Markers #3214

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

ibraheemdev
Copy link
Member

@ibraheemdev ibraheemdev commented Apr 23, 2024

Summary

Avoid removing quotes from markers, e.g. numpy (>=1.19) ; python_version >= "3.7" should not be rewritten. Fixes #2551.

This PR also makes fixups a bit more flexible internally for fixes that aren't simple to implement with a pure regex replacement, like this one. #1529 fixed a similar problem but the current regex is still not smart enough to avoid all markers completely (like python_version).

Test Plan

Added a few unit tests.

@konstin konstin added the bug Something isn't working label Apr 23, 2024
Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

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

Nice! This is much simpler.

@charliermarsh charliermarsh merged commit fa53de9 into astral-sh:main Apr 23, 2024
38 of 39 checks passed
@charliermarsh
Copy link
Member

(Gonna go out-of-turn and merge this here since it also includes fixes to get main passing.)

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.

"Stray quotes" fixup can lead to invalid markers
4 participants