diff -r d76e91a29f64 Doc/faq/design.rst --- a/Doc/faq/design.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/faq/design.rst Wed Oct 09 16:49:06 2013 +0300 @@ -634,7 +634,8 @@ (ABCs). You can then use :func:`isinstance` and :func:`issubclass` to check whether an instance or a class implements a particular ABC. The :mod:`collections.abc` module defines a set of useful ABCs such as -:class:`Iterable`, :class:`Container`, and :class:`MutableMapping`. +:class:`~collections.abc.Iterable`, :class:`~collections.abc.Container`, and +:class:`~collections.abc.MutableMapping`. For Python, many of the advantages of interface specifications can be obtained by an appropriate test discipline for components. There is also a tool, diff -r d76e91a29f64 Doc/howto/unicode.rst --- a/Doc/howto/unicode.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/howto/unicode.rst Wed Oct 09 16:49:06 2013 +0300 @@ -531,7 +531,7 @@ of partial coding sequences. The work of implementing this has already been done for you: the built-in :func:`open` function can return a file-like object that assumes the file's contents are in a specified encoding and accepts Unicode -parameters for methods such as :meth:`read` and :meth:`write`. This works through +parameters for methods such as :meth:`~io.TextIOBase.read` and :meth:`~io.TextIOBase.write`. This works through :func:`open`\'s *encoding* and *errors* parameters which are interpreted just like those in :meth:`str.encode` and :meth:`bytes.decode`. @@ -656,7 +656,7 @@ and behaving like a stream returning data in encoding #2. For example, if you have an input file *f* that's in Latin-1, you -can wrap it with a :class:`StreamRecoder` to return bytes encoded in UTF-8:: +can wrap it with a :class:`~codecs.StreamRecoder` to return bytes encoded in UTF-8:: new_f = codecs.StreamRecoder(f, # en/decoder: used by read() to encode its results and diff -r d76e91a29f64 Doc/howto/urllib2.rst --- a/Doc/howto/urllib2.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/howto/urllib2.rst Wed Oct 09 16:49:06 2013 +0300 @@ -57,7 +57,7 @@ html = response.read() If you wish to retrieve a resource via URL and store it in a temporary location, -you can do so via the :func:`urlretrieve` function:: +you can do so via the :func:`~urllib.request.urlretrieve` function:: import urllib.request local_filename, headers = urllib.request.urlretrieve('http://python.org/') diff -r d76e91a29f64 Doc/library/2to3.rst --- a/Doc/library/2to3.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/2to3.rst Wed Oct 09 16:49:06 2013 +0300 @@ -290,11 +290,11 @@ Converts the use of iterator's :meth:`~iterator.next` methods to the :func:`next` function. It also renames :meth:`next` methods to - :meth:`~object.__next__`. + :meth:`~iterator.__next__`. .. 2to3fixer:: nonzero - Renames :meth:`~object.__nonzero__` to :meth:`~object.__bool__`. + Renames :meth:`__nonzero__` to :meth:`~object.__bool__`. .. 2to3fixer:: numliterals diff -r d76e91a29f64 Doc/library/_thread.rst --- a/Doc/library/_thread.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/_thread.rst Wed Oct 09 16:49:06 2013 +0300 @@ -177,7 +177,7 @@ equivalent to calling :func:`_thread.exit`. * Not all built-in functions that may block waiting for I/O allow other threads - to run. (The most popular ones (:func:`time.sleep`, :meth:`file.read`, + to run. (The most popular ones (:func:`time.sleep`, :meth:`io.FileIO.read`, :func:`select.select`) work as expected.) * It is not possible to interrupt the :meth:`acquire` method on a lock --- the diff -r d76e91a29f64 Doc/library/abc.rst --- a/Doc/library/abc.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/abc.rst Wed Oct 09 16:49:06 2013 +0300 @@ -114,18 +114,18 @@ MyIterable.register(Foo) The ABC ``MyIterable`` defines the standard iterable method, - :meth:`__iter__`, as an abstract method. The implementation given here can + :meth:`~iterator.__iter__`, as an abstract method. The implementation given here can still be called from subclasses. The :meth:`get_iterator` method is also part of the ``MyIterable`` abstract base class, but it does not have to be overridden in non-abstract derived classes. The :meth:`__subclasshook__` class method defined here says that any class - that has an :meth:`__iter__` method in its :attr:`__dict__` (or in that of - one of its base classes, accessed via the :attr:`__mro__` list) is + that has an :meth:`~iterator.__iter__` method in its :attr:`~object.__dict__` (or in that of + one of its base classes, accessed via the :attr:`~class.__mro__` list) is considered a ``MyIterable`` too. Finally, the last line makes ``Foo`` a virtual subclass of ``MyIterable``, - even though it does not define an :meth:`__iter__` method (it uses the + even though it does not define an :meth:`~iterator.__iter__` method (it uses the old-style iterable protocol, defined in terms of :meth:`__len__` and :meth:`__getitem__`). Note that this will not make ``get_iterator`` available as a method of ``Foo``, so it is provided separately. diff -r d76e91a29f64 Doc/library/asyncore.rst --- a/Doc/library/asyncore.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/asyncore.rst Wed Oct 09 16:49:06 2013 +0300 @@ -53,9 +53,9 @@ channels have been closed. All arguments are optional. The *count* parameter defaults to None, resulting in the loop terminating only when all channels have been closed. The *timeout* argument sets the timeout - parameter for the appropriate :func:`select` or :func:`poll` call, measured + parameter for the appropriate :func:`~select.select` or :func:`~select.poll` call, measured in seconds; the default is 30 seconds. The *use_poll* parameter, if true, - indicates that :func:`poll` should be used in preference to :func:`select` + indicates that :func:`~select.poll` should be used in preference to :func:`~select.select` (the default is ``False``). The *map* parameter is a dictionary whose items are the channels to watch. diff -r d76e91a29f64 Doc/library/audioop.rst --- a/Doc/library/audioop.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/audioop.rst Wed Oct 09 16:49:06 2013 +0300 @@ -241,7 +241,7 @@ transmit the data but also the state. Note that you should send the *initial* state (the one you passed to :func:`lin2adpcm`) along to the decoder, not the final state (as returned by the coder). If you want to use -:func:`struct.struct` to store the state in binary you can code the first +:class:`struct.Struct` to store the state in binary you can code the first element (the predicted value) in 16 bits and the second (the delta index) in 8. The ADPCM coders have never been tried against other ADPCM coders, only against diff -r d76e91a29f64 Doc/library/calendar.rst --- a/Doc/library/calendar.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/calendar.rst Wed Oct 09 16:49:06 2013 +0300 @@ -273,7 +273,7 @@ .. function:: timegm(tuple) An unrelated but handy function that takes a time tuple such as returned by the - :func:`gmtime` function in the :mod:`time` module, and returns the corresponding + :func:`~time.gmtime` function in the :mod:`time` module, and returns the corresponding Unix timestamp value, assuming an epoch of 1970, and the POSIX encoding. In fact, :func:`time.gmtime` and :func:`timegm` are each others' inverse. diff -r d76e91a29f64 Doc/library/chunk.rst --- a/Doc/library/chunk.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/chunk.rst Wed Oct 09 16:49:06 2013 +0300 @@ -54,8 +54,8 @@ Class which represents a chunk. The *file* argument is expected to be a file-like object. An instance of this class is specifically allowed. The - only method that is needed is :meth:`read`. If the methods :meth:`seek` and - :meth:`tell` are present and don't raise an exception, they are also used. + only method that is needed is :meth:`~io.IOBase.read`. If the methods :meth:`~io.IOBase.seek` and + :meth:`~io.IOBase.tell` are present and don't raise an exception, they are also used. If these methods are present and raise an exception, they are expected to not have altered the object. If the optional argument *align* is true, chunks are assumed to be aligned on 2-byte boundaries. If *align* is false, no diff -r d76e91a29f64 Doc/library/code.rst --- a/Doc/library/code.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/code.rst Wed Oct 09 16:49:06 2013 +0300 @@ -31,7 +31,7 @@ Convenience function to run a read-eval-print loop. This creates a new instance of :class:`InteractiveConsole` and sets *readfunc* to be used as the - :meth:`raw_input` method, if provided. If *local* is provided, it is passed to + :meth:`InteractiveConsole.raw_input` method, if provided. If *local* is provided, it is passed to the :class:`InteractiveConsole` constructor for use as the default namespace for the interpreter loop. The :meth:`interact` method of the instance is then run with *banner* passed as the banner to use, if provided. The console object is diff -r d76e91a29f64 Doc/library/codecs.rst --- a/Doc/library/codecs.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/codecs.rst Wed Oct 09 16:49:06 2013 +0300 @@ -46,8 +46,8 @@ The various functions or classes take the following arguments: *encode* and *decode*: These must be functions or methods which have the same - interface as the :meth:`encode`/:meth:`decode` methods of Codec instances (see - Codec Interface). The functions/methods are expected to work in a stateless + interface as the :meth:`~Codec.encode`/:meth:`~Codec.decode` methods of Codec instances (see + :ref:`Codec Interface `). The functions/methods are expected to work in a stateless mode. *incrementalencoder* and *incrementaldecoder*: These have to be factory @@ -314,8 +314,8 @@ The :class:`Codec` class defines the interface for stateless encoders/decoders. -To simplify and standardize error handling, the :meth:`encode` and -:meth:`decode` methods may implement different error handling schemes by +To simplify and standardize error handling, the :meth:`~Codec.encode` and +:meth:`~Codec.decode` methods may implement different error handling schemes by providing the *errors* string argument. The following string values are defined and implemented by all standard Python codecs: @@ -409,11 +409,11 @@ The :class:`IncrementalEncoder` and :class:`IncrementalDecoder` classes provide the basic interface for incremental encoding and decoding. Encoding/decoding the input isn't done with one call to the stateless encoder/decoder function, but -with multiple calls to the :meth:`encode`/:meth:`decode` method of the +with multiple calls to the :meth:`~IncrementalEncoder.encode`/:meth:`~IncrementalDecoder.decode` method of the incremental encoder/decoder. The incremental encoder/decoder keeps track of the encoding/decoding process during method calls. -The joined output of calls to the :meth:`encode`/:meth:`decode` method is the +The joined output of calls to the :meth:`~IncrementalEncoder.encode`/:meth:`~IncrementalDecoder.decode` method is the same as if all the single inputs were joined into one, and this input was encoded/decoded with the stateless encoder/decoder. diff -r d76e91a29f64 Doc/library/collections.abc.rst --- a/Doc/library/collections.abc.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/collections.abc.rst Wed Oct 09 16:49:06 2013 +0300 @@ -98,7 +98,7 @@ .. class:: Iterator - ABC for classes that provide the :meth:`__iter__` and :meth:`__next__` methods. + ABC for classes that provide the :meth:`~iterator.__iter__` and :meth:`~iterator.__next__` methods. See also the definition of :term:`iterator`. .. class:: Sequence diff -r d76e91a29f64 Doc/library/collections.rst --- a/Doc/library/collections.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/collections.rst Wed Oct 09 16:49:06 2013 +0300 @@ -979,7 +979,7 @@ Equality tests between :class:`OrderedDict` objects are order-sensitive and are implemented as ``list(od1.items())==list(od2.items())``. Equality tests between :class:`OrderedDict` objects and other -:class:`Mapping` objects are order-insensitive like regular dictionaries. +:class:`~collections.abc.Mapping` objects are order-insensitive like regular dictionaries. This allows :class:`OrderedDict` objects to be substituted anywhere a regular dictionary is used. diff -r d76e91a29f64 Doc/library/configparser.rst --- a/Doc/library/configparser.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/configparser.rst Wed Oct 09 16:49:06 2013 +0300 @@ -371,7 +371,7 @@ parser. :mod:`configparser` objects behave as close to actual dictionaries as possible. -The mapping interface is complete and adheres to the ``MutableMapping`` ABC. +The mapping interface is complete and adheres to the :class:`~collections.abc.MutableMapping` ABC. However, there are a few differences that should be taken into account: * By default, all keys in sections are accessible in a case-insensitive manner diff -r d76e91a29f64 Doc/library/dbm.rst --- a/Doc/library/dbm.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/dbm.rst Wed Oct 09 16:49:06 2013 +0300 @@ -317,7 +317,7 @@ database has to be created. It defaults to octal ``0o666`` (and will be modified by the prevailing umask). - In addition to the methods provided by the :class:`collections.MutableMapping` class, + In addition to the methods provided by the :class:`collections.abc.MutableMapping` class, :class:`dumbdbm` objects provide the following method: .. method:: dumbdbm.sync() diff -r d76e91a29f64 Doc/library/difflib.rst --- a/Doc/library/difflib.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/difflib.rst Wed Oct 09 16:49:06 2013 +0300 @@ -143,8 +143,8 @@ By default, the diff control lines (those with ``***`` or ``---``) are created with a trailing newline. This is helpful so that inputs created from - :func:`file.readlines` result in diffs that are suitable for use with - :func:`file.writelines` since both the inputs and outputs have trailing + :func:`io.IOBase.readlines` result in diffs that are suitable for use with + :func:`io.IOBase.writelines` since both the inputs and outputs have trailing newlines. For inputs that do not have trailing newlines, set the *lineterm* argument to @@ -275,8 +275,8 @@ By default, the diff control lines (those with ``---``, ``+++``, or ``@@``) are created with a trailing newline. This is helpful so that inputs created from - :func:`file.readlines` result in diffs that are suitable for use with - :func:`file.writelines` since both the inputs and outputs have trailing + :func:`io.IOBase.readlines` result in diffs that are suitable for use with + :func:`io.IOBase.writelines` since both the inputs and outputs have trailing newlines. For inputs that do not have trailing newlines, set the *lineterm* argument to @@ -630,9 +630,9 @@ Compare two sequences of lines, and generate the delta (a sequence of lines). Each sequence must contain individual single-line strings ending with newlines. - Such sequences can be obtained from the :meth:`readlines` method of file-like + Such sequences can be obtained from the :meth:`~io.IOBase.readlines` method of file-like objects. The delta generated also consists of newline-terminated strings, ready - to be printed as-is via the :meth:`writelines` method of a file-like object. + to be printed as-is via the :meth:`~io.IOBase.writelines` method of a file-like object. .. _differ-examples: @@ -642,7 +642,7 @@ This example compares two texts. First we set up the texts, sequences of individual single-line strings ending with newlines (such sequences can also be -obtained from the :meth:`readlines` method of file-like objects): +obtained from the :meth:`~io.BaseIO.readlines` method of file-like objects): >>> text1 = ''' 1. Beautiful is better than ugly. ... 2. Explicit is better than implicit. diff -r d76e91a29f64 Doc/library/enum.rst --- a/Doc/library/enum.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/enum.rst Wed Oct 09 16:49:06 2013 +0300 @@ -371,7 +371,7 @@ >>> list(Animal) [, , , ] -The semantics of this API resemble :class:`namedtuple`. The first argument +The semantics of this API resemble :class:`~collections.namedtuple`. The first argument of the call to :class:`Enum` is the name of the enumeration. The second argument is the *source* of enumeration member names. It can be a diff -r d76e91a29f64 Doc/library/exceptions.rst --- a/Doc/library/exceptions.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/exceptions.rst Wed Oct 09 16:49:06 2013 +0300 @@ -146,10 +146,9 @@ .. exception:: EOFError - Raised when one of the built-in functions (:func:`input` or :func:`raw_input`) - hits an end-of-file condition (EOF) without reading any data. (N.B.: the - :meth:`file.read` and :meth:`file.readline` methods return an empty string - when they hit EOF.) + Raised when the :func:`input` function hits an end-of-file condition (EOF) + without reading any data. (N.B.: the :meth:`io.IOBase.read` and + :meth:`io.IOBase.readline` methods return an empty string when they hit EOF.) .. exception:: FloatingPointError @@ -366,7 +365,7 @@ executed, and so that a debugger can execute a script without running the risk of losing control. The :func:`os._exit` function can be used if it is absolutely positively necessary to exit immediately (for example, in the child - process after a call to :func:`fork`). + process after a call to :func:`os.fork`). The exception inherits from :exc:`BaseException` instead of :exc:`Exception` so that it is not accidentally caught by code that catches :exc:`Exception`. This @@ -629,7 +628,7 @@ .. exception:: BytesWarning - Base class for warnings related to :class:`bytes` and :class:`buffer`. + Base class for warnings related to :class:`bytes` and :class:`bytearray`. .. exception:: ResourceWarning diff -r d76e91a29f64 Doc/library/fileinput.rst --- a/Doc/library/fileinput.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/fileinput.rst Wed Oct 09 16:49:06 2013 +0300 @@ -137,10 +137,10 @@ Class :class:`FileInput` is the implementation; its methods :meth:`filename`, :meth:`fileno`, :meth:`lineno`, :meth:`filelineno`, :meth:`isfirstline`, :meth:`isstdin`, :meth:`nextfile` and :meth:`close` correspond to the functions - of the same name in the module. In addition it has a :meth:`readline` method + of the same name in the module. In addition it has a :meth:`~io.TextIOBase.readline` method which returns the next input line, and a :meth:`__getitem__` method which implements the sequence behavior. The sequence must be accessed in strictly - sequential order; random access and :meth:`readline` cannot be mixed. + sequential order; random access and :meth:`~io.TextIOBase.readline` cannot be mixed. With *mode* you can specify which file mode will be passed to :func:`open`. It must be one of ``'r'``, ``'rU'``, ``'U'`` and ``'rb'``. diff -r d76e91a29f64 Doc/library/ftplib.rst --- a/Doc/library/ftplib.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/ftplib.rst Wed Oct 09 16:49:06 2013 +0300 @@ -272,7 +272,7 @@ Store a file in binary transfer mode. *cmd* should be an appropriate ``STOR`` command: ``"STOR filename"``. *file* is a :term:`file object` - (opened in binary mode) which is read until EOF using its :meth:`read` + (opened in binary mode) which is read until EOF using its :meth:`~io.IOBase.read` method in blocks of size *blocksize* to provide the data to be stored. The *blocksize* argument defaults to 8192. *callback* is an optional single parameter callable that is called on each block of data after it is sent. @@ -286,7 +286,7 @@ Store a file in ASCII transfer mode. *cmd* should be an appropriate ``STOR`` command (see :meth:`storbinary`). Lines are read until EOF from the - :term:`file object` *file* (opened in binary mode) using its :meth:`readline` + :term:`file object` *file* (opened in binary mode) using its :meth:`~io.IOBase.readline` method to provide the data to be stored. *callback* is an optional single parameter callable that is called on each line after it is sent. diff -r d76e91a29f64 Doc/library/http.server.rst --- a/Doc/library/http.server.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/http.server.rst Wed Oct 09 16:49:06 2013 +0300 @@ -29,7 +29,7 @@ .. class:: HTTPServer(server_address, RequestHandlerClass) - This class builds on the :class:`TCPServer` class by storing the server + This class builds on the :class:`~socketserver.TCPServer` class by storing the server address as instance variables named :attr:`server_name` and :attr:`server_port`. The server is accessible by the handler, typically through the handler's :attr:`server` instance variable. @@ -326,7 +326,7 @@ file's contents are returned; otherwise a directory listing is generated by calling the :meth:`list_directory` method. This method uses :func:`os.listdir` to scan the directory, and returns a ``404`` error - response if the :func:`listdir` fails. + response if the :func:`~os.listdir` fails. If the request was mapped to a file, it is opened and the contents are returned. Any :exc:`OSError` exception in opening the requested file is diff -r d76e91a29f64 Doc/library/imaplib.rst --- a/Doc/library/imaplib.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/imaplib.rst Wed Oct 09 16:49:06 2013 +0300 @@ -310,7 +310,7 @@ Opens socket to *port* at *host*. This method is implicitly called by the :class:`IMAP4` constructor. The connection objects established by this - method will be used in the ``read``, ``readline``, ``send``, and ``shutdown`` + method will be used in the :meth:`IMAP4.read`, :meth:`IMAP4.readline`, :meth:`IMAP4.send`, and :meth:`IMAP4.shutdown` methods. You may override this method. diff -r d76e91a29f64 Doc/library/importlib.rst --- a/Doc/library/importlib.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/importlib.rst Wed Oct 09 16:49:06 2013 +0300 @@ -165,7 +165,7 @@ It is legal though generally not very useful to reload built-in or dynamically loaded modules (this is not true for e.g. :mod:`sys`, - :mod:`__main__`, :mod:`__builtin__` and other key modules where reloading is + :mod:`__main__`, :mod:`builtins` and other key modules where reloading is frowned upon). In many cases, however, extension modules are not designed to be initialized more than once, and may fail in arbitrary ways when reloaded. diff -r d76e91a29f64 Doc/library/inspect.rst --- a/Doc/library/inspect.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/inspect.rst Wed Oct 09 16:49:06 2013 +0300 @@ -928,7 +928,7 @@ that raise AttributeError). It can also return descriptors objects instead of instance members. - If the instance :attr:`__dict__` is shadowed by another member (for example a + If the instance :attr:`~object.__dict__` is shadowed by another member (for example a property) then this function will be unable to find instance members. .. versionadded:: 3.2 diff -r d76e91a29f64 Doc/library/io.rst --- a/Doc/library/io.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/io.rst Wed Oct 09 16:49:06 2013 +0300 @@ -157,7 +157,7 @@ The abstract base classes also provide default implementations of some methods in order to help implementation of concrete stream classes. For example, :class:`BufferedIOBase` provides unoptimized implementations of - ``readinto()`` and ``readline()``. + :meth:`~IOBase.readinto` and :meth:`~IOBase.readline`. At the top of the I/O hierarchy is the abstract base class :class:`IOBase`. It defines the basic interface to a stream. Note, however, that there is no @@ -228,7 +228,7 @@ The basic type used for binary data read from or written to a file is :class:`bytes`. :class:`bytearray`\s are accepted too, and in some cases - (such as :class:`readinto`) required. Text I/O classes work with + (such as :meth:`readinto`) required. Text I/O classes work with :class:`str` data. Note that calling any method (even inquiries) on a closed stream is diff -r d76e91a29f64 Doc/library/itertools.rst --- a/Doc/library/itertools.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/itertools.rst Wed Oct 09 16:49:06 2013 +0300 @@ -88,7 +88,7 @@ .. function:: accumulate(iterable[, func]) Make an iterator that returns accumulated sums. Elements may be any addable - type including :class:`Decimal` or :class:`Fraction`. If the optional + type including :class:`~decimal.Decimal` or :class:`~fractions.Fraction`. If the optional *func* argument is supplied, it should be a function of two arguments and it will be used instead of addition. diff -r d76e91a29f64 Doc/library/mailbox.rst --- a/Doc/library/mailbox.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/mailbox.rst Wed Oct 09 16:49:06 2013 +0300 @@ -1009,7 +1009,7 @@ Set the "From " line to *from_*, which should be specified without a leading "From " or trailing newline. For convenience, *time_* may be specified and will be formatted appropriately and appended to *from_*. If - *time_* is specified, it should be a :class:`struct_time` instance, a + *time_* is specified, it should be a :class:`time.struct_time` instance, a tuple suitable for passing to :meth:`time.strftime`, or ``True`` (to use :meth:`time.gmtime`). @@ -1380,7 +1380,7 @@ Set the "From " line to *from_*, which should be specified without a leading "From " or trailing newline. For convenience, *time_* may be specified and will be formatted appropriately and appended to *from_*. If - *time_* is specified, it should be a :class:`struct_time` instance, a + *time_* is specified, it should be a :class:`time.struct_time` instance, a tuple suitable for passing to :meth:`time.strftime`, or ``True`` (to use :meth:`time.gmtime`). diff -r d76e91a29f64 Doc/library/math.rst --- a/Doc/library/math.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/math.rst Wed Oct 09 16:49:06 2013 +0300 @@ -31,7 +31,7 @@ Return the ceiling of *x*, the smallest integer greater than or equal to *x*. If *x* is not a float, delegates to ``x.__ceil__()``, which should return an - :class:`Integral` value. + :class:`~numbers.Integral` value. .. function:: copysign(x, y) @@ -53,7 +53,7 @@ Return the floor of *x*, the largest integer less than or equal to *x*. If *x* is not a float, delegates to ``x.__floor__()``, which should return an - :class:`Integral` value. + :class:`~numbers.Integral` value. .. function:: fmod(x, y) @@ -133,7 +133,7 @@ .. function:: trunc(x) - Return the :class:`Real` value *x* truncated to an :class:`Integral` (usually + Return the :class:`~numbers.Real` value *x* truncated to an :class:`~numbers.Integral` (usually an integer). Delegates to ``x.__trunc__()``. diff -r d76e91a29f64 Doc/library/msilib.rst --- a/Doc/library/msilib.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/msilib.rst Wed Oct 09 16:49:06 2013 +0300 @@ -429,7 +429,7 @@ ----------- :mod:`msilib` provides several classes that wrap the GUI tables in an MSI -database. However, no standard user interface is provided; use :mod:`bdist_msi` +database. However, no standard user interface is provided; use :mod:`~distutils.command.bdist_msi` to create MSI files with a user-interface for installing Python packages. diff -r d76e91a29f64 Doc/library/ossaudiodev.rst --- a/Doc/library/ossaudiodev.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/ossaudiodev.rst Wed Oct 09 16:49:06 2013 +0300 @@ -169,11 +169,11 @@ be used in a :keyword:`with` statement. -The following methods each map to exactly one :func:`ioctl` system call. The +The following methods each map to exactly one :c:func:`ioctl` system call. The correspondence is obvious: for example, :meth:`setfmt` corresponds to the ``SNDCTL_DSP_SETFMT`` ioctl, and :meth:`sync` to ``SNDCTL_DSP_SYNC`` (this can be useful when consulting the OSS documentation). If the underlying -:func:`ioctl` fails, they all raise :exc:`OSError`. +:c:func:`ioctl` fails, they all raise :exc:`OSError`. .. method:: oss_audio_device.nonblock() diff -r d76e91a29f64 Doc/library/pyexpat.rst --- a/Doc/library/pyexpat.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/pyexpat.rst Wed Oct 09 16:49:06 2013 +0300 @@ -484,7 +484,7 @@ .. attribute:: ExpatError.code Expat's internal error number for the specific error. The - :data:`errors.messages` dictionary maps these error numbers to Expat's error + :data:`errors.messages ` dictionary maps these error numbers to Expat's error messages. For example:: from xml.parsers.expat import ParserCreate, ExpatError, errors @@ -495,8 +495,8 @@ except ExpatError as err: print("Error:", errors.messages[err.code]) - The :mod:`errors` module also provides error message constants and a - dictionary :data:`~errors.codes` mapping these messages back to the error + The :mod:`~xml.parsers.expat.errors` module also provides error message constants and a + dictionary :data:`~xml.parsers.expat.errors.codes` mapping these messages back to the error codes, see below. diff -r d76e91a29f64 Doc/library/shelve.rst --- a/Doc/library/shelve.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/shelve.rst Wed Oct 09 16:49:06 2013 +0300 @@ -106,7 +106,7 @@ .. class:: Shelf(dict, protocol=None, writeback=False, keyencoding='utf-8') - A subclass of :class:`collections.MutableMapping` which stores pickled values + A subclass of :class:`collections.abc.MutableMapping` which stores pickled values in the *dict* object. By default, version 0 pickles are used to serialize values. The version of the diff -r d76e91a29f64 Doc/library/smtpd.rst --- a/Doc/library/smtpd.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/smtpd.rst Wed Oct 09 16:49:06 2013 +0300 @@ -27,7 +27,7 @@ ------------------ -.. class:: SMTPServer(localaddr, remoteaddr, data_size_limit=33554432, +.. class:: SMTPServer(localaddr, remoteaddr, data_size_limit=33554432,\ map=None) Create a new :class:`SMTPServer` object, which binds to local address @@ -96,7 +96,7 @@ SMTPChannel Objects ------------------- -.. class:: SMTPChannel(server, conn, addr, data_size_limit=33554432, +.. class:: SMTPChannel(server, conn, addr, data_size_limit=33554432,\ map=None)) Create a new :class:`SMTPChannel` object which manages the communication diff -r d76e91a29f64 Doc/library/socket.rst --- a/Doc/library/socket.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/socket.rst Wed Oct 09 16:49:06 2013 +0300 @@ -285,7 +285,7 @@ RCVALL_* Constants for Windows' WSAIoctl(). The constants are used as arguments to the - :meth:`ioctl` method of socket objects. + :meth:`~socket.socket.ioctl` method of socket objects. .. data:: TIPC_* diff -r d76e91a29f64 Doc/library/socketserver.rst --- a/Doc/library/socketserver.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/socketserver.rst Wed Oct 09 16:49:06 2013 +0300 @@ -111,9 +111,9 @@ the request handler class :meth:`handle` method. Another approach to handling multiple simultaneous requests in an environment -that supports neither threads nor :func:`fork` (or where these are too expensive +that supports neither threads nor :func:`~os.fork` (or where these are too expensive or inappropriate for the service) is to maintain an explicit table of partially -finished requests and to use :func:`select` to decide which request to work on +finished requests and to use :func:`~select.select` to decide which request to work on next (or whether to handle a new incoming request). This is particularly important for stream services where each client can potentially be connected for a long time (if threads or subprocesses cannot be used). See :mod:`asyncore` diff -r d76e91a29f64 Doc/library/stat.rst --- a/Doc/library/stat.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/stat.rst Wed Oct 09 16:49:06 2013 +0300 @@ -1,5 +1,5 @@ -:mod:`stat` --- Interpreting :func:`stat` results -================================================= +:mod:`stat` --- Interpreting :func:`~os.stat` results +===================================================== .. module:: stat :synopsis: Utilities for interpreting the results of os.stat(), diff -r d76e91a29f64 Doc/library/telnetlib.rst --- a/Doc/library/telnetlib.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/telnetlib.rst Wed Oct 09 16:49:06 2013 +0300 @@ -185,7 +185,7 @@ Read until one from a list of a regular expressions matches. The first argument is a list of regular expressions, either compiled - (:class:`re.RegexObject` instances) or uncompiled (byte strings). The + (:ref:`regex objects `) or uncompiled (byte strings). The optional second argument is a timeout, in seconds; the default is to block indefinitely. diff -r d76e91a29f64 Doc/library/time.rst --- a/Doc/library/time.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/time.rst Wed Oct 09 16:49:06 2013 +0300 @@ -675,7 +675,7 @@ of many format specifiers in :func:`strftime` and :func:`strptime`. Module :mod:`calendar` - General calendar-related functions. :func:`timegm` is the inverse of + General calendar-related functions. :func:`~calendar.timegm` is the inverse of :func:`gmtime` from this module. .. rubric:: Footnotes diff -r d76e91a29f64 Doc/library/unittest.mock.rst --- a/Doc/library/unittest.mock.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/unittest.mock.rst Wed Oct 09 16:49:06 2013 +0300 @@ -210,7 +210,7 @@ Accessing any attribute not in this list will raise an `AttributeError`. If `spec` is an object (rather than a list of strings) then - :attr:`__class__` returns the class of the spec object. This allows mocks + :attr:`~instance.__class__` returns the class of the spec object. This allows mocks to pass `isinstance` tests. * `spec_set`: A stricter variant of `spec`. If used, attempting to *set* @@ -1989,7 +1989,8 @@ default) then a `MagicMock` will be created for you, with the API limited to methods or attributes available on standard file handles. - `read_data` is a string for the `read`, `readline`, and `readlines` methods + `read_data` is a string for the :meth:`~io.IOBase.read`, + :meth:`~io.IOBase.readline`, and :meth:`~io.IOBase.readlines` methods of the file handle to return. Calls to those methods will take data from `read_data` until it is depleted. The mock of these methods is pretty simplistic. If you need more control over the data that you are feeding to diff -r d76e91a29f64 Doc/library/warnings.rst --- a/Doc/library/warnings.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/warnings.rst Wed Oct 09 16:49:06 2013 +0300 @@ -89,7 +89,7 @@ | | Unicode. | +----------------------------------+-----------------------------------------------+ | :exc:`BytesWarning` | Base category for warnings related to | -| | :class:`bytes` and :class:`buffer`. | +| | :class:`bytes` and :class:`bytearray`. | +----------------------------------+-----------------------------------------------+ | :exc:`ResourceWarning` | Base category for warnings related to | | | resource usage. | diff -r d76e91a29f64 Doc/library/zipfile.rst --- a/Doc/library/zipfile.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/library/zipfile.rst Wed Oct 09 16:49:06 2013 +0300 @@ -213,8 +213,9 @@ .. note:: The file-like object is read-only and provides the following methods: - :meth:`!read`, :meth:`!readline`, :meth:`!readlines`, :meth:`!__iter__`, - :meth:`!__next__`. + :meth:`~io.BufferedIOBase.read`, :meth:`~io.IOBase.readline`, + :meth:`~io.IOBase.readlines`, :meth:`__iter__`, + :meth:`~iterator.__next__`. .. note:: diff -r d76e91a29f64 Doc/whatsnew/3.4.rst --- a/Doc/whatsnew/3.4.rst Wed Oct 09 14:20:37 2013 +0300 +++ b/Doc/whatsnew/3.4.rst Wed Oct 09 16:49:06 2013 +0300 @@ -208,9 +208,9 @@ dis --- -The :mod:`dis` module is now built around an :class:`Instruction` class that +The :mod:`dis` module is now built around an :class:`~dis.Instruction` class that provides details of individual bytecode operations and a -:func:`get_instructions` iterator that emits the Instruction stream for a +:func:`~dis.get_instructions` iterator that emits the Instruction stream for a given piece of Python code. The various display tools in the :mod:`dis` module have been updated to be based on these new components.