@@ -344,8 +344,8 @@ aspects that are visible to the programmer:
344344
345345* The :mod: `importlib.abc ` module has been updated with new :term: `abstract base
346346 classes <abstract base class> ` for loading bytecode files. The obsolete
347- ABCs, :class: `~importlib.abc. PyLoader ` and
348- :class: `~importlib.abc. PyPycLoader `, have been deprecated (instructions on how
347+ ABCs, :class: `! PyLoader ` and
348+ :class: `! PyPycLoader `, have been deprecated (instructions on how
349349 to stay Python 3.1 compatible are included with the documentation).
350350
351351.. seealso ::
@@ -401,7 +401,7 @@ The *native strings* are always of type :class:`str` but are restricted to code
401401points between *U+0000 * through *U+00FF * which are translatable to bytes using
402402*Latin-1 * encoding. These strings are used for the keys and values in the
403403environment dictionary and for response headers and statuses in the
404- :func: `start_response ` function. They must follow :rfc: `2616 ` with respect to
404+ :func: `! start_response ` function. They must follow :rfc: `2616 ` with respect to
405405encoding. That is, they must either be *ISO-8859-1 * characters or use
406406:rfc: `2047 ` MIME encoding.
407407
@@ -415,8 +415,8 @@ points:
415415 encoded in utf-8 was using ``h.encode('utf-8') `` now needs to convert from
416416 bytes to native strings using ``h.encode('utf-8').decode('latin-1') ``.
417417
418- * Values yielded by an application or sent using the :meth: `write ` method
419- must be byte strings. The :func: `start_response ` function and environ
418+ * Values yielded by an application or sent using the :meth: `! write ` method
419+ must be byte strings. The :func: `! start_response ` function and environ
420420 must use native strings. The two cannot be mixed.
421421
422422For server implementers writing CGI-to-WSGI pathways or other CGI-style
@@ -499,7 +499,7 @@ Some smaller changes made to the core Python language are:
499499
500500* The :func: `hasattr ` function works by calling :func: `getattr ` and detecting
501501 whether an exception is raised. This technique allows it to detect methods
502- created dynamically by :meth: `__getattr__ ` or :meth: `__getattribute__ ` which
502+ created dynamically by :meth: `~object. __getattr__ ` or :meth: `~object. __getattribute__ ` which
503503 would otherwise be absent from the class dictionary. Formerly, *hasattr *
504504 would catch any exception, possibly masking genuine errors. Now, *hasattr *
505505 has been tightened to only catch :exc: `AttributeError ` and let other
@@ -620,7 +620,7 @@ Some smaller changes made to the core Python language are:
620620
621621* :class: `range ` objects now support *index * and *count * methods. This is part
622622 of an effort to make more objects fully implement the
623- :class: `collections.Sequence ` :term: `abstract base class `. As a result, the
623+ :class: `collections.Sequence <collections.abc.Sequence> ` :term: `abstract base class `. As a result, the
624624 language will have a more uniform API. In addition, :class: `range ` objects
625625 now support slicing and negative indices, even with values larger than
626626 :data: `sys.maxsize `. This makes *range * more interoperable with lists::
@@ -720,7 +720,7 @@ format.
720720elementtree
721721-----------
722722
723- The :mod: `xml.etree.ElementTree ` package and its :mod: `xml.etree.cElementTree `
723+ The :mod: `xml.etree.ElementTree ` package and its :mod: `! xml.etree.cElementTree `
724724counterpart have been updated to version 1.3.
725725
726726Several new and useful functions and methods have been added:
@@ -1008,13 +1008,13 @@ datetime and time
10081008 after 1900. The new supported year range is from 1000 to 9999 inclusive.
10091009
10101010* Whenever a two-digit year is used in a time tuple, the interpretation has been
1011- governed by :data: `time.accept2dyear `. The default is ``True `` which means that
1011+ governed by :data: `! time.accept2dyear `. The default is ``True `` which means that
10121012 for a two-digit year, the century is guessed according to the POSIX rules
10131013 governing the ``%y `` strptime format.
10141014
10151015 Starting with Py3.2, use of the century guessing heuristic will emit a
10161016 :exc: `DeprecationWarning `. Instead, it is recommended that
1017- :data: `time.accept2dyear ` be set to ``False `` so that large date ranges
1017+ :data: `! time.accept2dyear ` be set to ``False `` so that large date ranges
10181018 can be used without guesswork::
10191019
10201020 >>> import time, warnings
@@ -1032,7 +1032,7 @@ datetime and time
10321032 'Fri Jan 1 12:34:56 11'
10331033
10341034 Several functions now have significantly expanded date ranges. When
1035- :data: `time.accept2dyear ` is false, the :func: `time.asctime ` function will
1035+ :data: `! time.accept2dyear ` is false, the :func: `time.asctime ` function will
10361036 accept any year that fits in a C int, while the :func: `time.mktime ` and
10371037 :func: `time.strftime ` functions will accept the full range supported by the
10381038 corresponding operating system functions.
@@ -1148,15 +1148,15 @@ for slice notation are well-suited to in-place editing::
11481148reprlib
11491149-------
11501150
1151- When writing a :meth: `__repr__ ` method for a custom container, it is easy to
1151+ When writing a :meth: `~object. __repr__ ` method for a custom container, it is easy to
11521152forget to handle the case where a member refers back to the container itself.
11531153Python's builtin objects such as :class: `list ` and :class: `set ` handle
11541154self-reference by displaying "..." in the recursive part of the representation
11551155string.
11561156
1157- To help write such :meth: `__repr__ ` methods, the :mod: `reprlib ` module has a new
1157+ To help write such :meth: `~object. __repr__ ` methods, the :mod: `reprlib ` module has a new
11581158decorator, :func: `~reprlib.recursive_repr `, for detecting recursive calls to
1159- :meth: `__repr__ ` and substituting a placeholder string instead::
1159+ :meth: `! __repr__ ` and substituting a placeholder string instead::
11601160
11611161 >>> class MyList(list):
11621162 ... @recursive_repr()
@@ -1308,7 +1308,7 @@ used for the imaginary part of a number:
13081308>>> sys.hash_info # doctest: +SKIP
13091309sys.hash_info(width=64, modulus=2305843009213693951, inf=314159, nan=0, imag=1000003)
13101310
1311- An early decision to limit the inter-operability of various numeric types has
1311+ An early decision to limit the interoperability of various numeric types has
13121312been relaxed. It is still unsupported (and ill-advised) to have implicit
13131313mixing in arithmetic expressions such as ``Decimal('1.1') + float('1.1') ``
13141314because the latter loses information in the process of constructing the binary
@@ -1336,7 +1336,7 @@ Decimal('1.100000000000000088817841970012523233890533447265625')
13361336Fraction(2476979795053773, 2251799813685248)
13371337
13381338Another useful change for the :mod: `decimal ` module is that the
1339- :attr: `Context.clamp ` attribute is now public. This is useful in creating
1339+ :attr: `Context.clamp <decimal.Context.clamp> ` attribute is now public. This is useful in creating
13401340contexts that correspond to the decimal interchange formats specified in IEEE
13411341754 (see :issue: `8540 `).
13421342
@@ -1428,7 +1428,7 @@ before compressing and decompressing:
14281428Aides and Brian Curtin in :issue: `9962 `, :issue: `1675951 `, :issue: `7471 ` and
14291429:issue: `2846 `.)
14301430
1431- Also, the :class: `zipfile.ZipExtFile ` class was reworked internally to represent
1431+ Also, the :class: `zipfile.ZipExtFile <zipfile.ZipFile.open> ` class was reworked internally to represent
14321432files stored inside an archive. The new implementation is significantly faster
14331433and can be wrapped in an :class: `io.BufferedReader ` object for more speedups. It
14341434also solves an issue where interleaved calls to *read * and *readline * gave the
@@ -1596,7 +1596,7 @@ sqlite3
15961596
15971597The :mod: `sqlite3 ` module was updated to pysqlite version 2.6.0. It has two new capabilities.
15981598
1599- * The :attr: `sqlite3.Connection.in_transit ` attribute is true if there is an
1599+ * The :attr: `! sqlite3.Connection.in_transit ` attribute is true if there is an
16001600 active transaction for uncommitted changes.
16011601
16021602* The :meth: `sqlite3.Connection.enable_load_extension ` and
@@ -1643,11 +1643,11 @@ for secure (encrypted, authenticated) internet connections:
16431643 other options. It includes a :meth: `~ssl.SSLContext.wrap_socket ` for creating
16441644 an SSL socket from an SSL context.
16451645
1646- * A new function, :func: `ssl.match_hostname `, supports server identity
1646+ * A new function, :func: `! ssl.match_hostname `, supports server identity
16471647 verification for higher-level protocols by implementing the rules of HTTPS
16481648 (from :rfc: `2818 `) which are also suitable for other protocols.
16491649
1650- * The :func: `ssl.wrap_socket ` constructor function now takes a *ciphers *
1650+ * The :func: `ssl.wrap_socket() <ssl.SSLContext.wrap_socket> ` constructor function now takes a *ciphers *
16511651 argument. The *ciphers * string lists the allowed encryption algorithms using
16521652 the format described in the `OpenSSL documentation
16531653 <https://www.openssl.org/docs/man1.0.2/man1/ciphers.html#CIPHER-LIST-FORMAT> `__.
@@ -1759,7 +1759,7 @@ names.
17591759 (Contributed by Michael Foord.)
17601760
17611761* Experimentation at the interactive prompt is now easier because the
1762- :class: `unittest.case. TestCase ` class can now be instantiated without
1762+ :class: `unittest.TestCase ` class can now be instantiated without
17631763 arguments:
17641764
17651765 >>> from unittest import TestCase
@@ -1797,7 +1797,7 @@ names.
17971797* In addition, the method names in the module have undergone a number of clean-ups.
17981798
17991799 For example, :meth: `~unittest.TestCase.assertRegex ` is the new name for
1800- :meth: `~unittest.TestCase. assertRegexpMatches ` which was misnamed because the
1800+ :meth: `! assertRegexpMatches ` which was misnamed because the
18011801 test uses :func: `re.search `, not :func: `re.match `. Other methods using
18021802 regular expressions are now named using short form "Regex" in preference to
18031803 "Regexp" -- this matches the names used in other unittest implementations,
@@ -1812,19 +1812,19 @@ names.
18121812 =============================== ==============================
18131813 Old Name Preferred Name
18141814 =============================== ==============================
1815- :meth: `assert_ ` :meth: `.assertTrue `
1816- :meth: `assertEquals ` :meth: `.assertEqual `
1817- :meth: `assertNotEquals ` :meth: `.assertNotEqual `
1818- :meth: `assertAlmostEquals ` :meth: `.assertAlmostEqual `
1819- :meth: `assertNotAlmostEquals ` :meth: `.assertNotAlmostEqual `
1815+ :meth: `! assert_ ` :meth: `.assertTrue `
1816+ :meth: `! assertEquals ` :meth: `.assertEqual `
1817+ :meth: `! assertNotEquals ` :meth: `.assertNotEqual `
1818+ :meth: `! assertAlmostEquals ` :meth: `.assertAlmostEqual `
1819+ :meth: `! assertNotAlmostEquals ` :meth: `.assertNotAlmostEqual `
18201820 =============================== ==============================
18211821
18221822 Likewise, the ``TestCase.fail* `` methods deprecated in Python 3.1 are expected
18231823 to be removed in Python 3.3.
18241824
18251825 (Contributed by Ezio Melotti; :issue: `9424 `.)
18261826
1827- * The :meth: `~unittest.TestCase. assertDictContainsSubset ` method was deprecated
1827+ * The :meth: `! assertDictContainsSubset ` method was deprecated
18281828 because it was misimplemented with the arguments in the wrong order. This
18291829 created hard-to-debug optical illusions where tests like
18301830 ``TestCase().assertDictContainsSubset({'a':1, 'b':2}, {'a':1}) `` would fail.
@@ -1997,7 +1997,7 @@ under-the-hood.
19971997dbm
19981998---
19991999
2000- All database modules now support the :meth: `get ` and :meth: `setdefault ` methods.
2000+ All database modules now support the :meth: `! get ` and :meth: `! setdefault ` methods.
20012001
20022002(Suggested by Ray Allen in :issue: `9523 `.)
20032003
@@ -2118,7 +2118,7 @@ The :mod:`pdb` debugger module gained a number of usability improvements:
21182118 :file: `.pdbrc ` script file.
21192119* A :file: `.pdbrc ` script file can contain ``continue `` and ``next `` commands
21202120 that continue debugging.
2121- * The :class: `Pdb ` class constructor now accepts a *nosigint * argument.
2121+ * The :class: `~pdb. Pdb ` class constructor now accepts a *nosigint * argument.
21222122* New commands: ``l(list) ``, ``ll(long list) `` and ``source `` for
21232123 listing source code.
21242124* New commands: ``display `` and ``undisplay `` for showing or hiding
@@ -2394,11 +2394,11 @@ A number of small performance enhancements have been added:
23942394
23952395 (Contributed by Antoine Pitrou; :issue: `3001 `.)
23962396
2397- * The fast-search algorithm in stringlib is now used by the :meth: `split `,
2398- :meth: `rsplit `, :meth: `splitlines ` and :meth: `replace ` methods on
2397+ * The fast-search algorithm in stringlib is now used by the :meth: `~str. split `,
2398+ :meth: `~str. rsplit `, :meth: `~str. splitlines ` and :meth: `~str. replace ` methods on
23992399 :class: `bytes `, :class: `bytearray ` and :class: `str ` objects. Likewise, the
2400- algorithm is also used by :meth: `rfind `, :meth: `rindex `, :meth: `rsplit ` and
2401- :meth: `rpartition `.
2400+ algorithm is also used by :meth: `~str. rfind `, :meth: `~str. rindex `, :meth: `~str. rsplit ` and
2401+ :meth: `~str. rpartition `.
24022402
24032403 (Patch by Florent Xicluna in :issue: `7622 ` and :issue: `7462 `.)
24042404
@@ -2410,8 +2410,8 @@ A number of small performance enhancements have been added:
24102410
24112411There were several other minor optimizations. Set differencing now runs faster
24122412when one operand is much larger than the other (patch by Andress Bennetts in
2413- :issue: `8685 `). The :meth: `array.repeat ` method has a faster implementation
2414- (:issue: `1569291 ` by Alexander Belopolsky). The :class: `BaseHTTPRequestHandler `
2413+ :issue: `8685 `). The :meth: `! array.repeat ` method has a faster implementation
2414+ (:issue: `1569291 ` by Alexander Belopolsky). The :class: `~http.server. BaseHTTPRequestHandler `
24152415has more efficient buffering (:issue: `3709 ` by Andrew Schaaf). The
24162416:func: `operator.attrgetter ` function has been sped-up (:issue: `10160 ` by
24172417Christos Georgiou). And :class: `~configparser.ConfigParser ` loads multi-line arguments a bit
@@ -2562,11 +2562,11 @@ Changes to Python's build process and to the C API include:
25622562 (Suggested by Raymond Hettinger and implemented by Benjamin Peterson;
25632563 :issue: `9778 `.)
25642564
2565- * A new macro :c:macro: `Py_VA_COPY ` copies the state of the variable argument
2565+ * A new macro :c:macro: `! Py_VA_COPY ` copies the state of the variable argument
25662566 list. It is equivalent to C99 *va_copy * but available on all Python platforms
25672567 (:issue: `2443 `).
25682568
2569- * A new C API function :c:func: `PySys_SetArgvEx ` allows an embedded interpreter
2569+ * A new C API function :c:func: `! PySys_SetArgvEx ` allows an embedded interpreter
25702570 to set :data: `sys.argv ` without also modifying :data: `sys.path `
25712571 (:issue: `5753 `).
25722572
@@ -2650,8 +2650,9 @@ require changes to your code:
26502650* :class: `bytearray ` objects can no longer be used as filenames; instead,
26512651 they should be converted to :class: `bytes `.
26522652
2653- * The :meth: `array.tostring ` and :meth: `array.fromstring ` have been renamed to
2654- :meth: `array.tobytes ` and :meth: `array.frombytes ` for clarity. The old names
2653+ * The :meth: `!array.tostring ` and :meth: `!array.fromstring ` have been renamed to
2654+ :meth: `array.tobytes() <array.array.tobytes> ` and
2655+ :meth: `array.frombytes() <array.array.frombytes> ` for clarity. The old names
26552656 have been deprecated. (See :issue: `8990 `.)
26562657
26572658* ``PyArg_Parse*() `` functions:
@@ -2664,15 +2665,15 @@ require changes to your code:
26642665 instead; the new type has a well-defined interface for passing typing safety
26652666 information and a less complicated signature for calling a destructor.
26662667
2667- * The :func: `sys.setfilesystemencoding ` function was removed because
2668+ * The :func: `! sys.setfilesystemencoding ` function was removed because
26682669 it had a flawed design.
26692670
26702671* The :func: `random.seed ` function and method now salt string seeds with an
26712672 sha512 hash function. To access the previous version of *seed * in order to
26722673 reproduce Python 3.1 sequences, set the *version * argument to *1 *,
26732674 ``random.seed(s, version=1) ``.
26742675
2675- * The previously deprecated :func: `string.maketrans ` function has been removed
2676+ * The previously deprecated :func: `! string.maketrans ` function has been removed
26762677 in favor of the static methods :meth: `bytes.maketrans ` and
26772678 :meth: `bytearray.maketrans `. This change solves the confusion around which
26782679 types were supported by the :mod: `string ` module. Now, :class: `str `,
0 commit comments