@@ -331,7 +331,7 @@ simplified and finer-grained.
331
331
332
332
You don't have to worry anymore about choosing the appropriate exception
333
333
type between :exc: `OSError `, :exc: `IOError `, :exc: `EnvironmentError `,
334
- :exc: `WindowsError `, :exc: `mmap.error `, :exc: `socket.error ` or
334
+ :exc: `WindowsError `, :exc: `! mmap.error `, :exc: `socket.error ` or
335
335
:exc: `select.error `. All these exception types are now only one:
336
336
:exc: `OSError `. The other names are kept as aliases for compatibility
337
337
reasons.
@@ -805,7 +805,7 @@ Some smaller changes made to the core Python language are:
805
805
* New methods have been added to :class: `list ` and :class: `bytearray `:
806
806
``copy() `` and ``clear() `` (:issue: `10516 `). Consequently,
807
807
:class: `~collections.abc.MutableSequence ` now also defines a
808
- :meth: `~collections.abc.MutableSequence. clear ` method (:issue: `11388 `).
808
+ :meth: `! clear ` method (:issue: `11388 `).
809
809
810
810
* Raw bytes literals can now be written ``rb"..." `` as well as ``br"..." ``.
811
811
@@ -869,10 +869,10 @@ faulthandler
869
869
This new debug module :mod: `faulthandler ` contains functions to dump Python tracebacks explicitly,
870
870
on a fault (a crash like a segmentation fault), after a timeout, or on a user
871
871
signal. Call :func: `faulthandler.enable ` to install fault handlers for the
872
- :const: `SIGSEGV `, :const: `SIGFPE `, :const: `SIGABRT `, :const: ` SIGBUS `, and
873
- :const: `SIGILL ` signals. You can also enable them at startup by setting the
874
- :envvar: ` PYTHONFAULTHANDLER ` environment variable or by using :option: ` -X `
875
- ``faulthandler `` command line option.
872
+ :const: `~signal. SIGSEGV `, :const: `~signal. SIGFPE `, :const: `~signal. SIGABRT `,
873
+ :const: `~signal.SIGBUS `, and :const: ` ~signal. SIGILL ` signals.
874
+ You can also enable them at startup by setting the :envvar: ` PYTHONFAULTHANDLER `
875
+ environment variable or by using :option: ` -X ` ``faulthandler `` command line option.
876
876
877
877
Example of a segmentation fault on Linux:
878
878
916
916
917
917
Improved support for abstract base classes containing descriptors composed with
918
918
abstract methods. The recommended approach to declaring abstract descriptors is
919
- now to provide :attr: `__isabstractmethod__ ` as a dynamically updated
919
+ now to provide :attr: `! __isabstractmethod__ ` as a dynamically updated
920
920
property. The built-in descriptors have been updated accordingly.
921
921
922
922
* :class: `abc.abstractproperty ` has been deprecated, use :class: `property `
@@ -979,7 +979,7 @@ new features have been added:
979
979
(Contributed by Nir Aides in :issue: `1625 `.)
980
980
981
981
* :class: `bz2.BZ2File ` now implements all of the :class: `io.BufferedIOBase ` API,
982
- except for the :meth: `detach ` and :meth: `truncate ` methods.
982
+ except for the :meth: `! detach ` and :meth: `! truncate ` methods.
983
983
984
984
985
985
codecs
@@ -1064,7 +1064,7 @@ curses
1064
1064
1065
1065
* If the :mod: `curses ` module is linked to the ncursesw library, use Unicode
1066
1066
functions when Unicode strings or characters are passed (e.g.
1067
- :c:func: `waddwstr `), and bytes functions otherwise (e.g. :c:func: `waddstr `).
1067
+ :c:func: `! waddwstr `), and bytes functions otherwise (e.g. :c:func: `! waddstr `).
1068
1068
* Use the locale encoding instead of ``utf-8 `` to encode Unicode strings.
1069
1069
* :class: `curses.window ` has a new :attr: `curses.window.encoding ` attribute.
1070
1070
* The :class: `curses.window ` class has a new :meth: `~curses.window.get_wch `
@@ -1137,15 +1137,15 @@ API changes
1137
1137
* The C module has the following context limits, depending on the machine
1138
1138
architecture:
1139
1139
1140
- +-------------------+----------------+-------------------------+
1141
- | | 32-bit | 64-bit |
1142
- +===================+================+=========================+
1143
- | :const: `MAX_PREC ` | ``425000000 `` | ``999999999999999999 `` |
1144
- +-------------------+----------------+-------------------------+
1145
- | :const: `MAX_EMAX ` | ``425000000 `` | ``999999999999999999 `` |
1146
- +-------------------+----------------+-------------------------+
1147
- | :const: `MIN_EMIN ` | ``-425000000 `` | ``-999999999999999999 `` |
1148
- +-------------------+----------------+-------------------------+
1140
+ +---------------------------- +----------------+-------------------------+
1141
+ | | 32-bit | 64-bit |
1142
+ +============================ +================+=========================+
1143
+ | :const: `~decimal. MAX_PREC ` | ``425000000 `` | ``999999999999999999 `` |
1144
+ +---------------------------- +----------------+-------------------------+
1145
+ | :const: `~decimal. MAX_EMAX ` | ``425000000 `` | ``999999999999999999 `` |
1146
+ +---------------------------- +----------------+-------------------------+
1147
+ | :const: `~decimal. MIN_EMIN ` | ``-425000000 `` | ``-999999999999999999 `` |
1148
+ +---------------------------- +----------------+-------------------------+
1149
1149
1150
1150
* In the context templates (:const: `~decimal.DefaultContext `,
1151
1151
:const: `~decimal.BasicContext ` and :const: `~decimal.ExtendedContext `)
@@ -1434,7 +1434,7 @@ html
1434
1434
1435
1435
:class: `html.parser.HTMLParser ` is now able to parse broken markup without
1436
1436
raising errors, therefore the *strict * argument of the constructor and the
1437
- :exc: `~html.parser. HTMLParseError ` exception are now deprecated.
1437
+ :exc: `! HTMLParseError ` exception are now deprecated.
1438
1438
The ability to parse broken markup is the result of a number of bug fixes that
1439
1439
are also available on the latest bug fix releases of Python 2.7/3.2.
1440
1440
(Contributed by Ezio Melotti in :issue: `15114 `, and :issue: `14538 `,
@@ -1486,7 +1486,7 @@ already exists. It is based on the C11 'x' mode to fopen().
1486
1486
1487
1487
The constructor of the :class: `~io.TextIOWrapper ` class has a new
1488
1488
*write_through * optional argument. If *write_through * is ``True ``, calls to
1489
- :meth: `~io.TextIOWrapper. write ` are guaranteed not to be buffered: any data
1489
+ :meth: `! write ` are guaranteed not to be buffered: any data
1490
1490
written on the :class: `~io.TextIOWrapper ` object is immediately handled to its
1491
1491
underlying binary buffer.
1492
1492
@@ -1504,7 +1504,7 @@ logging
1504
1504
The :func: `~logging.basicConfig ` function now supports an optional ``handlers ``
1505
1505
argument taking an iterable of handlers to be added to the root logger.
1506
1506
1507
- A class level attribute :attr: `~logging.handlers.SysLogHandler. append_nul ` has
1507
+ A class level attribute :attr: `! append_nul ` has
1508
1508
been added to :class: `~logging.handlers.SysLogHandler ` to allow control of the
1509
1509
appending of the ``NUL `` (``\000 ``) byte to syslog records, since for some
1510
1510
daemons it is required while for others it is passed through to the log.
@@ -1536,8 +1536,8 @@ The new :func:`multiprocessing.connection.wait` function allows polling
1536
1536
multiple objects (such as connections, sockets and pipes) with a timeout.
1537
1537
(Contributed by Richard Oudkerk in :issue: `12328 `.)
1538
1538
1539
- :class: `multiprocessing.Connection ` objects can now be transferred over
1540
- multiprocessing connections.
1539
+ :class: `multiprocessing.connection. Connection ` objects can now be transferred
1540
+ over multiprocessing connections.
1541
1541
(Contributed by Richard Oudkerk in :issue: `4892 `.)
1542
1542
1543
1543
:class: `multiprocessing.Process ` now accepts a ``daemon `` keyword argument
1611
1611
:func: `~os.rename `, :func: `~os.replace `, :func: `~os.rmdir `, :func: `~os.stat `,
1612
1612
:func: `~os.symlink `, :func: `~os.unlink `, :func: `~os.utime `. Platform
1613
1613
support for using these parameters can be checked via the sets
1614
- :data: `os.supports_dir_fd ` and :data: `os.supports_follows_symlinks `.
1614
+ :data: `os.supports_dir_fd ` and :data: `os.supports_follow_symlinks `.
1615
1615
1616
1616
- The following functions now support a file descriptor for their path argument:
1617
1617
:func: `~os.chdir `, :func: `~os.chmod `, :func: `~os.chown `,
1698
1698
:const: `~os.RTLD_NOLOAD `, and :const: `~os.RTLD_DEEPBIND ` are available on
1699
1699
platforms that support them. These are for use with the
1700
1700
:func: `sys.setdlopenflags ` function, and supersede the similar constants
1701
- defined in :mod: `ctypes ` and :mod: `DLFCN `. (Contributed by Victor Stinner
1701
+ defined in :mod: `ctypes ` and :mod: `! DLFCN `. (Contributed by Victor Stinner
1702
1702
in :issue: `13226 `.)
1703
1703
1704
1704
* :func: `os.symlink ` now accepts (and ignores) the ``target_is_directory ``
@@ -1728,8 +1728,8 @@ reduction functions to be set.
1728
1728
pydoc
1729
1729
-----
1730
1730
1731
- The Tk GUI and the :func: `~pydoc. serve ` function have been removed from the
1732
- :mod: `pydoc ` module: ``pydoc -g `` and :func: `~pydoc. serve ` have been deprecated
1731
+ The Tk GUI and the :func: `! serve ` function have been removed from the
1732
+ :mod: `pydoc ` module: ``pydoc -g `` and :func: `! serve ` have been deprecated
1733
1733
in Python 3.2.
1734
1734
1735
1735
@@ -1931,7 +1931,7 @@ ssl
1931
1931
1932
1932
* :func: `~ssl.RAND_bytes `: generate cryptographically strong
1933
1933
pseudo-random bytes.
1934
- * :func: `~ssl. RAND_pseudo_bytes `: generate pseudo-random bytes.
1934
+ * :func: `! RAND_pseudo_bytes `: generate pseudo-random bytes.
1935
1935
1936
1936
(Contributed by Victor Stinner in :issue: `12049 `.)
1937
1937
@@ -2020,8 +2020,7 @@ tarfile
2020
2020
tempfile
2021
2021
--------
2022
2022
2023
- :class: `tempfile.SpooledTemporaryFile `\' s
2024
- :meth: `~tempfile.SpooledTemporaryFile.truncate ` method now accepts
2023
+ :class: `tempfile.SpooledTemporaryFile `\' s :meth: `!truncate ` method now accepts
2025
2024
a ``size `` parameter. (Contributed by Ryan Kelly in :issue: `9957 `.)
2026
2025
2027
2026
@@ -2129,7 +2128,7 @@ xml.etree.ElementTree
2129
2128
2130
2129
The :mod: `xml.etree.ElementTree ` module now imports its C accelerator by
2131
2130
default; there is no longer a need to explicitly import
2132
- :mod: `xml.etree.cElementTree ` (this module stays for backwards compatibility,
2131
+ :mod: `! xml.etree.cElementTree ` (this module stays for backwards compatibility,
2133
2132
but is now deprecated). In addition, the ``iter `` family of methods of
2134
2133
:class: `~xml.etree.ElementTree.Element ` has been optimized (rewritten in C).
2135
2134
The module's documentation has also been greatly improved with added examples
@@ -2197,7 +2196,7 @@ Changes to Python's build process and to the C API include:
2197
2196
* :c:func: `PyUnicode_AsUCS4 `, :c:func: `PyUnicode_AsUCS4Copy `
2198
2197
* :c:macro: `PyUnicode_DATA `, :c:macro: `PyUnicode_1BYTE_DATA `,
2199
2198
:c:macro: `PyUnicode_2BYTE_DATA `, :c:macro: `PyUnicode_4BYTE_DATA `
2200
- * :c:macro: `PyUnicode_KIND ` with :c:enum: `PyUnicode_Kind ` enum:
2199
+ * :c:macro: `PyUnicode_KIND ` with :c:enum: `! PyUnicode_Kind ` enum:
2201
2200
:c:data: `!PyUnicode_WCHAR_KIND `, :c:data: `PyUnicode_1BYTE_KIND `,
2202
2201
:c:data: `PyUnicode_2BYTE_KIND `, :c:data: `PyUnicode_4BYTE_KIND `
2203
2202
* :c:macro: `PyUnicode_READ `, :c:macro: `PyUnicode_READ_CHAR `, :c:macro: `PyUnicode_WRITE `
@@ -2232,17 +2231,17 @@ Deprecated Python modules, functions and methods
2232
2231
(``utf-32-le `` or ``utf-32-be ``)
2233
2232
* :meth: `ftplib.FTP.nlst ` and :meth: `ftplib.FTP.dir `: use
2234
2233
:meth: `ftplib.FTP.mlsd `
2235
- * :func: `platform.popen `: use the :mod: `subprocess ` module. Check especially
2234
+ * :func: `! platform.popen `: use the :mod: `subprocess ` module. Check especially
2236
2235
the :ref: `subprocess-replacements ` section (:issue: `11377 `).
2237
2236
* :issue: `13374 `: The Windows bytes API has been deprecated in the :mod: `os `
2238
2237
module. Use Unicode filenames, instead of bytes filenames, to not depend on
2239
2238
the ANSI code page anymore and to support any filename.
2240
- * :issue: `13988 `: The :mod: `xml.etree.cElementTree ` module is deprecated. The
2239
+ * :issue: `13988 `: The :mod: `! xml.etree.cElementTree ` module is deprecated. The
2241
2240
accelerator is used automatically whenever available.
2242
- * The behaviour of :func: `time.clock ` depends on the platform: use the new
2241
+ * The behaviour of :func: `! time.clock ` depends on the platform: use the new
2243
2242
:func: `time.perf_counter ` or :func: `time.process_time ` function instead,
2244
2243
depending on your requirements, to have a well defined behaviour.
2245
- * The :func: `os.stat_float_times ` function is deprecated.
2244
+ * The :func: `! os.stat_float_times ` function is deprecated.
2246
2245
* :mod: `abc ` module:
2247
2246
2248
2247
* :class: `abc.abstractproperty ` has been deprecated, use :class: `property `
@@ -2381,8 +2380,8 @@ Porting Python code
2381
2380
for top-level modules. E.g. ``__import__('sys', level=1) `` is now an error.
2382
2381
2383
2382
* Because :data: `sys.meta_path ` and :data: `sys.path_hooks ` now have finders on
2384
- them by default, you will most likely want to use :meth: `list.insert ` instead
2385
- of :meth: `list.append ` to add to those lists.
2383
+ them by default, you will most likely want to use :meth: `! list.insert ` instead
2384
+ of :meth: `! list.append ` to add to those lists.
2386
2385
2387
2386
* Because ``None `` is now inserted into :data: `sys.path_importer_cache `, if you
2388
2387
are clearing out entries in the dictionary of paths that do not have a
@@ -2466,7 +2465,7 @@ Porting C code
2466
2465
* In the course of changes to the buffer API the undocumented
2467
2466
:c:member: `!smalltable ` member of the
2468
2467
:c:type: `Py_buffer ` structure has been removed and the
2469
- layout of the :c:type: `PyMemoryViewObject ` has changed.
2468
+ layout of the :c:type: `! PyMemoryViewObject ` has changed.
2470
2469
2471
2470
All extensions relying on the relevant parts in ``memoryobject.h ``
2472
2471
or ``object.h `` must be rebuilt.
0 commit comments