]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-101100: Remove some entries from ``nitpick_ignore`` (#138464)
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>
Mon, 8 Sep 2025 22:10:26 +0000 (23:10 +0100)
committerGitHub <noreply@github.com>
Mon, 8 Sep 2025 22:10:26 +0000 (22:10 +0000)
18 files changed:
Doc/conf.py
Doc/library/collections.rst
Doc/library/dataclasses.rst
Doc/library/dis.rst
Doc/library/inspect.rst
Doc/library/os.path.rst
Doc/library/pathlib.rst
Doc/library/stdtypes.rst
Doc/reference/compound_stmts.rst
Doc/tools/check-warnings.py
Doc/tutorial/controlflow.rst
Doc/whatsnew/3.2.rst
Doc/whatsnew/3.4.rst
Doc/whatsnew/3.5.rst
Doc/whatsnew/3.6.rst
Misc/NEWS.d/3.12.0a1.rst
Misc/NEWS.d/3.13.0a6.rst
Misc/NEWS.d/3.14.0a7.rst

index bdc3ad13617948c36eb7f2f4c55318921cc6dbb5..c1b07df08b1782ed2e002725fe8ec2cba2f7c798 100644 (file)
@@ -221,13 +221,6 @@ nitpick_ignore = [
     ('envvar', 'USER'),
     ('envvar', 'USERNAME'),
     ('envvar', 'USERPROFILE'),
-    # Deprecated function that was never documented:
-    ('py:func', 'getargspec'),
-    ('py:func', 'inspect.getargspec'),
-    # Undocumented modules that users shouldn't have to worry about
-    # (implementation details of `os.path`):
-    ('py:mod', 'ntpath'),
-    ('py:mod', 'posixpath'),
 ]
 
 # Temporary undocumented names.
@@ -242,8 +235,6 @@ nitpick_ignore += [
     ('py:meth', '_SubParsersAction.add_parser'),
     # Attributes/methods/etc. that definitely should be documented better,
     # but are deferred for now:
-    ('py:attr', '__annotations__'),
-    ('py:meth', '__missing__'),
     ('py:attr', '__wrapped__'),
 ]
 
index 17ca8b99db0235fc9553a0441f0fc82df916461c..fdd31799bd90d30e8357c997080a848de133f26b 100644 (file)
@@ -758,9 +758,9 @@ stack manipulations such as ``dup``, ``drop``, ``swap``, ``over``, ``pick``,
 
     .. attribute:: default_factory
 
-        This attribute is used by the :meth:`__missing__` method; it is
-        initialized from the first argument to the constructor, if present, or to
-        ``None``, if absent.
+        This attribute is used by the :meth:`~defaultdict.__missing__` method;
+        it is initialized from the first argument to the constructor, if present,
+        or to ``None``, if absent.
 
     .. versionchanged:: 3.9
        Added merge (``|``) and update (``|=``) operators, specified in
index 2e4520c823bf3ee0270af6d0b1a3a0b2adf2a3f9..ca432f2768a12797098702d82f6a1518e1a2f3b7 100644 (file)
@@ -439,7 +439,7 @@ Module contents
    function is used.
 
    This function is not strictly required, because any Python
-   mechanism for creating a new class with :attr:`!__annotations__` can
+   mechanism for creating a new class with :attr:`~object.__annotations__` can
    then apply the :func:`@dataclass <dataclass>` function to convert that class to
    a dataclass.  This function is provided as a convenience.  For
    example::
index 7360f4aa8047242e9f9ce52aa4056915fe93ace6..21bd1db5f338de81ab499e00d7d799e7d6ea9dd3 100644 (file)
@@ -1086,6 +1086,11 @@ iterations of the loop.
    Pushes ``co_consts[consti]`` onto the stack.
 
 
+.. opcode:: LOAD_CONST_IMMORTAL (consti)
+
+   Works as :opcode:`LOAD_CONST`, but is more efficient for immortal objects.
+
+
 .. opcode:: LOAD_SMALL_INT (i)
 
    Pushes the integer ``i`` onto the stack.
index 1061ae8849f48f9015fd577ec743f610bcd08d95..7f2930ccd5523ab7e18e673e07542dc056a73099 100644 (file)
@@ -1179,7 +1179,7 @@ Classes and functions
       :func:`signature` in Python 3.5, but that decision has been reversed
       in order to restore a clearly supported standard interface for
       single-source Python 2/3 code migrating away from the legacy
-      :func:`getargspec` API.
+      :func:`!getargspec` API.
 
    .. versionchanged:: 3.7
       Python only explicitly guaranteed that it preserved the declaration
index cb021be4543e75e71721d99579c53d280d8632cb..bb9a7c8646405086591008d233af42cbce5fe52b 100644 (file)
@@ -42,8 +42,8 @@ the :mod:`glob` module.)
    a path that is *always* in one of the different formats.  They all have the
    same interface:
 
-   * :mod:`posixpath` for UNIX-style paths
-   * :mod:`ntpath` for Windows paths
+   * :mod:`!posixpath` for UNIX-style paths
+   * :mod:`!ntpath` for Windows paths
 
 
 .. versionchanged:: 3.8
index ebf5756146df925b876604473b4884bd2fab8fbd..79e0b7f09eaa77734abe1faef368f7b722d372b4 100644 (file)
@@ -311,7 +311,7 @@ Pure paths provide the following methods and properties:
 .. attribute:: PurePath.parser
 
    The implementation of the :mod:`os.path` module used for low-level path
-   parsing and joining: either :mod:`posixpath` or :mod:`ntpath`.
+   parsing and joining: either :mod:`!posixpath` or :mod:`!ntpath`.
 
    .. versionadded:: 3.13
 
index 3ea4edacf3d0cc03985b62a9c0958504db3cdce0..b30b7fef9089f1f9e258b1db26c566f3639d3ab6 100644 (file)
@@ -5014,13 +5014,13 @@ can be used interchangeably to index the same dictionary entry.
 
       .. index:: __missing__()
 
-      If a subclass of dict defines a method :meth:`__missing__` and *key*
+      If a subclass of dict defines a method :meth:`~object.__missing__` and *key*
       is not present, the ``d[key]`` operation calls that method with the key *key*
       as argument.  The ``d[key]`` operation then returns or raises whatever is
       returned or raised by the ``__missing__(key)`` call.
-      No other operations or methods invoke :meth:`__missing__`. If
-      :meth:`__missing__` is not defined, :exc:`KeyError` is raised.
-      :meth:`__missing__` must be a method; it cannot be an instance variable::
+      No other operations or methods invoke :meth:`~object.__missing__`. If
+      :meth:`~object.__missing__` is not defined, :exc:`KeyError` is raised.
+      :meth:`~object.__missing__` must be a method; it cannot be an instance variable::
 
           >>> class Counter(dict):
           ...     def __missing__(self, key):
@@ -5034,7 +5034,8 @@ can be used interchangeably to index the same dictionary entry.
           1
 
       The example above shows part of the implementation of
-      :class:`collections.Counter`.  A different ``__missing__`` method is used
+      :class:`collections.Counter`.
+      A different :meth:`!__missing__` method is used
       by :class:`collections.defaultdict`.
 
    .. describe:: d[key] = value
index 9dca276e4a0001c88f4a9ccc548acd7bed0d0d6c..283b3b1bc6d86e40008cefa4e60549ee25be6466 100644 (file)
@@ -1067,8 +1067,8 @@ subject value:
 
 .. note:: Key-value pairs are matched using the two-argument form of the mapping
    subject's ``get()`` method.  Matched key-value pairs must already be present
-   in the mapping, and not created on-the-fly via :meth:`__missing__` or
-   :meth:`~object.__getitem__`.
+   in the mapping, and not created on-the-fly via :meth:`~object.__missing__`
+   or :meth:`~object.__getitem__`.
 
 In simple terms ``{KEY1: P1, KEY2: P2, ... }`` matches only if all the following
 happens:
index c686eecf8d92712d6819d4ddc9d140c9a47a71ec..2f2bb9e2dcb7ef1b19971ecfb509c3c29f827662 100644 (file)
@@ -15,7 +15,7 @@ from pathlib import Path
 from typing import TextIO
 
 # Fail if NEWS nit found before this line number
-NEWS_NIT_THRESHOLD = 1700
+NEWS_NIT_THRESHOLD = 8550
 
 # Exclude these whether they're dirty or clean,
 # because they trigger a rebuild of dirty files.
index b4b9d36cef17549f8ea6ec9754566774d34f8320..5ec8789f98c7016bcaf6085f0da43c51bd207a82 100644 (file)
@@ -1081,7 +1081,7 @@ Function Annotations
 information about the types used by user-defined functions (see :pep:`3107` and
 :pep:`484` for more information).
 
-:term:`Annotations <function annotation>` are stored in the :attr:`!__annotations__`
+:term:`Annotations <function annotation>` are stored in the :attr:`~object.__annotations__`
 attribute of the function as a dictionary and have no effect on any other part of the
 function.  Parameter annotations are defined by a colon after the parameter name, followed
 by an expression evaluating to the value of the annotation.  Return annotations are
