-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
utils/pypi: ensure pure Python wheels support py3 #19984
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
Conversation
This might need to also accept e.g. Technically |
Yeah, technically there are all kinds of compressed and minor version variants here that would be good to handle -- one "good enough" approach would probably be to check that the Python tag is not just This is a good candidate for factoring out more generally, since there's a place in brew/Library/Homebrew/language/python.rb Line 402 in 0e14dd8
|
@woodruffw @Bo98 Does the updated regex of |
Looks pretty good to me, although I think someone could contrive a wheel that incorrectly matches it like so:
(This is technically invalid because In terms of locking it down, my suggestion would be:
|
|
No harm in that, yeah -- technically we should never see that since PyPI would reject |
This comment was marked as spam.
This comment was marked as spam.
I think we want to also match
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Sorry for the delay here @dtrodrigues! I just went back and confirmed this works as expected on the various patterns we want to support here: Correct matches:
Correct non-matches:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small escapes needed:
@woodruffw not according to |
Yeah, it'd be great if it could catch that...I think the reason it doesn't flag that is because (I guess we could maybe add a an extra cop for that, but it would have a lot of false positives, e.g. on the earlier part of that same regex 😅) |
That'll be because You want |
Ah right, I missed that these were quoted strings and not regexp objects. I'll send a PR fixing that (and yeah, that would indeed be a good cop then -- my bad!) |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Supports Homebrew/homebrew-core#224034 . Without this, there's the possibility of picking up a
py2-none-any.whl
when apy3-none-any.whl
is available, eg for https://pypi.org/project/aenum/3.1.16/#files .