@@ -352,7 +352,7 @@ was expecting an indentation, including the location of the statement:
352352AttributeErrors
353353~~~~~~~~~~~~~~~
354354
355- When printing :exc:`AttributeError ` , :c:func:`PyErr_Display` will offer
355+ When printing :exc:`AttributeError ` , :c:func:`! PyErr_Display` will offer
356356suggestions of similar attribute names in the object that the exception was
357357raised from :
358358
@@ -366,14 +366,14 @@ raised from:
366366(Contributed by Pablo Galindo in :issue:`38530 ` .)
367367
368368.. warning::
369- Notice this won' t work if :c:func:`PyErr_Display` is not called to display the error
369+ Notice this won' t work if :c:func:`! PyErr_Display` is not called to display the error
370370 which can happen if some other custom error display function is used. This is a common
371371 scenario in some REPLs like IPython.
372372
373373NameErrors
374374~~~~~~~~~~
375375
376- When printing :exc:`NameError ` raised by the interpreter, :c:func:`PyErr_Display`
376+ When printing :exc:`NameError ` raised by the interpreter, :c:func:`! PyErr_Display`
377377will offer suggestions of similar variable names in the function that the exception
378378was raised from :
379379
@@ -388,7 +388,7 @@ was raised from:
388388(Contributed by Pablo Galindo in :issue:`38530 ` .)
389389
390390.. warning::
391- Notice this won' t work if :c:func:`PyErr_Display` is not called to display the error,
391+ Notice this won' t work if :c:func:`! PyErr_Display` is not called to display the error,
392392 which can happen if some other custom error display function is used. This is a common
393393 scenario in some REPLs like IPython.
394394
@@ -690,7 +690,7 @@ are in :pep:`635`, and a longer tutorial is in :pep:`636`.
690690Optional `` EncodingWarning`` and `` encoding=" locale" `` option
691691------------------------------------------------------------ -
692692
693- The default encoding of :class :`TextIOWrapper` and :func:`open ` is
693+ The default encoding of :class :`~ io. TextIOWrapper` and :func:`open ` is
694694platform and locale dependent. Since UTF - 8 is used on most Unix
695695platforms, omitting `` encoding`` option when opening UTF - 8 files
696696(e.g. JSON , YAML , TOML , Markdown) is a very common bug. For example::
@@ -785,7 +785,7 @@ especially when forward references or invalid types were involved. Compare::
785785 StrCache = ' Cache[str]' # a type alias
786786 LOG_PREFIX = ' LOG[DEBUG]' # a module constant
787787
788- Now the :mod:`typing` module has a special value :data:`TypeAlias`
788+ Now the :mod:`typing` module has a special value :data:`~ typing. TypeAlias`
789789which lets you declare type aliases more explicitly::
790790
791791 StrCache: TypeAlias = ' Cache[str]' # a type alias
@@ -798,10 +798,10 @@ See :pep:`613` for more details.
798798PEP 647 : User- Defined Type Guards
799799-------------------------------- -
800800
801- :data:`TypeGuard` has been added to the :mod:`typing` module to annotate
801+ :data:`~ typing. TypeGuard` has been added to the :mod:`typing` module to annotate
802802type guard functions and improve information provided to static type checkers
803- during type narrowing. For more information, please see :data: `TypeGuard` \ 's
804- documentation, and :pep:`647 ` .
803+ during type narrowing. For more information, please see
804+ :data: ` ~ typing.TypeGuard` \ 's documentation, and :pep:`647`.
805805
806806(Contributed by Ken Jin and Guido van Rossum in :issue:`43766 ` .
807807PEP written by Eric Traut.)
@@ -972,8 +972,8 @@ and objects representing asynchronously released resources.
972972Add asynchronous context manager support to :func:`contextlib.nullcontext` .
973973(Contributed by Tom Gringauz in :issue:`41543 ` .)
974974
975- Add :class :`AsyncContextDecorator` , for supporting usage of async context managers
976- as decorators.
975+ Add :class :`~ contextlib. AsyncContextDecorator` , for supporting usage of async
976+ context managers as decorators.
977977
978978curses
979979------
@@ -1089,8 +1089,8 @@ encodings
10891089enum
10901090----
10911091
1092- :class :`Enum` :func:`__repr__ ` now returns `` enum_name.member_name`` and
1093- :func:`__str__ ` now returns `` member_name`` . Stdlib enums available as
1092+ :class :`~ enum. Enum` :func:`~ object . __repr__ ` now returns `` enum_name.member_name`` and
1093+ :func:`~ object . __str__ ` now returns `` member_name`` . Stdlib enums available as
10941094module constants have a :func:`repr ` of `` module_name.member_name`` .
10951095(Contributed by Ethan Furman in :issue:`40066 ` .)
10961096
@@ -1104,7 +1104,7 @@ Add *encoding* and *errors* parameters in :func:`fileinput.input` and
11041104:class :`fileinput.FileInput` .
11051105(Contributed by Inada Naoki in :issue:`43712 ` .)
11061106
1107- :func:`fileinput.hook_compressed` now returns :class :`TextIOWrapper` object
1107+ :func:`fileinput.hook_compressed` now returns :class :`~ io. TextIOWrapper` object
11081108when * mode* is " r" and file is compressed, like uncompressed files.
11091109(Contributed by Inada Naoki in :issue:`5758 ` .)
11101110
@@ -1202,12 +1202,12 @@ Feature parity with ``importlib_metadata`` 4.6
12021202:ref:`importlib.metadata entry points < entry- points> `
12031203now provide a nicer experience
12041204for selecting entry points by group and name through a new
1205- :class :`importlib.metadata.EntryPoints` class . See the Compatibility
1205+ :ref :`importlib.metadata.EntryPoints < entry - points > ` class . See the Compatibility
12061206Note in the docs for more info on the deprecation and usage.
12071207
1208- Added :func :`importlib.metadata.packages_distributions` for resolving
1209- top- level Python modules and packages to their
1210- :class :`importlib.metadata.Distribution` .
1208+ Added :ref :`importlib.metadata.packages_distributions() < package - distributions > `
1209+ for resolving top- level Python modules and packages to their
1210+ :ref :`importlib.metadata.Distribution < distributions > ` .
12111211
12121212inspect
12131213------ -
@@ -1224,7 +1224,7 @@ best practice for accessing the annotations dict defined on any Python object;
12241224for more information on best practices for working with annotations, please see
12251225:ref:`annotations- howto` .
12261226Relatedly, :func:`inspect.signature` ,
1227- :func:`inspect.Signature.from_callable` , and :func:`inspect.Signature.from_function`
1227+ :func:`inspect.Signature.from_callable` , and :func:`! inspect.Signature.from_function`
12281228now call :func:`inspect.get_annotations` to retrieve annotations. This means
12291229:func:`inspect.signature` and :func:`inspect.Signature.from_callable` can
12301230also now un- stringize stringized annotations.
@@ -1484,9 +1484,9 @@ is a :class:`typing.TypedDict`.
14841484
14851485Subclasses of `` typing.Protocol`` which only have data variables declared
14861486will now raise a `` TypeError `` when checked with `` isinstance `` unless they
1487- are decorated with :func:`runtime_checkable` . Previously, these checks
1487+ are decorated with :func:`~ typing. runtime_checkable` . Previously, these checks
14881488passed silently. Users should decorate their
1489- subclasses with the :func:`runtime_checkable` decorator
1489+ subclasses with the :func:`! runtime_checkable` decorator
14901490if they want runtime protocols.
14911491(Contributed by Yurii Karabas in :issue:`38908 ` .)
14921492
@@ -1595,8 +1595,8 @@ Optimizations
15951595 :func:`map ` , :func:`filter ` , :func:`reversed ` , :func:`bool ` and :func:`float ` .
15961596 (Contributed by Donghee Na and Jeroen Demeyer in :issue:`43575 ` , :issue:`43287 ` , :issue:`41922 ` , :issue:`41873 ` and :issue:`41870 ` .)
15971597
1598- * :class :`BZ2File` performance is improved by removing internal `` RLock`` .
1599- This makes :class :`BZ2File` thread unsafe in the face of multiple simultaneous
1598+ * :class :`~ bz2. BZ2File` performance is improved by removing internal `` RLock`` .
1599+ This makes :class :`! BZ2File` thread unsafe in the face of multiple simultaneous
16001600 readers or writers, just like its equivalent classes in :mod:`gzip` and
16011601 :mod:`lzma` have always been. (Contributed by Inada Naoki in :issue:`43785 ` .)
16021602
@@ -1620,7 +1620,7 @@ Deprecated
16201620 cleaning up old import semantics that were kept for Python 2.7
16211621 compatibility. Specifically,
16221622 :meth:`! find_loader` / :meth:`! find_module`
1623- (superseded by :meth:`~ importlib.abc.Finder .find_spec` ),
1623+ (superseded by :meth:`~ importlib.abc.MetaPathFinder .find_spec` ),
16241624 :meth:`~ importlib.abc.Loader.load_module`
16251625 (superseded by :meth:`~ importlib.abc.Loader.exec_module` ),
16261626 :meth:`! module_repr` (which the import system
@@ -1647,7 +1647,7 @@ Deprecated
16471647 :meth:`~ importlib.abc.Loader.exec_module` instead.
16481648 (Contributed by Brett Cannon in :issue:`26131 ` .)
16491649
1650- * :meth:`zimport.zipimporter.load_module` has been deprecated in
1650+ * :meth:`! zimport.zipimporter.load_module` has been deprecated in
16511651 preference for :meth:`~ zipimport.zipimporter.exec_module` .
16521652 (Contributed by Brett Cannon in :issue:`26131 ` .)
16531653
@@ -1759,23 +1759,23 @@ Deprecated
17591759* The following :mod:`ssl` features have been deprecated since Python 3.6 ,
17601760 Python 3.7 , or OpenSSL 1.1 .0 and will be removed in 3.11 :
17611761
1762- * :data:`~ ssl. OP_NO_SSLv2 ` , :data:`~ ssl. OP_NO_SSLv3 ` , :data:`~ ssl. OP_NO_TLSv1 ` ,
1763- :data:`~ ssl. OP_NO_TLSv1_1 ` , :data:`~ ssl. OP_NO_TLSv1_2 ` , and
1764- :data:`~ ssl. OP_NO_TLSv1_3 ` are replaced by
1765- :attr:`sslSSLContext .minimum_version` and
1766- :attr:`sslSSLContext .maximum_version` .
1762+ * :data:`! OP_NO_SSLv2 ` , :data:`! OP_NO_SSLv3 ` , :data:`! OP_NO_TLSv1 ` ,
1763+ :data:`! OP_NO_TLSv1_1 ` , :data:`! OP_NO_TLSv1_2 ` , and
1764+ :data:`! OP_NO_TLSv1_3 ` are replaced by
1765+ :attr:`~ ssl.SSLContext .minimum_version` and
1766+ :attr:`~ ssl.SSLContext .maximum_version` .
17671767
1768- * :data:`~ ssl. PROTOCOL_SSLv2 ` , :data:`~ ssl. PROTOCOL_SSLv3 ` ,
1769- :data:`~ ssl. PROTOCOL_SSLv23 ` , :data:`~ ssl. PROTOCOL_TLSv1 ` ,
1770- :data:`~ ssl. PROTOCOL_TLSv1_1 ` , :data:`~ ssl. PROTOCOL_TLSv1_2 ` , and
1771- :const:`~ ssl. PROTOCOL_TLS ` are deprecated in favor of
1768+ * :data:`! PROTOCOL_SSLv2 ` , :data:`! PROTOCOL_SSLv3 ` ,
1769+ :data:`! PROTOCOL_SSLv23 ` , :data:`! PROTOCOL_TLSv1 ` ,
1770+ :data:`! PROTOCOL_TLSv1_1 ` , :data:`! PROTOCOL_TLSv1_2 ` , and
1771+ :const:`! PROTOCOL_TLS ` are deprecated in favor of
17721772 :const:`~ ssl.PROTOCOL_TLS_CLIENT ` and :const:`~ ssl.PROTOCOL_TLS_SERVER `
17731773
1774- * :func:`~ ssl. wrap_socket` is replaced by :meth:`ssl.SSLContext.wrap_socket`
1774+ * :func:`! wrap_socket` is replaced by :meth:`ssl.SSLContext.wrap_socket`
17751775
1776- * :func:`~ ssl. match_hostname`
1776+ * :func:`! match_hostname`
17771777
1778- * :func:`~ ssl. RAND_pseudo_bytes ` , :func:`~ ssl. RAND_egd `
1778+ * :func:`! RAND_pseudo_bytes ` , :func:`! RAND_egd `
17791779
17801780 * NPN features like :meth:`ssl.SSLSocket.selected_npn_protocol` and
17811781 :meth:`ssl.SSLContext.set_npn_protocols` are replaced by ALPN .
0 commit comments