-
Notifications
You must be signed in to change notification settings - Fork 294
chore: cleanup for 3.11 #2276
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
chore: cleanup for 3.11 #2276
Conversation
2c489f7 to
64e75d8
Compare
|
I had a thought - can we remove |
|
I think you are referring to Python π making them lazy by default? However, we might not need the annotations because the main reason it's used is to enable invalid expressions that became valid in 3.9 and 3.10 (and stuff that is often better spelled as String annotations are still slightly faster, but not measurably for something like cibuildwheel. ;) |
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
|
Ahh, yeah it's the expression thing. So we might still want it to use more modern type features than exist in 3.11. So I guess 3.14 is where it's gonna get simple again :) |
e3c7af3 to
1e83f5c
Compare
|
I removed I also added the Path checks, and fixed all of them except the |
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
1e83f5c to
ac248bb
Compare
|
(PS: I can split this up, commits are kept focused on one-ish thing. The future import one is large enough to be a PR if you'd rather) |
joerick
left a comment
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.
Looks good to me.
|
|
||
| @staticmethod | ||
| def native_arch(platform: PlatformName) -> Architecture | None: | ||
| def native_arch(platform: PlatformName) -> "Architecture | None": |
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.
FYI, I tried Self on these (with @classmethod), but typing didn't seem to understand that enum is final (even if you tell it it's final), so it sees cls.wasm32 as Architecture.wasm32 and therefore not Self. Wrapping it in an extra cls() does make it happy, but cls(cls.wasm32) just to make the type checker happy wasn't worth it. Just added strings here instead of Self. It's technically correct since enums are always final.
| if moved_wheel != output_wheel.resolve(): | ||
| log.warning( | ||
| "{repaired_wheel} was moved to {moved_wheel} instead of {output_wheel}" | ||
| f"{repaired_wheel} was moved to {moved_wheel} instead of {output_wheel}" |
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.
This is a fix, I believe.
Some cleanup, focused on some things 3.11 provides.