Skip to content

Commit ee1b01a

Browse files
Issue python#21818: Fixed references to classes that have names matching with module
names.
1 parent 61f0a02 commit ee1b01a

File tree

9 files changed

+30
-30
lines changed

9 files changed

+30
-30
lines changed

Doc/library/array.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ When an array object is printed or converted to a string, it is represented as
254254
empty, otherwise it is a string if the *typecode* is ``'u'``, otherwise it is a
255255
list of numbers. The string is guaranteed to be able to be converted back to an
256256
array with the same type and value using :func:`eval`, so long as the
257-
:func:`array` function has been imported using ``from array import array``.
257+
:class:`~array.array` class has been imported using ``from array import array``.
258258
Examples::
259259

260260
array('l')

Doc/library/datetime.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,8 +1296,8 @@ Using datetime with tzinfo:
12961296

12971297
.. _datetime-time:
12981298

1299-
:class:`time` Objects
1300-
---------------------
1299+
:class:`.time` Objects
1300+
----------------------
13011301

13021302
A time object represents a (local) time of day, independent of any particular
13031303
day, and subject to adjustment via a :class:`tzinfo` object.
@@ -1382,7 +1382,7 @@ Supported operations:
13821382
``!=``. The latter cases return :const:`False` or :const:`True`, respectively.
13831383

13841384
.. versionchanged:: 3.3
1385-
Equality comparisons between naive and aware :class:`time` instances
1385+
Equality comparisons between naive and aware :class:`~datetime.time` instances
13861386
don't raise :exc:`TypeError`.
13871387

13881388
* hash, use as dict key

Doc/library/mmap.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ byte by doing ``obj[index] = 97``, or change a subsequence by assigning to a
1414
slice: ``obj[i1:i2] = b'...'``. You can also read and write data starting at
1515
the current file position, and :meth:`seek` through the file to different positions.
1616

17-
A memory-mapped file is created by the :class:`mmap` constructor, which is
17+
A memory-mapped file is created by the :class:`~mmap.mmap` constructor, which is
1818
different on Unix and on Windows. In either case you must provide a file
1919
descriptor for a file opened for update. If you wish to map an existing Python
2020
file object, use its :meth:`fileno` method to obtain the correct value for the
@@ -70,7 +70,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
7070
**(Unix version)** Maps *length* bytes from the file specified by the file
7171
descriptor *fileno*, and returns a mmap object. If *length* is ``0``, the
7272
maximum length of the map will be the current size of the file when
73-
:class:`mmap` is called.
73+
:class:`~mmap.mmap` is called.
7474

7575
*flags* specifies the nature of the mapping. :const:`MAP_PRIVATE` creates a
7676
private copy-on-write mapping, so changes to the contents of the mmap
@@ -97,7 +97,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
9797
by the descriptor *fileno* is internally automatically synchronized
9898
with physical backing store on Mac OS X and OpenVMS.
9999

100-
This example shows a simple way of using :class:`mmap`::
100+
This example shows a simple way of using :class:`~mmap.mmap`::
101101

102102
import mmap
103103

@@ -122,7 +122,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
122122
mm.close()
123123

124124

125-
:class:`mmap` can also be used as a context manager in a :keyword:`with`
125+
:class:`~mmap.mmap` can also be used as a context manager in a :keyword:`with`
126126
statement.::
127127

128128
import mmap

Doc/library/netrc.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212

1313
--------------
1414

15-
The :class:`netrc` class parses and encapsulates the netrc file format used by
15+
The :class:`~netrc.netrc` class parses and encapsulates the netrc file format used by
1616
the Unix :program:`ftp` program and other FTP clients.
1717

1818

1919
.. class:: netrc([file])
2020

21-
A :class:`netrc` instance or subclass instance encapsulates data from a netrc
21+
A :class:`~netrc.netrc` instance or subclass instance encapsulates data from a netrc
2222
file. The initialization argument, if present, specifies the file to parse. If
2323
no argument is given, the file :file:`.netrc` in the user's home directory will
2424
be read. Parse errors will raise :exc:`NetrcParseError` with diagnostic
@@ -35,7 +35,7 @@ the Unix :program:`ftp` program and other FTP clients.
3535

3636
.. exception:: NetrcParseError
3737

