[Python-checkins] cpython (2.7): Fix #16176. Properly identify Windows 8 via platform.platform()

brian.curtin python-checkins at python.org
Thu Oct 11 23:17:01 CEST 2012


http://hg.python.org/cpython/rev/e3acc945f0cb
changeset:   79671:e3acc945f0cb
branch:      2.7
parent:      79663:bbdb90bf2692
user:        Brian Curtin <brian at python.org>
date:        Thu Oct 11 16:16:50 2012 -0500
summary:
  Fix #16176. Properly identify Windows 8 via platform.platform()

Add handling of the 6.2 release line, aka Windows 8 and Windows 2012 Server.

files:
  Lib/platform.py |  7 ++++++-
  Misc/NEWS       |  2 ++
  2 files changed, 8 insertions(+), 1 deletions(-)


diff --git a/Lib/platform.py b/Lib/platform.py
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -673,8 +673,13 @@
                     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:
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -119,6 +119,8 @@
 Library
 -------
 
+- Issue #16176: Properly identify Windows 8 via platform.platform()
+
 - Issue #15756: subprocess.poll() now properly handles errno.ECHILD to
   return a returncode of 0 when the child has already exited or cannot
   be waited on.

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list