Message391234
> shouldn't the documentation provide the information that
> sys.getwindowsversion().platform_version returns the
> kernel32.dll version?
platform_version is documented as an "accurate major version, minor version and build number of the current operating system, rather than the version that is being emulated for the process". That's it's currently using the file version of "kernel32.dll" is an implementation detail, one that needs to be changed to something more reliable.
Keep in mind that the Python DLL can be embedded in any application, which may not be manifested to get the true OS version via GetVersionExW(). For example, when running in Windows 10, the default with no manifest reports Windows 8 (NT 6.2):
>>> sys.getwindowsversion()
sys.getwindowsversion(major=6, minor=2, build=9200, platform=2, service_pack='')
Here it is with a manifest that supports Windows 8.1 (NT 6.3):
>>> sys.getwindowsversion()
sys.getwindowsversion(major=6, minor=3, build=9600, platform=2, service_pack='')
This is the OS version that's relevant to the application, but for logging and other diagnostics, platform_version is provided to get the real version, at least if all goes according to plan. |
|
Date |
User |
Action |
Args |
2021-04-16 17:18:30 | eryksun | set | recipients:
+ eryksun, paul.moore, tim.golden, zach.ware, steve.dower, corona10, bugale bugale, shreyanavigyan, Orbital |
2021-04-16 17:18:30 | eryksun | set | messageid: <1618593510.88.0.973079545407.issue43284@roundup.psfhosted.org> |
2021-04-16 17:18:30 | eryksun | link | issue43284 messages |
2021-04-16 17:18:30 | eryksun | create | |
|