-
Notifications
You must be signed in to change notification settings - Fork 267
packaging does not know that macOS 10.16 and 11.0 are the same #497
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
Comments
Duplicate of #379? |
No |
packaging uses Line 356 in b10b90a
There's definitely an issue here. Using the latest installers available on python.org for macOS:
The code for 10.16 and 11.0 are not the same and, at first glance, the only thing that seems to do the trick is to read this file from a subprocess:
|
|
When I said not the same, I meant 10.16 implies >= 11.0 rather than ==11.0 |
Is there something more official from Apple's docs than a YC link to a blog post to a screenshot of Twitter for this policy? I'm not questioning that you're right, but it would be good to have something more official to link to if we add a hack to support this. I'm also interested in official docs to know if 10.16/11 is a one-off or if this will be a perpetual issue (i.e. there won't be a 10.17 for macOS 12). And is there an equivalent issue on 'wheel' about there output differing from |
OK, agreed. |
|
And can someone include the complete list of tags they are seeing on Big Sur so we have a real-world example to work against? |
Agreed, I did not stumble upon official docs when (quickly) looking at this. Maybe @lawrence-danna-apple who wrote the PR |
It boils down to this behavior:
|
On macOS 12 (Monterey): Dump done with the following command (packaging 5984e3b):
--- tags.python3.6 2022-01-13 22:08:21.000000000 +0100
+++ tags.python3.10 2022-01-13 22:08:37.000000000 +0100
@@ -1,3 +1,15 @@
+macosx_12_0_x86_64
+macosx_12_0_intel
+macosx_12_0_fat64
+macosx_12_0_fat32
+macosx_12_0_universal2
+macosx_12_0_universal
+macosx_11_0_x86_64
+macosx_11_0_intel
+macosx_11_0_fat64
+macosx_11_0_fat32
+macosx_11_0_universal2
+macosx_11_0_universal
macosx_10_16_x86_64
macosx_10_16_intel
macosx_10_16_fat64 |
@mayeut Thanks! So macOS 12 is fine and this issue is restricted to macOS 11 Big Sur. @mkoeppe Thanks! Here's your file inlined. macOS 11/10.16 tags
What we can probably do is add some logic such that if the version is 10.16 we force it to 11.0 and let the preexisting logic do its thing. |
And if anyone wants to submit a patch for this then that would obviously be appreciated! |
But I will say I don't think there's a way to go past 11.0 for 10.16 as we simply don't know if the bump would be accurate all the way up to e.g. 12.0 while real-world data suggests 10.16 == 11.0. |
I don't think this is enough, as |
No, macOS 12 is not fine. |
In the end, it's not related to the python version itself but with which macOS SDK python was built against (i.e. wether the odd "compatibility" 10.16 behavior kicks in, with old macOS SDKs, or not, with newer macOS SDKs) |
I think what's going on here is that there's some bincompat magic applied to SystemVersion.plist. If you read it from a a program linked with an older SDK version it will return 10.16 for compatibility reasons. If you use a program linked with a newer SDK it sees the real version. I'll post some official docs here if i can find them. |
I could probably propose something before the end of the month (but I'd rather have official docs to rely on for this) |
well, I'm not sure if there's documentation of this behavior, but the implementation is here: |
Sounds good. For now on the side of SageMath we will just work around it by setting |
I'll wait to see what someone proposes to fix this then before commenting further. And do note that Python 3.6 is EOL and so we no longer support it, so this is only being discussed in the context of Python 3.7 and Python 3.8. |
FTR, also the just released 3.9.10 installer is affected. |
This retrieves the real macOS version to compute macOS platform tags when the python interpreter is built with an old macOS SDK. fixes pypa#497
This retrieves the real macOS version to compute macOS platform tags when the python interpreter is built with an old macOS SDK. fixes pypa#497
@mkoeppe, I think that's the diff in behavior we saw with 3.9 official installers. |
Thanks, that's good to know! |
This retrieves the real macOS version to compute macOS platform tags when the python interpreter is built with an old macOS SDK. fixes pypa#497
This retrieves the real macOS version to compute macOS platform tags when the python interpreter is built with an old macOS SDK. fixes pypa#497
This retrieves the real macOS version to compute macOS platform tags when the python interpreter is built with an old macOS SDK. fixes pypa#497
This retrieves the real macOS version to compute macOS platform tags when the python interpreter is built with an old macOS SDK. fixes pypa#497
This retrieves the real macOS version to compute macOS platform tags when the python interpreter is built with an old macOS SDK. fixes pypa#497
This retrieves the real macOS version to compute macOS platform tags when the python interpreter is built with an old macOS SDK. fixes pypa#497
This retrieves the real macOS version to compute macOS platform tags when the python interpreter is built with an old macOS SDK. fixes pypa#497
This retrieves the real macOS version to compute macOS platform tags when the python interpreter is built with an old macOS SDK. fixes pypa#497
This retrieves the real macOS version to compute macOS platform tags when the python interpreter is built with an old macOS SDK. fixes pypa#497
This retrieves the real macOS version to compute macOS platform tags when the python interpreter is built with an old macOS SDK. fixes pypa#497
This retrieves the real macOS version to compute macOS platform tags when the python interpreter is built with an old macOS SDK. fixes pypa#497
This retrieves the real macOS version to compute macOS platform tags when the python interpreter is built with an old macOS SDK that reports 10.16 as the macOS version. fixes #497 Co-authored-by: Brett Cannon <[email protected]>
This retrieves the real macOS version to compute macOS platform tags when the python interpreter is built with an old macOS SDK that reports 10.16 as the macOS version. fixes pypa#497 Co-authored-by: Brett Cannon <[email protected]>
In python 3.9.9, as provided by the python.org macOS installer,
As a result,
packaging
21.3 (andpackaging
main HEAD) do not include...11_0...
inpackaging.tags.sys_tags()
.However,
wheel
happily builds wheels with this tag, whichpip
(e.g. latest, 21.3.1) then refuses to install.As
platform.mac_ver()
cannot be retroactively changed for released versions of Python, this should be addressed inpackaging
to make the support for macOS 11.x from #319 more robust.Reference: https://trac.sagemath.org/ticket/33155
The text was updated successfully, but these errors were encountered: