]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-123492: Remove unnecessary `:func:` parentheses (#123493)
authorWei-Hsiang (Matt) Wang <mattwang44@gmail.com>
Fri, 30 Aug 2024 11:34:09 +0000 (19:34 +0800)
committerGitHub <noreply@github.com>
Fri, 30 Aug 2024 11:34:09 +0000 (14:34 +0300)
78 files changed:
Doc/c-api/exceptions.rst
Doc/c-api/import.rst
Doc/deprecations/pending-removal-in-3.13.rst
Doc/deprecations/pending-removal-in-3.15.rst
Doc/howto/descriptor.rst
Doc/howto/enum.rst
Doc/howto/instrumentation.rst
Doc/library/ast.rst
Doc/library/asyncio-runner.rst
Doc/library/compileall.rst
Doc/library/contextvars.rst
Doc/library/enum.rst
Doc/library/functions.rst
Doc/library/functools.rst
Doc/library/getpass.rst
Doc/library/inspect.rst
Doc/library/io.rst
Doc/library/ipaddress.rst
Doc/library/os.rst
Doc/library/pdb.rst
Doc/library/platform.rst
Doc/library/signal.rst
Doc/library/stdtypes.rst
Doc/library/subprocess.rst
Doc/library/sys.rst
Doc/library/sysconfig.rst
Doc/library/tarfile.rst
Doc/library/test.rst
Doc/library/time.rst
Doc/library/token.rst
Doc/library/unittest.rst
Doc/library/zipapp.rst
Doc/reference/datamodel.rst
Doc/tutorial/floatingpoint.rst
Doc/using/cmdline.rst
Doc/using/ios.rst
Doc/whatsnew/3.10.rst
Doc/whatsnew/3.12.rst
Doc/whatsnew/3.14.rst
Doc/whatsnew/3.2.rst
Doc/whatsnew/3.3.rst
Doc/whatsnew/3.4.rst
Doc/whatsnew/3.6.rst
Doc/whatsnew/3.7.rst
Doc/whatsnew/3.8.rst
Doc/whatsnew/3.9.rst
Misc/HISTORY
Misc/NEWS.d/3.10.0a1.rst
Misc/NEWS.d/3.10.0a3.rst
Misc/NEWS.d/3.10.0a4.rst
Misc/NEWS.d/3.10.0a7.rst
Misc/NEWS.d/3.10.0b1.rst
Misc/NEWS.d/3.11.0a1.rst
Misc/NEWS.d/3.11.0b1.rst
Misc/NEWS.d/3.12.0a1.rst
Misc/NEWS.d/3.12.0a2.rst
Misc/NEWS.d/3.12.0a4.rst
Misc/NEWS.d/3.12.0a5.rst
Misc/NEWS.d/3.12.0a7.rst
Misc/NEWS.d/3.13.0a1.rst
Misc/NEWS.d/3.13.0a2.rst
Misc/NEWS.d/3.13.0a3.rst
Misc/NEWS.d/3.13.0a4.rst
Misc/NEWS.d/3.13.0a5.rst
Misc/NEWS.d/3.13.0a6.rst
Misc/NEWS.d/3.13.0b1.rst
Misc/NEWS.d/3.6.5rc1.rst
Misc/NEWS.d/3.7.0a4.rst
Misc/NEWS.d/3.7.0b2.rst
Misc/NEWS.d/3.7.0b4.rst
Misc/NEWS.d/3.8.0a1.rst
Misc/NEWS.d/3.8.0b1.rst
Misc/NEWS.d/3.9.0a1.rst
Misc/NEWS.d/3.9.0a5.rst
Misc/NEWS.d/3.9.0a6.rst
Misc/NEWS.d/next/Core and Builtins/2024-07-24-17-11-51.gh-issue-122234.VxsP_F.rst
Misc/NEWS.d/next/Library/2024-06-08-09-45-31.gh-issue-120244.8o9Dzr.rst
Misc/NEWS.d/next/Library/2024-07-06-23-39-38.gh-issue-121450.vGqb3c.rst

index 499bfb47cc4be545ae699bc73f9d2111175efc2d..372fc1dde8fc0db1c052404ae03a030774034c84 100644 (file)
@@ -34,7 +34,7 @@ propagated, additional calls into the Python/C API may not behave as intended
 and may fail in mysterious ways.
 
 .. note::
-   The error indicator is **not** the result of :func:`sys.exc_info()`.
+   The error indicator is **not** the result of :func:`sys.exc_info`.
    The former corresponds to an exception that is not yet caught (and is
    therefore still propagating), while the latter returns an exception after
    it is caught (and has therefore stopped propagating).
index 1054b38cb92f7d015de907861ee80e02aeb575ae..8108a5015be972c575f17d805faae02d79c5570a 100644 (file)
@@ -190,7 +190,7 @@ Importing Modules
 
    .. versionadded:: 3.2
    .. versionchanged:: 3.3
-      Uses :func:`!imp.source_from_cache()` in calculating the source path if
+      Uses :func:`!imp.source_from_cache` in calculating the source path if
       only the bytecode path is provided.
    .. versionchanged:: 3.12
       No longer uses the removed :mod:`!imp` module.
index 03c785bb4b69acd7507991d358a4a32473e75881..89790497816e836ef561774a9007cc46b115b83e 100644 (file)
@@ -48,5 +48,5 @@ APIs:
   * ``read_binary()``
   * ``read_text()``
 
-  Use :func:`importlib.resources.files()` instead.  Refer to `importlib-resources: Migrating from Legacy
+  Use :func:`importlib.resources.files` instead.  Refer to `importlib-resources: Migrating from Legacy
   <https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy>`_ (:gh:`106531`)
index 85eb634a7c586010c4d5697f335a94f036d66451..5374e871a9d2dffbacb627da704aaccc9539523a 100644 (file)
@@ -9,8 +9,8 @@ Pending Removal in Python 3.15
 * :class:`locale`: :func:`locale.getdefaultlocale` was deprecated in Python 3.11
   and originally planned for removal in Python 3.13 (:gh:`90817`),
   but removal has been postponed to Python 3.15.
-  Use :func:`locale.setlocale()`, :func:`locale.getencoding()` and
-  :func:`locale.getlocale()` instead.
+  Use :func:`locale.setlocale`, :func:`locale.getencoding` and
+  :func:`locale.getlocale` instead.
   (Contributed by Hugo van Kemenade in :gh:`111187`.)
 
 * :mod:`pathlib`:
index 67e981f9c57abeccca08afc9a4535bd6b0b7e68b..7fb54d6662691f80b52b98b8a586038a92ebfab3 100644 (file)
@@ -513,7 +513,7 @@ were defined.
 
 Descriptors are a powerful, general purpose protocol.  They are the mechanism
 behind properties, methods, static methods, class methods, and
-:func:`super()`.  They are used throughout Python itself.  Descriptors
+:func:`super`.  They are used throughout Python itself.  Descriptors
 simplify the underlying C code and offer a flexible set of new tools for
 everyday Python programs.
 
index 18e13fcf9f59bd925e077ca74b0295330af6af00..f406873226196bda03d93b4291b0c688c8c9a1fe 100644 (file)
@@ -9,7 +9,7 @@ Enum HOWTO
 .. currentmodule:: enum
 
 An :class:`Enum` is a set of symbolic names bound to unique values.  They are
-similar to global variables, but they offer a more useful :func:`repr()`,
+similar to global variables, but they offer a more useful :func:`repr`,
 grouping, type-safety, and a few other features.
 
 They are most useful when you have a variable that can take one of a limited
@@ -167,7 +167,7 @@ And a function to display the chores for a given day::
     answer SO questions
 
 In cases where the actual values of the members do not matter, you can save
-yourself some work and use :func:`auto()` for the values::
+yourself some work and use :func:`auto` for the values::
 
     >>> from enum import auto
     >>> class Weekday(Flag):
index 9c99fcecce1fcbdf0ff1080a167c50bb2b26e473..6e03ef20a21fa3fd08839e6a511e92f9be9aa565 100644 (file)
@@ -307,7 +307,7 @@ Available static markers
 .. object:: gc__start(int generation)
 
    Fires when the Python interpreter starts a garbage collection cycle.
-   ``arg0`` is the generation to scan, like :func:`gc.collect()`.
+   ``arg0`` is the generation to scan, like :func:`gc.collect`.
 
 .. object:: gc__done(long collected)
 
index dd5dd5ca4e9e3292f67501a697407334f78f66db..8c80a792d879e9b1e84b418933c3eb2876564d82 100644 (file)
@@ -2134,7 +2134,7 @@ and classes for traversing abstract syntax trees:
    If ``type_comments=True`` is given, the parser is modified to check
    and return type comments as specified by :pep:`484` and :pep:`526`.
    This is equivalent to adding :data:`ast.PyCF_TYPE_COMMENTS` to the
-   flags passed to :func:`compile()`.  This will report syntax errors
+   flags passed to :func:`compile`.  This will report syntax errors
    for misplaced type comments.  Without this flag, type comments will
    be ignored, and the ``type_comment`` field on selected AST nodes
    will always be ``None``.  In addition, the locations of ``# type:
index ec170dfde9e9aa2db3c93c46dde184835eb0029b..8312e55126a7c524a226c0f62d0251449015e72f 100644 (file)
@@ -91,7 +91,7 @@ Runner context manager
    current one. By default :func:`asyncio.new_event_loop` is used and set as
    current event loop with :func:`asyncio.set_event_loop` if *loop_factory* is ``None``.
 
-   Basically, :func:`asyncio.run()` example can be rewritten with the runner usage::
+   Basically, :func:`asyncio.run` example can be rewritten with the runner usage::
 
         async def main():
             await asyncio.sleep(1)
index d9c0cb67a92aa75f3708a6133aaa37aa02e8b435..c42288419c4d2dc89d156c8eb9fa977fd1a605e9 100644 (file)
@@ -90,7 +90,7 @@ compile Python sources.
 .. option:: -j N
 
    Use *N* workers to compile the files within the given directory.
-   If ``0`` is used, then the result of :func:`os.process_cpu_count()`
+   If ``0`` is used, then the result of :func:`os.process_cpu_count`
    will be used.
 
 .. option:: --invalidation-mode [timestamp|checked-hash|unchecked-hash]
index 8ae386b489fb4ef5d148d8f9d7f023a6c845f280..b2261ea5127e619aea725615ab67900a6594ad3e 100644 (file)
@@ -15,7 +15,7 @@ function and the :class:`~contextvars.Context` class should be used to
 manage the current context in asynchronous frameworks.
 
 Context managers that have state should use Context Variables
-instead of :func:`threading.local()` to prevent their state from
+instead of :func:`threading.local` to prevent their state from
 bleeding to other code unexpectedly, when used in concurrent code.
 
 See also :pep:`567` for additional details.
@@ -146,7 +146,7 @@ Manual Context Management
 
    Every thread will have a different top-level :class:`~contextvars.Context`
    object. This means that a :class:`ContextVar` object behaves in a similar
-   fashion to :func:`threading.local()` when values are assigned in different
+   fashion to :func:`threading.local` when values are assigned in different
    threads.
 
    Context implements the :class:`collections.abc.Mapping` interface.
index 0a4246158a5488f9a67f2d2f6678292bf0af0e74..242b243643990380806dc1d3c12550c44684c012 100644 (file)
@@ -663,7 +663,7 @@ Data Types
    * the result is a valid *IntFlag*: an *IntFlag* is returned
    * the result is not a valid *IntFlag*: the result depends on the :class:`FlagBoundary` setting
 
-   The :func:`repr()` of unnamed zero-valued flags has changed.  It is now:
+   The :func:`repr` of unnamed zero-valued flags has changed.  It is now:
 
       >>> Color(0)
       <Color: 0>
index 8b51b56da0771ba5109901025204cc953b78a1c9..2c55f2b508bac13fcbc6ed3194b3166b2252844f 100644 (file)
@@ -161,7 +161,7 @@ are always available.  They are listed here in alphabetical order.
    This function drops you into the debugger at the call site.  Specifically,
    it calls :func:`sys.breakpointhook`, passing ``args`` and ``kws`` straight
    through.  By default, ``sys.breakpointhook()`` calls
-   :func:`pdb.set_trace()` expecting no arguments.  In this case, it is
+   :func:`pdb.set_trace` expecting no arguments.  In this case, it is
    purely a convenience function so you don't have to explicitly import
    :mod:`pdb` or type as much code to enter the debugger.  However,
    :func:`sys.breakpointhook` can be set to some other function and
@@ -1336,7 +1336,7 @@ are always available.  They are listed here in alphabetical order.
    (which on *some* Unix systems, means that *all* writes append to the end of
    the file regardless of the current seek position).  In text mode, if
    *encoding* is not specified the encoding used is platform-dependent:
-   :func:`locale.getencoding()` is called to get the current locale encoding.
+   :func:`locale.getencoding` is called to get the current locale encoding.
    (For reading and writing raw bytes use binary mode and leave
    *encoding* unspecified.)  The available modes are:
 
index 9d5c72802a21f28c7786390bd8d7b89e477d8432..5f3607bb132daa1598cc38a63d69a416d3fcf650 100644 (file)
@@ -34,7 +34,7 @@ The :mod:`functools` module defines the following functions:
    Returns the same as ``lru_cache(maxsize=None)``, creating a thin
    wrapper around a dictionary lookup for the function arguments.  Because it
    never needs to evict old values, this is smaller and faster than
-   :func:`lru_cache()` with a size limit.
+   :func:`lru_cache` with a size limit.
 
    For example::
 
index 9d67250033df816c2dd25a8821d26d8902b2efbe..3b5296f9ec66fa5ab09469c4bba26d95ea5e62fd 100644 (file)
@@ -49,7 +49,7 @@ The :mod:`getpass` module provides two functions:
    systems which support the :mod:`pwd` module, otherwise, an :exc:`OSError`
    is raised.
 
-   In general, this function should be preferred over :func:`os.getlogin()`.
+   In general, this function should be preferred over :func:`os.getlogin`.
 
    .. versionchanged:: 3.13
       Previously, various exceptions beyond just :exc:`OSError` were raised.
index 4107907fd0ab430dec23aaf8d939bcbafea71da1..d19e779a52a6df4180fcbeda55c6ec954a6904cf 100644 (file)
@@ -1261,7 +1261,7 @@ Classes and functions
    This function handles several details for you:
 
    * If ``eval_str`` is true, values of type ``str`` will
-     be un-stringized using :func:`eval()`.  This is intended
+     be un-stringized using :func:`eval`.  This is intended
      for use with stringized annotations
      (``from __future__ import annotations``).
    * If ``obj`` doesn't have an annotations dict, returns an
@@ -1275,16 +1275,16 @@ Classes and functions
    * Always, always, always returns a freshly created dict.
 
    ``eval_str`` controls whether or not values of type ``str`` are replaced
-   with the result of calling :func:`eval()` on those values:
+   with the result of calling :func:`eval` on those values:
 
-   * If eval_str is true, :func:`eval()` is called on values of type ``str``.
-     (Note that ``get_annotations`` doesn't catch exceptions; if :func:`eval()`
+   * If eval_str is true, :func:`eval` is called on values of type ``str``.
+     (Note that ``get_annotations`` doesn't catch exceptions; if :func:`eval`
      raises an exception, it will unwind the stack past the ``get_annotations``
      call.)
    * If eval_str is false (the default), values of type ``str`` are unchanged.
 
-   ``globals`` and ``locals`` are passed in to :func:`eval()`; see the documentation
-   for :func:`eval()` for more information.  If ``globals`` or ``locals``
+   ``globals`` and ``locals`` are passed in to :func:`eval`; see the documentation
+   for :func:`eval` for more information.  If ``globals`` or ``locals``
    is ``None``, this function may replace that value with a context-specific
    default, contingent on ``type(obj)``:
 
index 748c49968f505c1442f2c83d821e7f76fad94d17..dd9224f4177ff0c090e8c4a2a358dbbc17f35aa0 100644 (file)
@@ -950,7 +950,7 @@ Text I/O
    :class:`TextIOBase`.
 
    *encoding* gives the name of the encoding that the stream will be decoded or
-   encoded with.  It defaults to :func:`locale.getencoding()`.
+   encoded with.  It defaults to :func:`locale.getencoding`.
    ``encoding="locale"`` can be used to specify the current locale's encoding
    explicitly. See :ref:`io-text-encoding` for more information.
 
@@ -1182,7 +1182,7 @@ re-enter a buffered object which it is already accessing, a :exc:`RuntimeError`
 is raised.  Note this doesn't prohibit a different thread from entering the
 buffered object.
 
-The above implicitly extends to text files, since the :func:`open()` function
+The above implicitly extends to text files, since the :func:`open` function
 will wrap a buffered object inside a :class:`TextIOWrapper`.  This includes
-standard streams and therefore affects the built-in :func:`print()` function as
+standard streams and therefore affects the built-in :func:`print` function as
 well.
index f58c0ea75a475307d1070893becc6b117c0a2494..b6fb6249155c79faf308d4e2af80d0e680c48654 100644 (file)
@@ -1010,7 +1010,7 @@ The module also provides the following module level functions:
 
    doesn't make sense.  There are some times however, where you may wish to
    have :mod:`ipaddress` sort these anyway.  If you need to do this, you can use
-   this function as the *key* argument to :func:`sorted()`.
+   this function as the *key* argument to :func:`sorted`.
 
    *obj* is either a network or address object.
 
index 4793717d0e5c87e2775a412fa6e63d7d43449cfd..9bfb9e2cdf9bc3bbf3411f90dfc1c31030eab7b7 100644 (file)
@@ -113,8 +113,8 @@ of the UTF-8 encoding:
 
 * Use UTF-8 as the :term:`filesystem encoding <filesystem encoding and error
   handler>`.
-* :func:`sys.getfilesystemencoding()` returns ``'utf-8'``.
-* :func:`locale.getpreferredencoding()` returns ``'utf-8'`` (the *do_setlocale*
+* :func:`sys.getfilesystemencoding` returns ``'utf-8'``.
+* :func:`locale.getpreferredencoding` returns ``'utf-8'`` (the *do_setlocale*
   argument has no effect).
 * :data:`sys.stdin`, :data:`sys.stdout`, and :data:`sys.stderr` all use
   UTF-8 as their text encoding, with the ``surrogateescape``
@@ -133,8 +133,8 @@ level APIs also exhibit different default behaviours:
 
 * Command line arguments, environment variables and filenames are decoded
   to text using the UTF-8 encoding.
-* :func:`os.fsdecode()` and :func:`os.fsencode()` use the UTF-8 encoding.
-* :func:`open()`, :func:`io.open()`, and :func:`codecs.open()` use the UTF-8
+* :func:`os.fsdecode` and :func:`os.fsencode` use the UTF-8 encoding.
+* :func:`open`, :func:`io.open`, and :func:`codecs.open` use the UTF-8
   encoding by default. However, they still use the strict error handler by
   default so that attempting to open a binary file in text mode is likely
   to raise an exception rather than producing nonsense data.
@@ -794,7 +794,7 @@ process and user.
    ``socket.gethostbyaddr(socket.gethostname())``.
 
    On macOS, iOS and Android, this returns the *kernel* name and version (i.e.,
-   ``'Darwin'`` on macOS and iOS; ``'Linux'`` on Android). :func:`platform.uname()`
+   ``'Darwin'`` on macOS and iOS; ``'Linux'`` on Android). :func:`platform.uname`
    can be used to get the user-facing operating system name and version on iOS and
    Android.
 
@@ -2860,7 +2860,7 @@ features:
 
    .. versionchanged:: 3.6
       Added support for the :term:`context manager` protocol and the
-      :func:`~scandir.close()` method.  If a :func:`scandir` iterator is neither
+      :func:`~scandir.close` method.  If a :func:`scandir` iterator is neither
       exhausted nor explicitly closed a :exc:`ResourceWarning` will be emitted
       in its destructor.
 
index b1e9392ecfd9277ed2a2d38717b1875dd530d99e..d696161876e99dba08df93c935bec46a16050ad1 100644 (file)
@@ -49,7 +49,7 @@ You can then step through the code following this statement, and continue
 running without the debugger using the :pdbcmd:`continue` command.
 
 .. versionchanged:: 3.7
-   The built-in :func:`breakpoint()`, when called with defaults, can be used
+   The built-in :func:`breakpoint`, when called with defaults, can be used
    instead of ``import pdb; pdb.set_trace()``.
 
 ::
index f082393ef9363c59140bfb3859b7aff1ca8041db..1beb3b9eb89d22a1d0e85813c2f40b83f5af86b4 100644 (file)
@@ -150,7 +150,7 @@ Cross Platform
 
    On iOS and Android, this returns the user-facing OS name (i.e, ``'iOS``,
    ``'iPadOS'`` or ``'Android'``). To obtain the kernel name (``'Darwin'`` or
-   ``'Linux'``), use :func:`os.uname()`.
+   ``'Linux'``), use :func:`os.uname`.
 
 .. function:: system_alias(system, release, version)
 
@@ -165,7 +165,7 @@ Cross Platform
    returned if the value cannot be determined.
 
    On iOS and Android, this is the user-facing OS version. To obtain the
-   Darwin or Linux kernel version, use :func:`os.uname()`.
+   Darwin or Linux kernel version, use :func:`os.uname`.
 
 .. function:: uname()
 
index 48c6841c648ca4e54e157535acbeda3ecf3ab6c8..79c4948e99e96753f824f2f46bd2103f4669dfd0 100644 (file)
@@ -425,7 +425,7 @@ The :mod:`signal` module defines the following functions:
    signal to a particular Python thread would be to force a running system call
    to fail with :exc:`InterruptedError`.
 
-   Use :func:`threading.get_ident()` or the :attr:`~threading.Thread.ident`
+   Use :func:`threading.get_ident` or the :attr:`~threading.Thread.ident`
    attribute of :class:`threading.Thread` objects to get a suitable value
    for *thread_id*.
 
index 088735bdccab07910ba73edd068643d81da453bc..8a7cb7e52eec29eb31665157a12e187fe147a74b 100644 (file)
@@ -3477,7 +3477,7 @@ place, and instead produce new objects.
    ``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters
    are those byte values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``.
 
-   Unlike :func:`str.swapcase()`, it is always the case that
+   Unlike :func:`str.swapcase`, it is always the case that
    ``bin.swapcase().swapcase() == bin`` for the binary versions. Case
    conversions are symmetrical in ASCII, even though that is not generally
    true for arbitrary Unicode code points.
index f10a8085e64244c7da97a84afee6d73f23329d9c..1d5aa42b81686137176133981039f4ac932d7728 100644 (file)
@@ -608,7 +608,7 @@ functions.
 
    If *group* is not ``None``, the setregid() system call will be made in the
    child process prior to the execution of the subprocess. If the provided
-   value is a string, it will be looked up via :func:`grp.getgrnam()` and
+   value is a string, it will be looked up via :func:`grp.getgrnam` and
    the value in ``gr_gid`` will be used. If the value is an integer, it
    will be passed verbatim. (POSIX only)
 
@@ -618,7 +618,7 @@ functions.
    If *extra_groups* is not ``None``, the setgroups() system call will be
    made in the child process prior to the execution of the subprocess.
    Strings provided in *extra_groups* will be looked up via
-   :func:`grp.getgrnam()` and the values in ``gr_gid`` will be used.
+   :func:`grp.getgrnam` and the values in ``gr_gid`` will be used.
    Integer values will be passed verbatim. (POSIX only)
 
    .. availability:: POSIX
@@ -626,7 +626,7 @@ functions.
 
    If *user* is not ``None``, the setreuid() system call will be made in the
    child process prior to the execution of the subprocess. If the provided
-   value is a string, it will be looked up via :func:`pwd.getpwnam()` and
+   value is a string, it will be looked up via :func:`pwd.getpwnam` and
    the value in ``pw_uid`` will be used. If the value is an integer, it will
    be passed verbatim. (POSIX only)
 
index 99252a82d9e9afac085743e91b29a7050bd9f7bb..b0e40a4ea069466aea73031c59c4ad952cfc6341 100644 (file)
@@ -735,11 +735,11 @@ always available.
    regardless of their size.  This function is mainly useful for tracking
    and debugging memory leaks.  Because of the interpreter's internal
    caches, the result can vary from call to call; you may have to call
-   :func:`_clear_internal_caches()` and :func:`gc.collect()` to get more
+   :func:`_clear_internal_caches` and :func:`gc.collect` to get more
    predictable results.
 
    If a Python build or implementation cannot reasonably compute this
-   information, :func:`getallocatedblocks()` is allowed to return 0 instead.
+   information, :func:`getallocatedblocks` is allowed to return 0 instead.
 
    .. versionadded:: 3.4
 
index 6834f66b386e4b1ff0f7a17056aa055366fc1f8a..3921908b7c7bfc5cf89f95b8edd8006f602bb1dd 100644 (file)
@@ -305,7 +305,7 @@ Installation path functions
    mix with those by the other.
 
    End users should not use this function, but :func:`get_default_scheme` and
-   :func:`get_preferred_scheme()` instead.
+   :func:`get_preferred_scheme` instead.
 
    .. versionadded:: 3.10
 
index 631d869e42d09dda27fa8cdd90d404e359665d34..c9d69cf5094095454b7856b79b77f7eabeae360e 100644 (file)
@@ -615,7 +615,7 @@ be finalized; only the internally used file object will be closed. See the
    it is best practice to only do so in top-level applications or
    :mod:`site configuration <site>`.
    To set a global default this way, a filter function needs to be wrapped in
-   :func:`staticmethod()` to prevent injection of a ``self`` argument.
+   :func:`staticmethod` to prevent injection of a ``self`` argument.
 
    .. versionchanged:: 3.14
 
index 2a61f0aaef2b4c9010d3004cdfd82d2d0e48a8a6..12f860430955988ee7d02a7b9f819c413806a108 100644 (file)
@@ -1701,7 +1701,7 @@ The :mod:`test.support.warnings_helper` module provides support for warnings tes
 
 .. function:: check_warnings(*filters, quiet=True)
 
-   A convenience wrapper for :func:`warnings.catch_warnings()` that makes it
+   A convenience wrapper for :func:`warnings.catch_warnings` that makes it
    easier to test that a warning was correctly raised.  It is approximately
    equivalent to calling ``warnings.catch_warnings(record=True)`` with
    :meth:`warnings.simplefilter` set to ``always`` and with the option to
index 900e78dbd22b8a19021d7a3dca4d39e244f84b36..24575105df8ae0260cbbc9f1c4f1da327dae8bcc 100644 (file)
@@ -327,7 +327,7 @@ Functions
 
    .. impl-detail::
 
-      On CPython, use the same clock than :func:`time.monotonic()` and is a
+      On CPython, use the same clock than :func:`time.monotonic` and is a
       monotonic clock, i.e. a clock that cannot go backwards.
 
    Use :func:`perf_counter_ns` to avoid the precision loss caused by the
@@ -339,7 +339,7 @@ Functions
       On Windows, the function is now system-wide.
 
    .. versionchanged:: 3.13
-      Use the same clock than :func:`time.monotonic()`.
+      Use the same clock than :func:`time.monotonic`.
 
 
 .. function:: perf_counter_ns() -> int
index 919ff590b72916f49b0586efee9f59193b3da4c4..0cc9dddd91ed6b5e99517d634f7cc08d6e014b2a 100644 (file)
@@ -75,7 +75,7 @@ the :mod:`tokenize` module.
    :noindex:
 
    Token value indicating that a type comment was recognized.  Such
-   tokens are only produced when :func:`ast.parse()` is invoked with
+   tokens are only produced when :func:`ast.parse` is invoked with
    ``type_comments=True``.
 
 
index dc76374d5181ebb3ad70234fc8ae8f26b3c4eb08..c49aba69b12126f3673d47a4f301a83c805c82ff 100644 (file)
@@ -2529,7 +2529,7 @@ Signal Handling
 .. versionadded:: 3.2
 
 The :option:`-c/--catch <unittest -c>` command-line option to unittest,
-along with the ``catchbreak`` parameter to :func:`unittest.main()`, provide
+along with the ``catchbreak`` parameter to :func:`unittest.main`, provide
 more friendly handling of control-C during a test run. With catch break
 behavior enabled control-C will allow the currently running test to complete,
 and the test run will then end and report all the results so far. A second
index cf561b454e934f1af74d918fddddb19fde8cbeb7..cdaba07ab46c8f3d1a08640321e280fcf3a41792 100644 (file)
@@ -332,7 +332,7 @@ Formally, the Python zip application format is therefore:
    interpreter name, and then a newline (``b'\n'``) character.  The interpreter
    name can be anything acceptable to the OS "shebang" processing, or the Python
    launcher on Windows.  The interpreter should be encoded in UTF-8 on Windows,
-   and in :func:`sys.getfilesystemencoding()` on POSIX.
+   and in :func:`sys.getfilesystemencoding` on POSIX.
 2. Standard zipfile data, as generated by the :mod:`zipfile` module.  The
    zipfile content *must* include a file called ``__main__.py`` (which must be
    in the "root" of the zipfile - i.e., it cannot be in a subdirectory).  The
index f099d5553963e0673fd780ea296cb499fcab4b71..8c3134a61ed1a660bba57169166d40a66a537ea7 100644 (file)
@@ -380,7 +380,7 @@ Bytes
 
    A bytes object is an immutable array.  The items are 8-bit bytes,
    represented by integers in the range 0 <= x < 256.  Bytes literals
-   (like ``b'abc'``) and the built-in :func:`bytes()` constructor
+   (like ``b'abc'``) and the built-in :func:`bytes` constructor
    can be used to create bytes objects.  Also, bytes objects can be
    decoded to strings via the :meth:`~bytes.decode` method.
 
index 6093028f8307a3b35e3afcf2ecb53a33662f6530..dfe2d1d3a8378fa9dd44423b9d4f3c3d5d2732d5 100644 (file)
@@ -230,7 +230,7 @@ accumulate to the point where they affect the final total:
    >>> sum([0.1] * 10) == 1.0
    True
 
-The :func:`math.fsum()` goes further and tracks all of the "lost digits"
+The :func:`math.fsum` goes further and tracks all of the "lost digits"
 as values are added onto a running total so that the result has only a
 single rounding.  This is slower than :func:`sum` but will be more
 accurate in uncommon cases where large magnitude inputs mostly cancel
index 8c70cf4263ae05c5b222cb830fe2a27f5c0114e9..66f7d5fa38dbc96eecbff24fa797af51ac36227d 100644 (file)
@@ -1031,7 +1031,7 @@ conflict.
    'surrogatepass' are used.
 
    This may also be enabled at runtime with
-   :func:`sys._enablelegacywindowsfsencoding()`.
+   :func:`sys._enablelegacywindowsfsencoding`.
 
    .. availability:: Windows.
 
index ad959064a0af48a5a6fbd70524d329f85757d585..455221c8c3180e1757bf6703e1da6259d4472244 100644 (file)
@@ -53,10 +53,10 @@ the simulator or a physical device.
 
 Information about the specific runtime environment, including the iOS version,
 device model, and whether the device is a simulator, can be obtained using
-:func:`platform.ios_ver()`. :func:`platform.system()` will report ``iOS`` or
+:func:`platform.ios_ver`. :func:`platform.system` will report ``iOS`` or
 ``iPadOS``, depending on the device.
 
-:func:`os.uname()` reports kernel-level details; it will report a name of
+:func:`os.uname` reports kernel-level details; it will report a name of
 ``Darwin``.
 
 Standard library availability
index b939ccd17903f21f97400dedace53cd21bca757d..e4699fbf8edaf7ee72265561f83977e1452c7519 100644 (file)
@@ -1233,7 +1233,7 @@ also now un-stringize stringized annotations.
 itertools
 ---------
 
-Add :func:`itertools.pairwise()`.
+Add :func:`itertools.pairwise`.
 (Contributed by Raymond Hettinger in :issue:`38200`.)
 
 linecache
@@ -1245,14 +1245,14 @@ When a module does not define ``__loader__``, fall back to ``__spec__.loader``.
 os
 --
 
-Add :func:`os.cpu_count()` support for VxWorks RTOS.
+Add :func:`os.cpu_count` support for VxWorks RTOS.
 (Contributed by Peixing Xin in :issue:`41440`.)
 
 Add a new function :func:`os.eventfd` and related helpers to wrap the
 ``eventfd2`` syscall on Linux.
 (Contributed by Christian Heimes in :issue:`41001`.)
 
-Add :func:`os.splice()` that allows to move data between two file
+Add :func:`os.splice` that allows to move data between two file
 descriptors without copying between kernel address space and user
 address space, where one of the file descriptors must refer to a
 pipe. (Contributed by Pablo Galindo in :issue:`41625`.)
@@ -1292,7 +1292,7 @@ functions in the :mod:`os` module.
 platform
 --------
 
-Add :func:`platform.freedesktop_os_release()` to retrieve operation system
+Add :func:`platform.freedesktop_os_release` to retrieve operation system
 identification from `freedesktop.org os-release
 <https://www.freedesktop.org/software/systemd/man/os-release.html>`_ standard file.
 (Contributed by Christian Heimes in :issue:`28468`.)
index a240c1fb4cebe6885ecec0c653723268669e5ea0..dc16aa9e8cac664e9908e602db577bc230bb5e74 100644 (file)
@@ -1422,9 +1422,9 @@ hashlib
 -------
 
 * Remove the pure Python implementation of :mod:`hashlib`'s
-  :func:`hashlib.pbkdf2_hmac()`, deprecated in Python 3.10. Python 3.10 and
+  :func:`hashlib.pbkdf2_hmac`, deprecated in Python 3.10. Python 3.10 and
   newer requires OpenSSL 1.1.1 (:pep:`644`): this OpenSSL version provides
-  a C implementation of :func:`~hashlib.pbkdf2_hmac()` which is faster.
+  a C implementation of :func:`~hashlib.pbkdf2_hmac` which is faster.
   (Contributed by Victor Stinner in :gh:`94199`.)
 
 importlib
index ba18991dee89d76a4906429640bb804b82c128c8..44b373ac95d35150821da2161eb22951a4fbd3b3 100644 (file)
@@ -199,7 +199,7 @@ pathlib
 pdb
 ---
 
-* Hard-coded breakpoints (:func:`breakpoint` and :func:`pdb.set_trace()`) now
+* Hard-coded breakpoints (:func:`breakpoint` and :func:`pdb.set_trace`) now
   reuse the most recent :class:`~pdb.Pdb` instance that calls
   :meth:`~pdb.Pdb.set_trace()`, instead of creating a new one each time.
   As a result, all the instance specific data like :pdbcmd:`display` and
index ac05b591b62c6be82445a55cc40710a453dfe40b..40305b78e8aa74c872e2a12f52b02beaf997511f 100644 (file)
@@ -2321,7 +2321,7 @@ Multi-threading
   intervals and reduced overhead due to lock contention and the number of
   ensuing system calls.  The notion of a "check interval" to allow thread
   switches has been abandoned and replaced by an absolute duration expressed in
-  seconds.  This parameter is tunable through :func:`sys.setswitchinterval()`.
+  seconds.  This parameter is tunable through :func:`sys.setswitchinterval`.
   It currently defaults to 5 milliseconds.
 
   Additional details about the implementation can be read from a `python-dev
index 5df976da3c4b461a1cb0f7c1854d92aad837ff1d..95b89e7579fcce65b8372b42d8e9b7d3c25ce2b7 100644 (file)
@@ -779,8 +779,8 @@ Other Language Changes
 Some smaller changes made to the core Python language are:
 
 * Added support for Unicode name aliases and named sequences.
-  Both :func:`unicodedata.lookup()` and ``'\N{...}'`` now resolve name aliases,
-  and :func:`unicodedata.lookup()` resolves named sequences too.
+  Both :func:`unicodedata.lookup` and ``'\N{...}'`` now resolve name aliases,
+  and :func:`unicodedata.lookup` resolves named sequences too.
 
   (Contributed by Ezio Melotti in :issue:`12753`.)
 
index 938dd273e7e102d3970f4de097c4dd90c6922050..fbfcb871e6fe575da5a80ea9c8ce8e98bb391b77 100644 (file)
@@ -1967,7 +1967,7 @@ Other Improvements
 
 * The ``-R`` option to the :ref:`python regression test suite <regrtest>` now
   also checks for memory allocation leaks, using
-  :func:`sys.getallocatedblocks()`.  (Contributed by Antoine Pitrou in
+  :func:`sys.getallocatedblocks`.  (Contributed by Antoine Pitrou in
   :issue:`13390`.)
 
 * ``python -m`` now works with namespace packages.
index 35352c7014d77315704e403e3813c085f6d4b8f0..be83aa8a8550c5d7f1af94e4f1fb37a681f934c1 100644 (file)
@@ -511,10 +511,10 @@ correct.
 Prior to Python 3.6, data loss could result when using bytes paths on Windows.
 With this change, using bytes to represent paths is now supported on Windows,
 provided those bytes are encoded with the encoding returned by
-:func:`sys.getfilesystemencoding()`, which now defaults to ``'utf-8'``.
+:func:`sys.getfilesystemencoding`, which now defaults to ``'utf-8'``.
 
 Applications that do not use str to represent paths should use
-:func:`os.fsencode()` and :func:`os.fsdecode()` to ensure their bytes are
+:func:`os.fsencode` and :func:`os.fsdecode` to ensure their bytes are
 correctly encoded. To revert to the previous behaviour, set
 :envvar:`PYTHONLEGACYWINDOWSFSENCODING` or call
 :func:`sys._enablelegacywindowsfsencoding`.
@@ -780,7 +780,7 @@ for managing secrets, such as account authentication, tokens, and similar.
 
   Note that the pseudo-random generators in the :mod:`random` module
   should *NOT* be used for security purposes.  Use :mod:`secrets`
-  on Python 3.6+ and :func:`os.urandom()` on Python 3.5 and earlier.
+  on Python 3.6+ and :func:`os.urandom` on Python 3.5 and earlier.
 
 .. seealso::
 
@@ -1316,7 +1316,7 @@ Storchaka in :issue:`24164`.)
 pickletools
 -----------
 
-:func:`pickletools.dis()` now outputs the implicit memo index for the
+:func:`pickletools.dis` now outputs the implicit memo index for the
 ``MEMOIZE`` opcode.
 (Contributed by Serhiy Storchaka in :issue:`25382`.)
 
index ab460ed85f8243945363569f25eefef9dc5c5be1..6333fcf1012ebab1cd699b36065d06e731c67820 100644 (file)
@@ -2366,7 +2366,7 @@ Changes in the Python API
   positions 2--3.  To match only blank lines, the pattern should be rewritten
   as ``r'(?m)^[^\S\n]*$'``.
 
-  :func:`re.sub()` now replaces empty matches adjacent to a previous
+  :func:`re.sub` now replaces empty matches adjacent to a previous
   non-empty match.  For example ``re.sub('x*', '-', 'abxd')`` returns now
   ``'-a-b--d-'`` instead of ``'-a-b-d-'`` (the first minus between 'b' and
   'd' replaces 'x', and the second minus replaces an empty string between
index bf5e2770559c691cb95eeced8d3aee447ef13ec5..553e5da4daf0e70b59a172a4fe1c003d3a13ffa6 100644 (file)
@@ -936,7 +936,7 @@ Add option ``--json-lines`` to parse every input line as a separate JSON object.
 logging
 -------
 
-Added a *force* keyword argument to :func:`logging.basicConfig()`
+Added a *force* keyword argument to :func:`logging.basicConfig`
 When set to true, any existing handlers attached
 to the root logger are removed and closed before carrying out the
 configuration specified by the other arguments.
@@ -1175,8 +1175,8 @@ convenience functions to automate the necessary tasks usually involved when
 creating a server socket, including accepting both IPv4 and IPv6 connections
 on the same socket.  (Contributed by Giampaolo RodolĂ  in :issue:`17561`.)
 
-The :func:`socket.if_nameindex()`, :func:`socket.if_nametoindex()`, and
-:func:`socket.if_indextoname()` functions have been implemented on Windows.
+The :func:`socket.if_nameindex`, :func:`socket.if_nametoindex`, and
+:func:`socket.if_indextoname` functions have been implemented on Windows.
 (Contributed by Zackery Spytz in :issue:`37007`.)
 
 
@@ -1193,10 +1193,10 @@ statistics
 ----------
 
 Added :func:`statistics.fmean` as a faster, floating-point variant of
-:func:`statistics.mean()`.  (Contributed by Raymond Hettinger and
+:func:`statistics.mean`.  (Contributed by Raymond Hettinger and
 Steven D'Aprano in :issue:`35904`.)
 
-Added :func:`statistics.geometric_mean()`
+Added :func:`statistics.geometric_mean`
 (Contributed by Raymond Hettinger in :issue:`27181`.)
 
 Added :func:`statistics.multimode` that returns a list of the most
@@ -1367,9 +1367,9 @@ Added :class:`~unittest.mock.AsyncMock` to support an asynchronous version of
 have been added as well.
 (Contributed by Lisa Roach in :issue:`26467`).
 
-Added :func:`~unittest.addModuleCleanup()` and
+Added :func:`~unittest.addModuleCleanup` and
 :meth:`~unittest.TestCase.addClassCleanup()` to unittest to support
-cleanups for :func:`~unittest.setUpModule()` and
+cleanups for :func:`~unittest.setUpModule` and
 :meth:`~unittest.TestCase.setUpClass()`.
 (Contributed by Lisa Roach in :issue:`24412`.)
 
@@ -1432,7 +1432,7 @@ and ``{namespace}*`` which returns all tags in the given namespace.
 (Contributed by Stefan Behnel in :issue:`28238`.)
 
 The :mod:`xml.etree.ElementTree` module provides a new function
-:func:`–xml.etree.ElementTree.canonicalize()` that implements C14N 2.0.
+:func:`–xml.etree.ElementTree.canonicalize` that implements C14N 2.0.
 (Contributed by Stefan Behnel in :issue:`13611`.)
 
 The target object of :class:`xml.etree.ElementTree.XMLParser` can
index 1bce90d248d631dec25dbd5a98d7be608b53a91f..d59a30c23a1ab682939195e0e8fd3a9d955486e3 100644 (file)
@@ -983,7 +983,7 @@ Removed
   (Contributed by Victor Stinner in :issue:`37312`.)
 
 * ``aifc.openfp()`` alias to ``aifc.open()``, ``sunau.openfp()`` alias to
-  ``sunau.open()``, and ``wave.openfp()`` alias to :func:`wave.open()` have been
+  ``sunau.open()``, and ``wave.openfp()`` alias to :func:`wave.open` have been
   removed. They were deprecated since Python 3.7.
   (Contributed by Victor Stinner in :issue:`37320`.)
 
index a74d7e06acd07196f1e4ee90e1e4ac86311fd108..d68aaa066771fb17b806e0b5b7f3af96d1c5ef4f 100644 (file)
@@ -5590,7 +5590,7 @@ Library
 - Issue #16248: Disable code execution from the user's home directory by
   tkinter when the -E flag is passed to Python.  Patch by Zachary Ware.
 
-- Issue #13390: New function :func:`sys.getallocatedblocks()` returns the
+- Issue #13390: New function :func:`sys.getallocatedblocks` returns the
   number of memory blocks currently allocated.
 
 - Issue #16628: Fix a memory leak in ctypes.resize().
@@ -6157,7 +6157,7 @@ Tests
   starting with a ".".  Patch by Sebastian Kreft.
 
 - Issue #13390: The ``-R`` option to regrtest now also checks for memory
-  allocation leaks, using :func:`sys.getallocatedblocks()`.
+  allocation leaks, using :func:`sys.getallocatedblocks`.
 
 - Issue #16559: Add more tests for the json module, including some from the
   official test suite at json.org.  Patch by Serhiy Storchaka.
index f30ed548e7e033ac2ba5ed6f84515a7dc61b989e..0fc2277aaadfcb77193993ae92679ef7a34b7bca 100644 (file)
@@ -1499,7 +1499,7 @@ used to cause ZeroDivisionError now cause an OverflowError instead.
 .. nonce: rju34k
 .. section: Library
 
-Add :func:`os.cpu_count()` support for VxWorks RTOS.
+Add :func:`os.cpu_count` support for VxWorks RTOS.
 
 ..
 
index 2aef87ab929aab47983c047f21986255c8b6db87..33c3e14b7a4bcfd09c566337d6e306c455d36d00 100644 (file)
@@ -477,7 +477,7 @@ object belongs to, potentially breaking the unpickling of those objects.
 
 Simplify the :mod:`importlib` external bootstrap code:
 ``importlib._bootstrap_external`` now uses regular imports to import builtin
-modules. When it is imported, the builtin :func:`__import__()` function is
+modules. When it is imported, the builtin :func:`__import__` function is
 already fully working and so can be used to import builtin modules like
 :mod:`sys`. Patch by Victor Stinner.
 
@@ -517,8 +517,8 @@ Port the ``_signal`` extension module to the multi-phase initialization API
 .. nonce: Wh5svI
 .. section: Library
 
-:func:`time.time()`, :func:`time.perf_counter()` and
-:func:`time.monotonic()` functions can no longer fail with a Python fatal
+:func:`time.time`, :func:`time.perf_counter` and
+:func:`time.monotonic` functions can no longer fail with a Python fatal
 error, instead raise a regular Python exception on failure.
 
 ..
@@ -550,10 +550,10 @@ deduplicate, use type to cache key). Patch provided by Yurii Karabas.
 .. nonce: iDbHrw
 .. section: Library
 
-:func:`time.perf_counter()` on Windows and :func:`time.monotonic()` on macOS
+:func:`time.perf_counter` on Windows and :func:`time.monotonic` on macOS
 are now system-wide. Previously, they used an offset computed at startup to
 reduce the precision loss caused by the float type. Use
-:func:`time.perf_counter_ns()` and :func:`time.monotonic_ns()` added in
+:func:`time.perf_counter_ns` and :func:`time.monotonic_ns` added in
 Python 3.7 to avoid this precision loss.
 
 ..
index 5cea16c259d5ee28a515579031cd66b92db96b0a..19f0db9a6be5e98673e00f6ad77039eae36dcbaf 100644 (file)
@@ -709,7 +709,7 @@ directories.
 .. nonce: ek38d_
 .. section: Library
 
-Add :func:`os.set_blocking()` support for VxWorks RTOS.
+Add :func:`os.set_blocking` support for VxWorks RTOS.
 
 ..
 
index 32ee34d9a68910ab5c993971a2fa852ff2687af8..53185d3aec8ad628f703469186beaa65ed26373c 100644 (file)
@@ -654,7 +654,7 @@ support importlib.invalidate_caches(). Patch by Desmond Cheong.
 .. nonce: 3r0HFY
 .. section: Library
 
-Fail fast in :func:`shutil.move()` to avoid creating destination directories
+Fail fast in :func:`shutil.move` to avoid creating destination directories
 on failure.
 
 ..
@@ -701,8 +701,8 @@ sessions in :mod:`pdb`'s interactive mode.
 When the :data:`tempfile.tempdir` global variable is set to a value of type
 bytes, it is now handled consistently.  Previously exceptions could be
 raised from some tempfile APIs when the directory did not already exist in
-this situation.  Also ensures that the :func:`tempfile.gettempdir()` and
-:func:`tempfile.gettempdirb()` functions *always* return ``str`` and
+this situation.  Also ensures that the :func:`tempfile.gettempdir` and
+:func:`tempfile.gettempdirb` functions *always* return ``str`` and
 ``bytes`` respectively.
 
 ..
index 853f5fece56e208d2118963b86f7cc30c1a24229..33d71e847e12321f25c58c0852dacbb2156f62dc 100644 (file)
@@ -958,7 +958,7 @@ Patch by Jelle Zijlstra.
 .. nonce: nnVd3h
 .. section: Library
 
-Add an ``encoding`` parameter :func:`logging.fileConfig()`.
+Add an ``encoding`` parameter :func:`logging.fileConfig`.
 
 ..
 
@@ -1270,7 +1270,7 @@ Fix thread locks in zlib module may go wrong in rare case. Patch by Ma Lin.
 .. nonce: oi6Kdb
 .. section: Library
 
-Fix dataclasses with ``InitVar``\s and :func:`~dataclasses.replace()`. Patch
+Fix dataclasses with ``InitVar``\s and :func:`~dataclasses.replace`. Patch
 by Claudiu Popa.
 
 ..
@@ -1310,7 +1310,7 @@ functions in the :mod:`os` module.
 .. nonce: 9adF3E
 .. section: Library
 
-:func:`os.path.expanduser()` now refuses to guess Windows home directories
+:func:`os.path.expanduser` now refuses to guess Windows home directories
 if the basename of current user's home directory does not match their
 username.
 
index 8a1391ef0515c31fe240ae45b836edf4992c6e38..0b49c2a78771d26b8a56352f7e4d3debd68e3a7f 100644 (file)
@@ -2000,7 +2000,7 @@ during file extraction.
 .. nonce: roUl0G
 .. section: Library
 
-:mod:`subprocess` on Solaris now also uses :func:`os.posix_spawn()` for
+:mod:`subprocess` on Solaris now also uses :func:`os.posix_spawn` for
 better performance.
 
 ..
index a035d0f5addbf25b4a05796eb315d181469dea91..8a57a2d0fbf8dde6f19f9fc5b1e4dc711fcad083 100644 (file)
@@ -58,7 +58,7 @@ may have prevented Python-to-Python calls respecting PEP 523.
 .. nonce: -igcjS
 .. section: Core and Builtins
 
-Add a closure keyword-only parameter to :func:`exec()`. It can only be specified
+Add a closure keyword-only parameter to :func:`exec`. It can only be specified
 when exec-ing a code object that uses free variables. When specified, it
 must be a tuple, with exactly the number of cell variables referenced by the
 code object. closure has a default value of ``None``, and it must be ``None`` if the
index 77a34124fb39e65528ae23fc79ff61e365f4874e..7e0f86179bce500800eac15275ae2df9bf1a39c7 100644 (file)
@@ -3221,9 +3221,9 @@ Stinner.
 .. section: Library
 
 :mod:`hashlib`: Remove the pure Python implementation of
-:func:`hashlib.pbkdf2_hmac()`, deprecated in Python 3.10. Python 3.10 and
+:func:`hashlib.pbkdf2_hmac`, deprecated in Python 3.10. Python 3.10 and
 newer requires OpenSSL 1.1.1 (:pep:`644`): this OpenSSL version provides a C
-implementation of :func:`~hashlib.pbkdf2_hmac()` which is faster. Patch by
+implementation of :func:`~hashlib.pbkdf2_hmac` which is faster. Patch by
 Victor Stinner.
 
 ..
index 3626f8b1e20809426372d19dc8f6dc572db7c468..bc028f30636bf7ebbac648ce665aafd9c87aee88 100644 (file)
@@ -706,7 +706,7 @@ Remove modules :mod:`!asyncore` and :mod:`!asynchat`, which were deprecated by
 .. section: Library
 
 Fix handling of ``bytes`` :term:`path-like objects <path-like object>` in
-:func:`os.ismount()`.
+:func:`os.ismount`.
 
 ..
 
index 53e1688b802bae1fbc1e8922a7f72fe06a5aa154..57fb2052764b6f2772e992f7b25b19713581b02b 100644 (file)
@@ -611,8 +611,8 @@ random.expovariate().
 .. nonce: bgtzMV
 .. section: Library
 
-A :exc:`DeprecationWarning` may be raised when :func:`os.fork()` or
-:func:`os.forkpty()` is called from multi-threaded processes.  Forking with
+A :exc:`DeprecationWarning` may be raised when :func:`os.fork` or
+:func:`os.forkpty` is called from multi-threaded processes.  Forking with
 threads is unsafe and can cause deadlocks, crashes and subtle problems. Lack
 of a warning does not indicate that the fork call was actually safe, as
 Python may not be aware of all threads.
index 02220ecfb20791f7ce25c16e1b1cfdf81d22c7c3..5dc443bb55b617b759792b128d695e3a01496f07 100644 (file)
@@ -307,7 +307,7 @@ It must not drop the ``Unpack`` part.
 .. nonce: wz4Xgc
 .. section: Library
 
-Add :func:`os.path.splitroot()`, which splits a path into a 3-item tuple
+Add :func:`os.path.splitroot`, which splits a path into a 3-item tuple
 ``(drive, root, tail)``. This new function is used by :mod:`pathlib` to
 improve the performance of path construction by up to a third.
 
index a859be8a0474561247875884303d1810df2efc53..f48b9ce0550440f2f4f289ed84f345198ee4350e 100644 (file)
@@ -219,7 +219,7 @@ Aasland.
 .. nonce: DqNehf
 .. section: Library
 
-Pure python :func:`locale.getencoding()` will not warn deprecation.
+Pure python :func:`locale.getencoding` will not warn deprecation.
 
 ..
 
index 0ba61b43411792b14f455bd69dc656eb318c9a5d..c32c9a537d7b535da6c9c33e14271639377ec276 100644 (file)
@@ -5148,7 +5148,7 @@ frame did not save the PC`` is found. Patch by Victor Stinner.
 .. nonce: qxI4OG
 .. section: Tests
 
-libregrtest now calls :func:`random.seed()` before running each test file
+libregrtest now calls :func:`random.seed` before running each test file
 when ``-r/--randomize`` command line option is used. Moreover, it's also
 called in worker processes.  It should help to make tests more
 deterministic. Previously, it was only called once in the main process
index f4a637bf624d03eb346f50d324193019dc595372..a1a2d8a42ec03b3f760812eadcd7e19975bac8bc 100644 (file)
@@ -632,8 +632,8 @@ Add extra argument validation for ``alias`` command in :mod:`pdb`
 .. nonce: FWqZIU
 .. section: Library
 
-:mod:`time`: Make :func:`time.clock_gettime()` and
-:func:`time.clock_gettime_ns()` functions up to 2x faster by faster calling
+:mod:`time`: Make :func:`time.clock_gettime` and
+:func:`time.clock_gettime_ns` functions up to 2x faster by faster calling
 convention. Patch by Victor Stinner.
 
 ..
@@ -674,7 +674,7 @@ Unix socket when the server is closed.
 .. nonce: Bc8LvA
 .. section: Library
 
-Added :func:`io.text_encoding()`, :data:`io.DEFAULT_BUFFER_SIZE`, and
+Added :func:`io.text_encoding`, :data:`io.DEFAULT_BUFFER_SIZE`, and
 :class:`io.IncrementalNewlineDecoder` to ``io.__all__``.
 
 ..
@@ -736,7 +736,7 @@ which allows to format :exc:`ExceptionGroup` instances.
 .. nonce: 5ePgFl
 .. section: Library
 
-Another attempt at fixing :func:`asyncio.Server.wait_closed()`. It now
+Another attempt at fixing :func:`asyncio.Server.wait_closed`. It now
 blocks until both conditions are true: the server is closed, *and* there are
 no more active connections. (This means that in some cases where in 3.12.0
 this function would *incorrectly* have returned immediately, it will now
@@ -880,7 +880,7 @@ Make :mod:`pdb` enter post-mortem mode even for :exc:`SyntaxError`
 .. nonce: _M-cQC
 .. section: Library
 
-Set ``f_trace_lines = True`` on all frames upon :func:`pdb.set_trace()`
+Set ``f_trace_lines = True`` on all frames upon :func:`pdb.set_trace`
 
 ..
 
index 29fbe00efef76dd2e6c2b98d298626819fd1f52e..f7577bfd9e340161016dec5012a5cef9b6d7f613 100644 (file)
@@ -555,7 +555,7 @@ Added :data:`mmap.MAP_NORESERVE`, :data:`mmap.MAP_NOEXTEND`,
 .. nonce: kXoCy0
 .. section: Library
 
-:func:`asyncio.TaskGroup()` and :func:`asyncio.timeout()` context managers
+:func:`asyncio.TaskGroup` and :func:`asyncio.timeout` context managers
 now handle :exc:`~asyncio.CancelledError` subclasses as well as exact
 :exc:`!CancelledError`.
 
@@ -607,7 +607,7 @@ with the documentation)
 .. nonce: xN2LuL
 .. section: Library
 
-:func:`asyncio.Condition.wait()` now re-raises the same
+:func:`asyncio.Condition.wait` now re-raises the same
 :exc:`CancelledError` instance that may have caused it to be interrupted.
 Fixed race condition in :func:`asyncio.Semaphore.acquire` when interrupted
 with a :exc:`CancelledError`.
@@ -1805,7 +1805,7 @@ size.
 .. nonce: xPOBBY
 .. section: Library
 
-:func:`warnings.filterwarnings()` and :func:`warnings.simplefilter()` now
+:func:`warnings.filterwarnings` and :func:`warnings.simplefilter` now
 raise appropriate exceptions instead of ``AssertionError``. Patch
 contributed by RĂ©mi Lapeyre.
 
index 5efc244c6086cc59db3a27ff02a5463e3d3b1b48..1b971113173e0a55f6c7fcdf60b48f886ffd4106 100644 (file)
@@ -336,7 +336,7 @@ for decorated functions.
 .. nonce: RzxNYT
 .. section: Library
 
-Fix several :func:`format()` bugs when using the C implementation of
+Fix several :func:`format` bugs when using the C implementation of
 :class:`~decimal.Decimal`: * memory leak in some rare cases when using the
 ``z`` format option (coerce negative 0) * incorrect output when applying the
 ``z`` format option to type ``F`` (fixed-point with capital ``NAN`` /
@@ -1283,7 +1283,7 @@ Update macOS installer to use OpenSSL 3.0.13.
 .. nonce: FrQOQ0
 .. section: macOS
 
-Add Mach-O linkage support for :func:`platform.architecture()`.
+Add Mach-O linkage support for :func:`platform.architecture`.
 
 ..
 
index d8cc88c8756a17f7cc4dee23b3c6c712be7480fe..bb162a2b5385271327139b434581e6c982939e7b 100644 (file)
@@ -446,7 +446,7 @@ regardless of *lineterminator* value.
 .. section: Library
 
 Restore support of space delimiter with ``skipinitialspace=True`` in
-:mod:`csv`. :func:`csv.writer()` now quotes empty fields if delimiter is a
+:mod:`csv`. :func:`csv.writer` now quotes empty fields if delimiter is a
 space and skipinitialspace is true and raises exception if quoting is not
 possible.
 
@@ -606,10 +606,10 @@ is complete.
 .. nonce: SQ998l
 .. section: Library
 
-:func:`posixpath.commonpath()` now raises a :exc:`ValueError` exception when
+:func:`posixpath.commonpath` now raises a :exc:`ValueError` exception when
 passed an empty iterable. Previously, :exc:`IndexError` was raised.
 
-:func:`posixpath.commonpath()` now raises a :exc:`TypeError` exception when
+:func:`posixpath.commonpath` now raises a :exc:`TypeError` exception when
 passed ``None``. Previously, :exc:`ValueError` was raised.
 
 ..
index 0cdbb8232250d737f42bc37951537e980aef14cc..b9cdbc4e146d5a0792dcb1efc8820c69087acc8f 100644 (file)
@@ -264,7 +264,7 @@ Improve performance of :func:`os.path.join` and :func:`os.path.expanduser`.
 .. nonce: hqk9Hn
 .. section: Library
 
-Raise :exc:`TypeError` for non-paths in :func:`posixpath.relpath()`.
+Raise :exc:`TypeError` for non-paths in :func:`posixpath.relpath`.
 
 ..
 
@@ -582,7 +582,7 @@ in other tests (like importlib.resources).
 .. nonce: LV16SL
 .. section: Library
 
-On Windows, :func:`time.time()` now uses the
+On Windows, :func:`time.time` now uses the
 ``GetSystemTimePreciseAsFileTime()`` clock to have a resolution better than
 1 us, instead of the ``GetSystemTimeAsFileTime()`` clock which has a
 resolution of 15.6 ms. Patch by Victor Stinner.
@@ -673,14 +673,14 @@ fused multiply-add function. Patch by Mark Dickinson and Victor Stinner.
 .. section: Library
 
 The :mod:`importlib.resources` functions
-:func:`~importlib.resources.is_resource()`,
-:func:`~importlib.resources.open_binary()`,
-:func:`~importlib.resources.open_text()`,
-:func:`~importlib.resources.path()`,
-:func:`~importlib.resources.read_binary()`, and
-:func:`~importlib.resources.read_text()` are un-deprecated, and support
+:func:`~importlib.resources.is_resource`,
+:func:`~importlib.resources.open_binary`,
+:func:`~importlib.resources.open_text`,
+:func:`~importlib.resources.path`,
+:func:`~importlib.resources.read_binary`, and
+:func:`~importlib.resources.read_text` are un-deprecated, and support
 subdirectories via multiple positional arguments. The
-:func:`~importlib.resources.contents()` function also allows subdirectories,
+:func:`~importlib.resources.contents` function also allows subdirectories,
 but remains deprecated.
 
 ..
@@ -1061,7 +1061,7 @@ when available. Contributed by vxiiduu.
 .. nonce: Bwfmp7
 .. section: Windows
 
-On Windows, :func:`time.monotonic()` now uses the
+On Windows, :func:`time.monotonic` now uses the
 ``QueryPerformanceCounter()`` clock to have a resolution better than 1 us,
 instead of the ``GetTickCount64()`` clock which has a resolution of 15.6 ms.
 Patch by Victor Stinner.
index b09efa45cddc0cbcd746b5e556e46fa3f8f10944..e9428786e8e15315ff2534b224b07d0ed1e87e1c 100644 (file)
@@ -1213,7 +1213,7 @@ changed from ``'r'`` to ``'rb'``.
 .. nonce: eeS6w7
 .. section: Library
 
-Fix :func:`inspect.signature()` to correctly handle parameter defaults on
+Fix :func:`inspect.signature` to correctly handle parameter defaults on
 methods in extension modules that use names defined in the module namespace.
 
 ..
index 3d14cc49049c8fae816d760e26f681e09ba0798b..a45e97fb29045be7ba949b33eb0681b2e35c8705 100644 (file)
@@ -474,7 +474,7 @@ platforms with OpenSSL 1.0.2+ or inet_pton.
 .. nonce: ideco
 .. section: Library
 
-:func:`urllib.parse.urlsplit()` does not convert zone-id (scope) to lower
+:func:`urllib.parse.urlsplit` does not convert zone-id (scope) to lower
 case for scoped IPv6 addresses in hostnames now.
 
 ..
index 679f72ee0a44d4fe8c5118a87a1c3f1f68d266df..2ceb9e78e0421b71fd2dc1ed36a818ae6b1c8cd1 100644 (file)
@@ -434,7 +434,7 @@ loop.getaddrinfo, loop.getnameinfo.
 .. nonce: ideco
 .. section: Library
 
-:func:`urllib.parse.urlsplit()` does not convert zone-id (scope) to lower
+:func:`urllib.parse.urlsplit` does not convert zone-id (scope) to lower
 case for scoped IPv6 addresses in hostnames now.
 
 ..
@@ -463,7 +463,7 @@ Fix ``stop_serving`` in asyncio proactor loop kill all listening servers
 .. nonce: CUbsb2
 .. section: Library
 
-:func:`re.sub()` now replaces empty matches adjacent to a previous non-empty
+:func:`re.sub` now replaces empty matches adjacent to a previous non-empty
 match.
 
 ..
index 702dbc960c018da852cdaaa53e9a66e3bc33bcec..10cd57ea7edfce1f930d24347c2e32c2bd78c81c 100644 (file)
@@ -274,7 +274,7 @@ collections.ChainMap() preserves the order of the underlying mappings.
 .. nonce: -T77_c
 .. section: Library
 
-:func:`fnmatch.translate()` no longer produces patterns which contain set
+:func:`fnmatch.translate` no longer produces patterns which contain set
 operations. Sets starting with '[' or containing '--', '&&', '~~' or '||'
 will be interpreted differently in regular expressions in future versions.
 Currently they emit warnings. fnmatch.translate() now avoids producing
index fd0ce25cd8fb4144e13a1fe32eec20ca6cb918e0..93627f54900ddd6010978c4693b5914c1b88bafa 100644 (file)
@@ -235,7 +235,7 @@ End framing at the end of C implementation of :func:`pickle.Pickler.dump`.
 .. section: Library
 
 Improved error handling and fixed a reference leak in
-:func:`os.posix_spawn()`.
+:func:`os.posix_spawn`.
 
 ..
 
index c3533643bc08108c9cf2fa2f7714b2357567a1e7..7c459c95f36b6dc4db0e816f0feb82a669df2f5b 100644 (file)
@@ -625,7 +625,7 @@ Spytz.
 
 The C function ``property_descr_get()`` uses a "cached" tuple to optimize
 function calls. But this tuple can be discovered in debug mode with
-:func:`sys.getobjects()`. Remove the optimization, it's not really worth it
+:func:`sys.getobjects`. Remove the optimization, it's not really worth it
 and it causes 3 different crashes last years.
 
 ..
@@ -3211,9 +3211,9 @@ bytes objects. (microoptimization)
 .. nonce: i-F_E5
 .. section: Library
 
-Add :func:`~unittest.addModuleCleanup()` and
+Add :func:`~unittest.addModuleCleanup` and
 :meth:`~unittest.TestCase.addClassCleanup()` to unittest to support cleanups
-for :func:`~unittest.setUpModule()` and
+for :func:`~unittest.setUpModule` and
 :meth:`~unittest.TestCase.setUpClass()`. Patch by Lisa Roach.
 
 ..
@@ -3458,7 +3458,7 @@ Running the :mod:`trace` module no longer creates the ``trace.cover`` file.
 .. section: Library
 
 Fix crash when an ``ABC``-derived class with invalid ``__subclasses__`` is
-passed as the second argument to :func:`issubclass()`. Patch by Alexey
+passed as the second argument to :func:`issubclass`. Patch by Alexey
 Izbyshev.
 
 ..
@@ -5269,7 +5269,7 @@ performance and smaller size compared to protocol 3 introduced in Python
 .. section: Library
 
 Improved error handling and fixed a reference leak in
-:func:`os.posix_spawn()`.
+:func:`os.posix_spawn`.
 
 ..
 
@@ -5857,7 +5857,7 @@ collections.ChainMap() preserves the order of the underlying mappings.
 .. nonce: -T77_c
 .. section: Library
 
-:func:`fnmatch.translate()` no longer produces patterns which contain set
+:func:`fnmatch.translate` no longer produces patterns which contain set
 operations. Sets starting with '[' or containing '--', '&&', '~~' or '||'
 will be interpreted differently in regular expressions in future versions.
 Currently they emit warnings. fnmatch.translate() now avoids producing
index fc4e3a9bd887fb8fc290ebfc52bea480b59cdb4f..5ab46db02cef1115d3a1b26b5ac223b3f2a2ea96 100644 (file)
@@ -176,8 +176,8 @@ Added new ``replace()`` method to the code type (:class:`types.CodeType`).
 .. nonce: d1SOtF
 .. section: Core and Builtins
 
-Implement :func:`socket.if_nameindex()`, :func:`socket.if_nametoindex()`,
-and :func:`socket.if_indextoname()` on Windows.
+Implement :func:`socket.if_nameindex`, :func:`socket.if_nametoindex`,
+and :func:`socket.if_indextoname` on Windows.
 
 ..
 
index 705a0a32f0e861c3743ea9f32f28a7a9d8ce8cb1..1e22da31c213984780ef63655d6937c17f2b0690 100644 (file)
@@ -149,7 +149,7 @@ exception in :meth:`float.__getformat__`.
 .. nonce: 9-vKtO
 .. section: Core and Builtins
 
-Optimized :func:`math.floor()`, :func:`math.ceil()` and :func:`math.trunc()`
+Optimized :func:`math.floor`, :func:`math.ceil` and :func:`math.trunc`
 for floats.
 
 ..
@@ -2990,7 +2990,7 @@ mode.
 .. nonce: FRGH4I
 .. section: Library
 
-:func:`ctypes.create_unicode_buffer()` now also supports non-BMP characters
+:func:`ctypes.create_unicode_buffer` now also supports non-BMP characters
 on platforms with 16-bit :c:type:`wchar_t` (for example, Windows and AIX).
 
 ..
@@ -3054,7 +3054,7 @@ Change the format of feature_version to be a (major, minor) tuple.
 .. nonce: 5_mJkQ
 .. section: Library
 
-Eliminate :exc:`RuntimeError` raised by :func:`asyncio.all_tasks()` if
+Eliminate :exc:`RuntimeError` raised by :func:`asyncio.all_tasks` if
 internal tasks weak set is changed by another thread during iteration.
 
 ..
@@ -3536,7 +3536,7 @@ Add :meth:`~pathlib.Path.readlink`. Patch by Girts Folkmanis.
 .. nonce: La3TZz
 .. section: Library
 
-Made :func:`urllib.parse.unquote()` accept bytes in addition to strings.
+Made :func:`urllib.parse.unquote` accept bytes in addition to strings.
 Patch by Stein Karlsen.
 
 ..
index 7f7480539f2f1b6961ddc0f44a872605d5cb6ff3..9402e5077c2e77d340f5387e11ce3fb4a37ea160 100644 (file)
@@ -548,7 +548,7 @@ large for an AF_UNIX socket address. Patch by Pablo Galindo.
 .. nonce: mxr5m8
 .. section: Library
 
-:func:`ast.dump()` no longer outputs optional fields and attributes with
+:func:`ast.dump` no longer outputs optional fields and attributes with
 default values. The default values for optional fields and attributes of AST
 nodes are now set as class attributes (e.g. ``Constant.kind`` is set to
 ``None``).
index 4ba4cfe818c2d0ad0c9e9552248681fe0312d107..67e428bb22df125dd918f93c6d51b3d572911d8f 100644 (file)
@@ -866,7 +866,7 @@ of source of the class. Patch by Karthikeyan Singaravelan.
 .. nonce: vHC7YQ
 .. section: Library
 
-Deprecate passing None as an argument for :func:`shlex.split()`'s ``s``
+Deprecate passing None as an argument for :func:`shlex.split`'s ``s``
 parameter.  Patch by Zackery Spytz.
 
 ..
index b86d6fbdfc648ffd2d941bc02ef7d9cdcc7cca9c..5a9a82ddef6ee42e6f2b45c631ba3e9b260b479d 100644 (file)
@@ -1,4 +1,4 @@
-Specializations for sums with float and complex inputs in :func:`sum()` now
+Specializations for sums with float and complex inputs in :func:`sum` now
 always use compensated summation.  Also, for integer items in above
 specializations: :c:func:`PyLong_AsDouble` is used, instead of
 :c:func:`PyLong_AsLongAndOverflow`.  Patch by Sergey B Kirpichev.
index d21532f22a1d38ea062a3b8221a4883188483d77..2354a9afac4bc2b0ec547a760d6d078024dbc8da 100644 (file)
@@ -1 +1 @@
-Fix memory leak in :func:`re.sub()` when the replacement string contains backreferences.
+Fix memory leak in :func:`re.sub` when the replacement string contains backreferences.
index 4a65fb737f025b84744ed94cb9d9321d85bdb0d4..98b9453ad8c84365420ec6c27e5873fb4b643e32 100644 (file)
@@ -1,4 +1,4 @@
-Hard-coded breakpoints (:func:`breakpoint` and :func:`pdb.set_trace()`) now
+Hard-coded breakpoints (:func:`breakpoint` and :func:`pdb.set_trace`) now
 reuse the most recent ``Pdb`` instance that calls ``Pdb.set_trace()``,
 instead of creating a new one each time. As a result, all the instance specific
 data like ``display`` and ``commands`` are preserved across Hard-coded breakpoints.