38-
Exception raised by the :class:`netrc` class when syntactical errors are
38+
Exception raised by the :class:`~netrc.netrc` class when syntactical errors are
3939
encountered in source text. Instances of this exception provide three
4040
interesting attributes: :attr:`msg` is a textual explanation of the error,
4141
:attr:`filename` is the name of the source file, and :attr:`lineno` gives the
@@ -47,7 +47,7 @@ the Unix :program:`ftp` program and other FTP clients.
4747
netrc Objects
4848
-------------
4949

50-
A :class:`netrc` instance has the following methods:
50+
A :class:`~netrc.netrc` instance has the following methods:
5151

5252

5353
.. method:: netrc.authenticators(host)
@@ -63,7 +63,7 @@ A :class:`netrc` instance has the following methods:
6363
Dump the class data as a string in the format of a netrc file. (This discards
6464
comments and may reorder the entries.)
6565

66-
Instances of :class:`netrc` have public instance variables:
66+
Instances of :class:`~netrc.netrc` have public instance variables:
6767

6868

6969
.. attribute:: netrc.hosts

Doc/library/socket.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1367,7 +1367,7 @@ Note that there are no methods :meth:`read` or :meth:`write`; use
13671367
:meth:`~socket.recv` and :meth:`~socket.send` without *flags* argument instead.
13681368

13691369
Socket objects also have these (read-only) attributes that correspond to the
1370-
values given to the :class:`socket` constructor.
1370+
values given to the :class:`~socket.socket` constructor.
13711371

13721372

13731373
.. attribute:: socket.family

Doc/whatsnew/2.3.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,13 +1683,13 @@ Date and time types suitable for expressing timestamps were added as the
16831683
fancy features, and just stick to the basics of representing time.
16841684

16851685
The three primary types are: :class:`date`, representing a day, month, and year;
1686-
:class:`time`, consisting of hour, minute, and second; and :class:`datetime`,
1687-
which contains all the attributes of both :class:`date` and :class:`time`.
1686+
:class:`~datetime.time`, consisting of hour, minute, and second; and :class:`~datetime.datetime`,
1687+
which contains all the attributes of both :class:`date` and :class:`~datetime.time`.
16881688
There's also a :class:`timedelta` class representing differences between two
16891689
points in time, and time zone logic is implemented by classes inheriting from
16901690
the abstract :class:`tzinfo` class.
16911691

1692-
You can create instances of :class:`date` and :class:`time` by either supplying
1692+
You can create instances of :class:`date` and :class:`~datetime.time` by either supplying
16931693
keyword arguments to the appropriate constructor, e.g.
16941694
``datetime.date(year=1972, month=10, day=15)``, or by using one of a number of
16951695
class methods. For example, the :meth:`date.today` class method returns the
@@ -1708,7 +1708,7 @@ number of methods for producing formatted strings from objects::
17081708
'2002 30 Dec'
17091709

17101710
The :meth:`replace` method allows modifying one or more fields of a
1711-
:class:`date` or :class:`datetime` instance, returning a new instance::
1711+
:class:`date` or :class:`~datetime.datetime` instance, returning a new instance::
17121712

17131713
>>> d = datetime.datetime.now()
17141714
>>> d
@@ -1718,11 +1718,11 @@ The :meth:`replace` method allows modifying one or more fields of a
17181718
>>>
17191719

17201720
Instances can be compared, hashed, and converted to strings (the result is the
1721-
same as that of :meth:`isoformat`). :class:`date` and :class:`datetime`
1721+
same as that of :meth:`isoformat`). :class:`date` and :class:`~datetime.datetime`
17221722
instances can be subtracted from each other, and added to :class:`timedelta`
17231723
instances. The largest missing feature is that there's no standard library
17241724
support for parsing strings and getting back a :class:`date` or
1725-
:class:`datetime`.
1725+
:class:`~datetime.datetime`.
17261726

17271727
For more information, refer to the module's reference documentation.
17281728
(Contributed by Tim Peters.)

Doc/whatsnew/2.4.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1523,7 +1523,7 @@ code:
15231523
empty list instead of raising a :exc:`TypeError` exception if called with no
15241524
arguments.
15251525

1526-
* You can no longer compare the :class:`date` and :class:`datetime` instances
1526+
* You can no longer compare the :class:`date` and :class:`~datetime.datetime` instances
15271527
provided by the :mod:`datetime` module. Two instances of different classes
15281528
will now always be unequal, and relative comparisons (``<``, ``>``) will raise
15291529
a :exc:`TypeError`.

