]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix #16176. Properly identify Windows 8 via platform.platform()
authorBrian Curtin <brian@python.org>
Thu, 11 Oct 2012 21:07:52 +0000 (16:07 -0500)
committerBrian Curtin <brian@python.org>
Thu, 11 Oct 2012 21:07:52 +0000 (16:07 -0500)
Add handling of the 6.2 release line, aka Windows 8 and Windows 2012 Server.

Lib/platform.py
Misc/NEWS

index eedc11c518d108f2e22cf962f0f6c857025553a6..686a04584538940b5cee319096d551813300c4bc 100755 (executable)
@@ -668,8 +668,13 @@ def win32_ver(release='',version='',csd='',ptype=''):
                     release = '7'
                 else:
                     release = '2008ServerR2'
+            elif min == 2:
+                if product_type == VER_NT_WORKSTATION:
+                    release = '8'
+                else:
+                    release = '2012Server'
             else:
-                release = 'post2008Server'
+                release = 'post2012Server'
 
     else:
         if not release:
index 9e1e96b55e404c95b3d4cd4233ebe4af8a5062cf..e1356add4720f418b52c6c1d191e3ff9e2280405 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -129,6 +129,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #16176: Properly identify Windows 8 via platform.platform()
+
 - Issue #16114: The subprocess module no longer provides a misleading
   error message stating that args[0] did not exist when either the cwd or
   executable keyword arguments specified a path that did not exist.