[Python-checkins] cpython (2.7): Closes #14486: add versionchanged notices throughout the threading docs for

georg.brandl python-checkins at python.org
Sun Oct 13 10:06:54 CEST 2013


http://hg.python.org/cpython/rev/81c28c415718
changeset:   86290:81c28c415718
branch:      2.7
user:        Georg Brandl <georg at python.org>
date:        Sun Oct 13 10:07:31 2013 +0200
summary:
  Closes #14486: add versionchanged notices throughout the threading docs for PEP8-compliant APIs; the note at the top of the page is too hard to notice.

files:
  Doc/library/threading.rst |  36 +++++++++++++++++++-------
  1 files changed, 26 insertions(+), 10 deletions(-)


diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -48,6 +48,9 @@
    Return the number of :class:`Thread` objects currently alive.  The returned
    count is equal to the length of the list returned by :func:`.enumerate`.
 
+   .. versionchanged:: 2.6
+      Added ``active_count()`` spelling.
+
 
 .. function:: Condition()
    :noindex:
@@ -67,6 +70,9 @@
    :mod:`threading` module, a dummy thread object with limited functionality is
    returned.
 
+   .. versionchanged:: 2.6
+      Added ``current_thread()`` spelling.
+
 
 .. function:: enumerate()
 
@@ -328,17 +334,19 @@
       :meth:`join` a thread before it has been started and attempts to do so
       raises the same exception.
 
-   .. method:: getName()
-               setName()
-
-      Old API for :attr:`~Thread.name`.
-
    .. attribute:: name
 
       A string used for identification purposes only. It has no semantics.
       Multiple threads may be given the same name.  The initial name is set by
       the constructor.
 
+      .. versionadded:: 2.6
+
+   .. method:: getName()
+               setName()
+
+      Pre-2.6 API for :attr:`~Thread.name`.
+
    .. attribute:: ident
 
       The 'thread identifier' of this thread or ``None`` if the thread has not
@@ -358,10 +366,8 @@
       until just after the :meth:`run` method terminates.  The module function
       :func:`.enumerate` returns a list of all alive threads.
 
-   .. method:: isDaemon()
-               setDaemon()
-
-      Old API for :attr:`~Thread.daemon`.
+      .. versionchanged:: 2.6
+         Added ``is_alive()`` spelling.
 
    .. attribute:: daemon
 
@@ -374,6 +380,13 @@
 
       The entire Python program exits when no alive non-daemon threads are left.
 
+      .. versionadded:: 2.6
+
+   .. method:: isDaemon()
+               setDaemon()
+
+      Pre-2.6 API for :attr:`~Thread.daemon`.
+
 
 .. _lock-objects:
 
@@ -602,6 +615,9 @@
       calling thread has not acquired the lock when this method is called, a
       :exc:`RuntimeError` is raised.
 
+      .. versionchanged:: 2.6
+         Added ``notify_all()`` spelling.
+
 
 .. _semaphore-objects:
 
@@ -701,7 +717,7 @@
       Return true if and only if the internal flag is true.
 
       .. versionchanged:: 2.6
-         The ``is_set()`` syntax is new.
+         Added ``is_set()`` spelling.
 
    .. method:: set()
 

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


More information about the Python-checkins mailing list