[New-bugs-announce] [issue35344] platform: get macOS version rather than darwin version?

STINNER Victor report at bugs.python.org
Wed Nov 28 17:55:01 EST 2018

New submission from STINNER Victor <vstinner at redhat.com>:

Would it be possible to get the macOS version (platform.mac_ver()) rather than the darwin version (uname()) for platform.platform()? As an user, I prefer the OS (macOS) version rather than the kernel (darwin) version.

Current output

$ ./python.exe -m platform


$ ./python.exe -c 'import platform; print(platform.mac_ver())'
('10.13.6', ('', '', ''), 'x86_64')

I tested on:

$ uname -a
Darwin macbook 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.13.6
BuildVersion:	17G65

components: Library (Lib), macOS
messages: 330636
nosy: ned.deily, ronaldoussoren, vstinner
priority: normal
severity: normal
status: open
title: platform: get macOS version rather than darwin version?
versions: Python 3.8

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list