[Python-checkins] cpython (merge 3.4 -> default): Merge 3.4 (asyncio doc)

victor.stinner python-checkins at python.org
Tue Feb 17 23:14:21 CET 2015


https://hg.python.org/cpython/rev/6434aab53114
changeset:   94669:6434aab53114
parent:      94666:6f75c7c6e260
parent:      94668:6beaf66f0410
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Tue Feb 17 23:11:56 2015 +0100
summary:
  Merge 3.4 (asyncio doc)

files:
  Doc/library/asyncio-sync.rst       |  98 +++++++++--------
  Doc/tools/extensions/pyspecific.py |   5 -
  2 files changed, 53 insertions(+), 50 deletions(-)


diff --git a/Doc/library/asyncio-sync.rst b/Doc/library/asyncio-sync.rst
--- a/Doc/library/asyncio-sync.rst
+++ b/Doc/library/asyncio-sync.rst
@@ -310,6 +310,9 @@
    be interrupted between calling :meth:`qsize` and doing an operation on the
    Queue.
 
+   .. versionchanged:: 3.4.3
+      New :meth:`join` and :meth:`task_done` methods.
+
    .. method:: empty()
 
       Return ``True`` if the queue is empty, ``False`` otherwise.
@@ -341,6 +344,20 @@
       Return an item if one is immediately available, else raise
       :exc:`QueueEmpty`.
 
+   .. coroutinemethod:: join()
+
+      Block until all items in the queue have been gotten and processed.
+
+      The count of unfinished tasks goes up whenever an item is added to the
+      queue. The count goes down whenever a consumer thread calls
+      :meth:`task_done` to indicate that the item was retrieved and all work on
+      it is complete.  When the count of unfinished tasks drops to zero,
+      :meth:`join` unblocks.
+
+      This method is a :ref:`coroutine <coroutine>`.
+
+      .. versionadded:: 3.4.3
+
    .. coroutinemethod:: put(item)
 
       Put an item into the queue. If the queue is full, wait until a free slot
@@ -362,51 +379,6 @@
 
       Number of items in the queue.
 
-   .. attribute:: maxsize
-
-      Number of items allowed in the queue.
-
-
-PriorityQueue
-^^^^^^^^^^^^^
-
-.. class:: PriorityQueue
-
-   A subclass of :class:`Queue`; retrieves entries in priority order (lowest
-   first).
-
-   Entries are typically tuples of the form: (priority number, data).
-
-
-LifoQueue
-^^^^^^^^^
-
-.. class:: LifoQueue
-
-    A subclass of :class:`Queue` that retrieves most recently added entries
-    first.
-
-
-JoinableQueue
-^^^^^^^^^^^^^
-
-.. class:: JoinableQueue
-
-   A subclass of :class:`Queue` with :meth:`task_done` and :meth:`join`
-   methods.
-
-   .. coroutinemethod:: join()
-
-      Block until all items in the queue have been gotten and processed.
-
-      The count of unfinished tasks goes up whenever an item is added to the
-      queue. The count goes down whenever a consumer thread calls
-      :meth:`task_done` to indicate that the item was retrieved and all work on
-      it is complete.  When the count of unfinished tasks drops to zero,
-      :meth:`join` unblocks.
-
-      This method is a :ref:`coroutine <coroutine>`.
-
    .. method:: task_done()
 
       Indicate that a formerly enqueued task is complete.
@@ -422,6 +394,42 @@
       Raises :exc:`ValueError` if called more times than there were items
       placed in the queue.
 
+      .. versionadded:: 3.4.3
+
+   .. attribute:: maxsize
+
+      Number of items allowed in the queue.
+
+
+PriorityQueue
+^^^^^^^^^^^^^
+
+.. class:: PriorityQueue
+
+   A subclass of :class:`Queue`; retrieves entries in priority order (lowest
+   first).
+
+   Entries are typically tuples of the form: (priority number, data).
+
+
+LifoQueue
+^^^^^^^^^
+
+.. class:: LifoQueue
+
+    A subclass of :class:`Queue` that retrieves most recently added entries
+    first.
+
+
+JoinableQueue
+^^^^^^^^^^^^^
+
+.. class:: JoinableQueue
+
+   Deprecated alias for :class:`Queue`.
+
+   .. deprecated:: 3.4.3
+
 
 Exceptions
 ^^^^^^^^^^
diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py
--- a/Doc/tools/extensions/pyspecific.py
+++ b/Doc/tools/extensions/pyspecific.py
@@ -148,17 +148,12 @@
 class PyCoroutineMixin(object):
     def handle_signature(self, sig, signode):
         ret = super(PyCoroutineMixin, self).handle_signature(sig, signode)
-#        signode.insert(0, addnodes.desc_addname('coroutine ', 'coroutine '))
         signode.insert(0, addnodes.desc_annotation('coroutine ', 'coroutine '))
         return ret
 
-    def needs_arglist(self):
-        return False
-
 
 class PyCoroutineFunction(PyCoroutineMixin, PyModulelevel):
     def run(self):
-        # a decorator function is a function after all
         self.name = 'py:function'
         return PyModulelevel.run(self)
 

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


More information about the Python-checkins mailing list