[Bug 44728] Bad windows version detection with python module "platform"
wine-bugs at winehq.org
wine-bugs at winehq.org
Wed Mar 14 07:09:29 CDT 2018
https://bugs.winehq.org/show_bug.cgi?id=44728
--- Comment #2 from GG <gillg02 at hotmail.com> ---
On normal case,
getwindowsversion()._platform_version and getwindowsversion()[:3] should return
current splitted windows version. (I don't know exactly why python lib use a
fallback)
HERE : https://github.com/python/cpython/blob/3.5/Python/sysmodule.c#L818 the
code of sys.getwindowsversion() for python. Answer seems near.
On Wine (win10 configured) :
getwindowsversion()._platform_version return (5, 1, 2600) (XP version)
and
getwindowsversion()[:3] return (10, 0, 15063) (good windows 10 version)
So, if you use a python script to get your plateform version, you have an
error.
https://docs.python.org/fr/3.5/library/platform.html#module-platform
#### Sample python script :
import platform
print(platform.version())
print(platform.uname())
Here, windows version will be badly detected (see native code of platform
module, without my patch above)
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list