Skip to content

Commit d1c0c25

Browse files
committed
Document 10.16 vs 11.0 / 16.0 vs 26.0 behavior of platform.mac_ver() (#135675)
The macOS version reported in /System/Library/CoreServices/SystemVersion.plist can vary depending on what version of the macOS SDK Python was built with. This discrepancy bleeds into the output of platform.mac_ver().
1 parent 06e347b commit d1c0c25

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Doc/library/platform.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,16 @@ macOS platform
234234
Entries which cannot be determined are set to ``''``. All tuple entries are
235235
strings.
236236

237+
.. note::
238+
239+
Where macOS has changed its versioning scheme, it reports the next
240+
logical version assuming the old scheme to applications built with any
241+
prior macOS SDK version unless a ``SYSTEM_VERSION_COMPAT=0`` environment
242+
variable is set. On macOS 11.0, the ``release`` field if Python is built
243+
with SDK < 11 is ``'10.16'`` and on macOS 26.0, it's ``'16.0'`` unless
244+
Python was built with SDK >= 26.0.
245+
246+
237247
iOS platform
238248
------------
239249

0 commit comments

Comments
 (0)