[Python-checkins] gh-97966: Update uname docs to clarify the special nature of the platform attribute and to indicate when it became late-bound. (#97972)

jaraco webhook-mailer at python.org
Sun Oct 30 11:54:04 EDT 2022


https://github.com/python/cpython/commit/018b2483c422031ba5a6084238ab66ba44ea9fcf
commit: 018b2483c422031ba5a6084238ab66ba44ea9fcf
branch: main
author: Jason R. Coombs <jaraco at jaraco.com>
committer: jaraco <jaraco at jaraco.com>
date: 2022-10-30T11:53:58-04:00
summary:

gh-97966: Update uname docs to clarify the special nature of the platform attribute and to indicate when it became late-bound. (#97972)

files:
A Misc/NEWS.d/next/Documentation/2022-10-06-13-00-28.gh-issue-97966.fz7kFg.rst
M Doc/library/platform.rst

diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst
index dc2d871b47d5..a0c9f63ab9f9 100644
--- a/Doc/library/platform.rst
+++ b/Doc/library/platform.rst
@@ -168,16 +168,20 @@ Cross Platform
    containing six attributes: :attr:`system`, :attr:`node`, :attr:`release`,
    :attr:`version`, :attr:`machine`, and :attr:`processor`.
 
-   Note that this adds a sixth attribute (:attr:`processor`) not present
-   in the :func:`os.uname` result.  Also, the attribute names are different
-   for the first two attributes; :func:`os.uname` names them
-   :attr:`sysname` and :attr:`nodename`.
+   :attr:`processor` is resolved late, on demand.
+
+   Note: the first two attribute names differ from the names presented by
+   :func:`os.uname`, where they are named :attr:`sysname` and
+   :attr:`nodename`.
 
    Entries which cannot be determined are set to ``''``.
 
    .. versionchanged:: 3.3
       Result changed from a tuple to a :func:`~collections.namedtuple`.
 
+   .. versionchanged:: 3.9
+      :attr:`processor` is resolved late instead of immediately.
+
 
 Java Platform
 -------------
diff --git a/Misc/NEWS.d/next/Documentation/2022-10-06-13-00-28.gh-issue-97966.fz7kFg.rst b/Misc/NEWS.d/next/Documentation/2022-10-06-13-00-28.gh-issue-97966.fz7kFg.rst
new file mode 100644
index 000000000000..8240442a3bcb
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2022-10-06-13-00-28.gh-issue-97966.fz7kFg.rst
@@ -0,0 +1,2 @@
+Update uname docs to clarify the special nature of the platform attribute
+and to indicate when it became late-bound.



More information about the Python-checkins mailing list