Doc/whatsnew/2.5.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ complete list of changes, or look through the SVN logs for all the details.
13071307

13081308
(Contributed by Skip Montanaro and Andrew McNamara.)
13091309

1310-
* The :class:`datetime` class in the :mod:`datetime` module now has a
1310+
* The :class:`~datetime.datetime` class in the :mod:`datetime` module now has a
13111311
``strptime(string, format)`` method for parsing date strings, contributed
13121312
by Josh Spoerri. It uses the same format characters as :func:`time.strptime` and
13131313
:func:`time.strftime`::
@@ -1497,7 +1497,7 @@ complete list of changes, or look through the SVN logs for all the details.
14971497
* The :mod:`pyexpat` module now uses version 2.0 of the Expat parser.
14981498
(Contributed by Trent Mick.)
14991499

1500-
* The :class:`Queue` class provided by the :mod:`Queue` module gained two new
1500+
* The :class:`~queue.Queue` class provided by the :mod:`Queue` module gained two new
15011501
methods. :meth:`join` blocks until all items in the queue have been retrieved
15021502
and all processing work on the items have been completed. Worker threads call
15031503
the other new method, :meth:`task_done`, to signal that processing for an item
@@ -1649,7 +1649,7 @@ complete list of changes, or look through the SVN logs for all the details.
16491649

16501650
.. Patch #754022
16511651
1652-
* The :mod:`xmlrpclib` module now supports returning :class:`datetime` objects
1652+
* The :mod:`xmlrpclib` module now supports returning :class:`~datetime.datetime` objects
16531653
for the XML-RPC date type. Supply ``use_datetime=True`` to the :func:`loads`
16541654
function or the :class:`Unmarshaller` class to enable this feature. (Contributed
16551655
by Skip Montanaro.)

Doc/whatsnew/2.6.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -613,10 +613,10 @@ multiple of 4.
613613
result = queue.get()
614614
print 'Factorial', N, '=', result
615615

616-
A :class:`Queue` is used to communicate the result of the factorial.
617-
The :class:`Queue` object is stored in a global variable.
616+
A :class:`~queue.Queue` is used to communicate the result of the factorial.
617+
The :class:`~queue.Queue` object is stored in a global variable.
618618
The child process will use the value of the variable when the child
619-
was created; because it's a :class:`Queue`, parent and child can use
619+
was created; because it's a :class:`~queue.Queue`, parent and child can use
620620
the object to communicate. (If the parent were to change the value of
621621
the global variable, the child's value would be unaffected, and vice
622622
versa.)
@@ -2131,7 +2131,7 @@ changes, or look through the Subversion logs for all the details.
21312131

21322132
(Contributed by Christian Heimes and Mark Dickinson.)
21332133

2134-
* :class:`mmap` objects now have a :meth:`rfind` method that searches for a
2134+
* :class:`~mmap.mmap` objects now have a :meth:`rfind` method that searches for a
21352135
substring beginning at the end of the string and searching
21362136
backwards. The :meth:`find` method also gained an *end* parameter
21372137
giving an index at which to stop searching.
@@ -2630,7 +2630,7 @@ changes, or look through the Subversion logs for all the details.
26302630
:class:`datetime.date` and :class:`datetime.time` to the
26312631
:class:`xmlrpclib.DateTime` type; the conversion semantics were
26322632
not necessarily correct for all applications. Code using
2633-
:mod:`xmlrpclib` should convert :class:`date` and :class:`time`
2633+
:mod:`xmlrpclib` should convert :class:`date` and :class:`~datetime.time`
26342634
instances. (:issue:`1330538`) The code can also handle
26352635
dates before 1900 (contributed by Ralf Schmitt; :issue:`2014`)
26362636
and 64-bit integers represented by using ``<i8>`` in XML-RPC responses
@@ -3283,7 +3283,7 @@ that may require changes to your code:
32833283
:class:`datetime.date` and :class:`datetime.time` to the
32843284
:class:`xmlrpclib.DateTime` type; the conversion semantics were
32853285
not necessarily correct for all applications. Code using
3286-
:mod:`xmlrpclib` should convert :class:`date` and :class:`time`
3286+
:mod:`xmlrpclib` should convert :class:`date` and :class:`~datetime.time`
32873287
instances. (:issue:`1330538`)
32883288

32893289
* (3.0-warning mode) The :class:`Exception` class now warns

0 commit comments

Comments
 (0)