[pypy-commit] pypy py3.5: Add a fake getwindowsversion()._platform_version, so that platform.win32_ver() can return something.

amauryfa pypy.commits at gmail.com
Wed May 3 02:22:30 EDT 2017


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3.5
Changeset: r91175:09eee048800a
Date: 2017-05-03 08:20 +0200
http://bitbucket.org/pypy/pypy/changeset/09eee048800a/

Log:	Add a fake getwindowsversion()._platform_version, so that
	platform.win32_ver() can return something. (it will always be the
	"compatibility mode" version, I'm not sure what this really means)

diff --git a/pypy/module/sys/vm.py b/pypy/module/sys/vm.py
--- a/pypy/module/sys/vm.py
+++ b/pypy/module/sys/vm.py
@@ -234,6 +234,7 @@
     service_pack_minor = structseqfield(11, "Service Pack minor version number")
     suite_mask = structseqfield(12, "Bit mask identifying available product suites")
     product_type = structseqfield(13, "System product type")
+    _platform_version = structseqfield(14, "Diagnostic version number")
 ''')
 
 
@@ -251,6 +252,9 @@
         space.newint(info[6]),
         space.newint(info[7]),
         space.newint(info[8]),
+        # leave _platform_version empty, platform.py will use the main
+        # version numbers above.
+        space.w_None,
     ])
     return space.call_function(w_windows_version_info, raw_version)
 


More information about the pypy-commit mailing list