index 7104904c956a7a9eaf4cee20aa3b758a486d6f72..47c4d9acbc870e5001978303609fca6e097c321a 100644 (file)
@@ -458,7 +458,7 @@ Some smaller changes made to the core Python language are:
   :class:`~collections.defaultdict`, :class:`~shelve.Shelf`,
   :class:`~configparser.ConfigParser`, or :mod:`dbm`.  It is also useful with
   custom :class:`dict` subclasses that normalize keys before look-up or that
-  supply a :meth:`__missing__` method for unknown keys::
+  supply a :meth:`~object.__missing__` method for unknown keys::
 
     >>> import shelve
     >>> d = shelve.open('tmp.shl')
index 5ad4f1c4a5e494b7ff8869d05e2d1caa8ab81dd5..59afd6520c418f59ade52616732d3b9c8f885e41 100644 (file)
@@ -1039,7 +1039,7 @@ As part of the implementation of the new :mod:`enum` module, the
 metaclasses.  (Contributed by Ethan Furman in :issue:`18929` and
 :issue:`19030`.)
 
-:func:`~inspect.getfullargspec` and :func:`~inspect.getargspec`
+:func:`~inspect.getfullargspec` and :func:`!getargspec`
 now use the :func:`~inspect.signature` API. This allows them to
 support a much broader range of callables, including those with
 ``__signature__`` attributes, those with metadata provided by argument
index d7af63497a0256e2e8bfbacbbbf25b3506e1ac9b..59e8ecebb10444ef2911337f7317d3fc635a720a 100644 (file)
@@ -2324,7 +2324,7 @@ The previously undocumented ``from_function`` and ``from_builtin`` methods of
 :meth:`Signature.from_callable() <inspect.Signature.from_callable>`
 method instead. (Contributed by Yury Selivanov in :issue:`24248`.)
 
-The :func:`inspect.getargspec` function is deprecated and scheduled to be
+The :func:`!inspect.getargspec` function is deprecated and scheduled to be
 removed in Python 3.6.  (See :issue:`20438` for details.)
 
 The :mod:`inspect` :func:`~inspect.getfullargspec`,
index 308596498b071a4be3889db3b666b1e2e029d866..b1e3269239d62973ce92d2139bf830576618f7a0 100644 (file)
@@ -1224,7 +1224,7 @@ generator expression scopes as if they were positional-only parameters called
 ``implicit0``. (Contributed by Jelle Zijlstra in :issue:`19611`.)
 
 To reduce code churn when upgrading from Python 2.7 and the legacy
-:func:`inspect.getargspec` API, the previously documented deprecation of
+:func:`!inspect.getargspec` API, the previously documented deprecation of
 :func:`inspect.getfullargspec` has been reversed. While this function is
 convenient for single/source Python 2/3 code bases, the richer
 :func:`inspect.signature` interface remains the recommended approach for new
index f2668e99a6299b68058b19658a96be55f8e9752e..0da7cdde1b2535ec893a5e14952ded6f4592a6a8 100644 (file)
@@ -4330,7 +4330,7 @@ and ``sendfile`` inside ``IocpProactor``.
 .. nonce: GsBL9-
 .. section: Library
 
-Fixed :meth:`collections.UserDict.get` to not call :meth:`__missing__` when
+Fixed :meth:`collections.UserDict.get` to not call :meth:`~object.__missing__` when
 a value is not found. This matches the behavior of :class:`dict`. Patch by
 Bar Harel.
 
index 2740b4f0d967bab5396b5755c8e4e1c9c4baa090..ad6622d23bf36b5d87108a1e4e3410921bf7d259 100644 (file)
@@ -264,7 +264,8 @@ 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
+<os.path.relpath>`.
 
 ..
 
@@ -273,7 +274,8 @@ Raise :exc:`TypeError` for non-paths in :func:`posixpath.relpath`.
 .. nonce: l6rWlj
 .. section: Library
 
-Preserve mailbox ownership when rewriting in :func:`mailbox.mbox.flush`.
+Preserve mailbox ownership when rewriting in :func:`mailbox.mbox.flush
+<mailbox.Mailbox.flush>`.
 Patch by Tony Mountifield.
 
 ..
index ab64bdbb319027395050346cac56c694816ee76c..946ca27046a745e7de59d0705a01cde90fa0cb68 100644 (file)
@@ -192,7 +192,7 @@ The :class:`ctypes.py_object` type now supports subscription, making it a
 .. nonce: cX4yTn
 .. section: Library
 
-Add the :attr:`zipfile.ZipFile.data_offset` attribute, which stores the
+Add the :attr:`!zipfile.ZipFile.data_offset` attribute, which stores the
 offset to the beginning of ZIP data in a file when available. When the
 :class:`zipfile.ZipFile` is opened in either mode ``'w'`` or ``'x'`` and the
 underlying file does not support ``tell()``, the value will be ``None``