summaryrefslogtreecommitdiff
path: root/Doc/library/sys.rst
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-09-17 17:27:48 -0700
committerSteve Dower <steve.dower@microsoft.com>2016-09-17 17:27:48 -0700
commit74f4af7ac304baf8ea1eef95194b89982c3d683d (patch)
treeb806fd0c1a4d859f6ea6473cd8513a58a3729963 /Doc/library/sys.rst
parent13740531279291a9f2f71dd7c7b04ddbcdda3baf (diff)
downloadcpython-git-74f4af7ac304baf8ea1eef95194b89982c3d683d.tar.gz
Issue #27932: Prevent memory leak in win32_ver().
Diffstat (limited to 'Doc/library/sys.rst')
-rw-r--r--Doc/library/sys.rst27
1 files changed, 11 insertions, 16 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index 6ee6c490df..55b744e19d 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -552,26 +552,15 @@ always available.
Return a named tuple describing the Windows version
currently running. The named elements are *major*, *minor*,
*build*, *platform*, *service_pack*, *service_pack_minor*,
- *service_pack_major*, *suite_mask*, and *product_type*.
- *service_pack* contains a string while all other values are
+ *service_pack_major*, *suite_mask*, *product_type* and
+ *platform_version*. *service_pack* contains a string,
+ *platform_version* a 3-tuple and all other values are
integers. The components can also be accessed by name, so
``sys.getwindowsversion()[0]`` is equivalent to
``sys.getwindowsversion().major``. For compatibility with prior
versions, only the first 5 elements are retrievable by indexing.
- *platform* may be one of the following values:
-
- +-----------------------------------------+-------------------------+
- | Constant | Platform |
- +=========================================+=========================+
- | :const:`0 (VER_PLATFORM_WIN32s)` | Win32s on Windows 3.1 |
- +-----------------------------------------+-------------------------+
- | :const:`1 (VER_PLATFORM_WIN32_WINDOWS)` | Windows 95/98/ME |
- +-----------------------------------------+-------------------------+
- | :const:`2 (VER_PLATFORM_WIN32_NT)` | Windows NT/2000/XP/x64 |
- +-----------------------------------------+-------------------------+
- | :const:`3 (VER_PLATFORM_WIN32_CE)` | Windows CE |
- +-----------------------------------------+-------------------------+
+ *platform* will be :const:`2 (VER_PLATFORM_WIN32_NT)`.
*product_type* may be one of the following values:
@@ -587,17 +576,23 @@ always available.
| | a domain controller. |
+---------------------------------------+---------------------------------+
-
This function wraps the Win32 :c:func:`GetVersionEx` function; see the
Microsoft documentation on :c:func:`OSVERSIONINFOEX` for more information
about these fields.
+ *platform_version* returns the accurate major version, minor version and
+ build number of the current operating system, rather than the version that
+ is being emulated for the process. It is intended for use in logging rather
+ than for feature detection.
+
Availability: Windows.
.. versionchanged:: 3.2
Changed to a named tuple and added *service_pack_minor*,
*service_pack_major*, *suite_mask*, and *product_type*.
+ .. versionchanged:: 3.6
+ Added *platform_version*
.. function:: get_coroutine_wrapper()