-
Notifications
You must be signed in to change notification settings - Fork 732
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
Allow py3x-none
tags in newer than Python 3.x
#7867
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -362,8 +362,9 @@ impl RequiresPython { | |
let Some(minor) = python_tag | ||
.strip_prefix("cp3") | ||
.or_else(|| python_tag.strip_prefix("pp3")) | ||
.or_else(|| python_tag.strip_prefix("py3")) | ||
else { | ||
// We also return true for bounds such as `py36`, where the Python version | ||
// is a lower bound (redundant with `requires-python`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if the version is greater than our own upper-bound on Python? E.g., There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we don't handle this at all here yet (upper bounds). |
||
return true; | ||
}; | ||
let Ok(minor) = minor.parse::<u64>() else { | ||
|
@@ -725,6 +726,7 @@ mod tests { | |
"cbor2-5.6.4-py3-none-any.whl", | ||
"watchfiles-0.22.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", | ||
"dearpygui-1.11.1-cp312-cp312-win_amd64.whl", | ||
"solace_pubsubplus-1.8.0-py36-none-manylinux_2_12_x86_64.whl", | ||
]; | ||
for wheel_name in wheel_names { | ||
assert!( | ||
|
@@ -754,7 +756,6 @@ mod tests { | |
"psutil-6.0.0-cp36-cp36m-win32.whl", | ||
"pydantic_core-2.20.1-pp39-pypy39_pp73-win_amd64.whl", | ||
"torch-1.10.0-cp36-none-macosx_10_9_x86_64.whl", | ||
"torch-1.10.0-py36-none-macosx_10_9_x86_64.whl", | ||
]; | ||
for wheel_name in wheel_names { | ||
assert!( | ||
|
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.
Does this entire part make sense? In the example above, I thought cp36 was a lower-bound, so it would match
==3.10.*
.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.
cpxx-<...>-<...>
as a python tag only really makes sense in combination with a matching ABI tag,cp311-none
doesn't really make sense: why are you requiring CPython if you're not requiring its ABI? For pragmatic reasons, we're following pip (on python 3.12),cp
is an exact python tag unless we useabi3
, then it's a minimum version, whilepy
is a lower bound: