Skip to content

Commit 7a148c2

Browse files
committed
Fix-up docs for socketserver and queue renaming.
1 parent bb141bb commit 7a148c2

File tree

6 files changed

+20
-18
lines changed

6 files changed

+20
-18
lines changed

Doc/library/queue.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
2-
:mod:`Queue` --- A synchronized queue class
1+
:mod:`queue` --- A synchronized queue class
32
===========================================
43

54
.. module:: Queue
5+
:synopsis: Old name for the queue module.
6+
7+
.. module:: queue
68
:synopsis: A synchronized queue class.
79

810
.. note::
9-
The :mod:`Queue` module has been renamed to `queue` in Python 3.0.
11+
The :mod:`Queue` module has been renamed to :mod:`queue` in Python 3.0. It
12+
is importable under both names in Python 2.6 and the rest of the 2.x series.
13+
1014

11-
The :mod:`Queue` module implements multi-producer, multi-consumer queues.
15+
The :mod:`queue` module implements multi-producer, multi-consumer queues.
1216
It is especially useful in threaded programming when information must be
1317
exchanged safely between multiple threads. The :class:`Queue` class in this
1418
module implements all the required locking semantics. It depends on the
@@ -22,7 +26,7 @@ the first retrieved (operating like a stack). With a priority queue,
2226
the entries are kept sorted (using the :mod:`heapq` module) and the
2327
lowest valued entry is retrieved first.
2428

25-
The :mod:`Queue` module defines the following classes and exceptions:
29+
The :mod:`queue` module defines the following classes and exceptions:
2630

2731
.. class:: Queue(maxsize)
2832

Doc/library/socketserver.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
21
:mod:`socketserver` --- A framework for network servers
32
=======================================================
43

4+
.. module:: SocketServer
5+
:synopsis: Old name for the socketserver module.
6+
57
.. module:: socketserver
68
:synopsis: A framework for network servers.
7-
.. versionadded:: 2.6
9+
10+
.. note::
11+
The :mod:`SocketServer` module has been renamed to :mod:`socketserver` in
12+
Python 3.0. It is importable under both names in Python 2.6 and the rest of
13+
the 2.x series.
814

915

1016
The :mod:`socketserver` module simplifies the task of writing network servers.

Doc/library/socketserver_old.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

Doc/library/threading.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
This module constructs higher-level threading interfaces on top of the lower
1010
level :mod:`thread` module.
11-
See also the :mod:`mutex` and :mod:`Queue` modules.
11+
See also the :mod:`mutex` and :mod:`queue` modules.
1212

1313
The :mod:`dummy_threading` module is provided for situations where
1414
:mod:`threading` cannot be used because :mod:`thread` is missing.

Doc/reference/simple_stmts.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ The :keyword:`raise` statement
534534
If no expressions are present, :keyword:`raise` re-raises the last exception
535535
that was active in the current scope. If no exception is active in the current
536536
scope, a :exc:`TypeError` exception is raised indicating that this is an error
537-
(if running under IDLE, a :exc:`Queue.Empty` exception is raised instead).
537+
(if running under IDLE, a :exc:`queue.Empty` exception is raised instead).
538538

539539
Otherwise, :keyword:`raise` evaluates the expressions to get three objects,
540540
using ``None`` as the value of omitted expressions. The first two objects are

Doc/tutorial/stdlib2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ variables, and semaphores.
198198
While those tools are powerful, minor design errors can result in problems that
199199
are difficult to reproduce. So, the preferred approach to task coordination is
200200
to concentrate all access to a resource in a single thread and then use the
201-
:mod:`Queue` module to feed that thread with requests from other threads.
201+
:mod:`queue` module to feed that thread with requests from other threads.
202202
Applications using :class:`Queue` objects for inter-thread communication and
203203
coordination are easier to design, more readable, and more reliable.
204204

0 commit comments

Comments
 (0)