https://github.com/python/cpython/commit/31462d4de2abb4a94ea41c21df3ef7d2fe6b8a22
commit: 31462d4de2abb4a94ea41c21df3ef7d2fe6b8a22
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: gpshead <[email protected]>
date: 2024-02-29T01:54:36-08:00
summary:

[3.12] gh-115937: Remove implementation details from inspect.signature() docs 
(GH-116086) (#116106)

gh-115937: Remove implementation details from inspect.signature() docs 
(GH-116086)
(cherry picked from commit fb2e17b642fc3089e4f98e4bf6b09dd362e6b27d)

Co-authored-by: Erlend E. Aasland <[email protected]>
Co-authored-by: Carol Willing <[email protected]>
Co-authored-by: Gregory P. Smith <[email protected]>
Co-authored-by: Jelle Zijlstra <[email protected]>

files:
M Doc/library/inspect.rst

diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index a1178cfccddf82..c4c381bb8335b8 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -655,9 +655,6 @@ function.
    Accepts a wide range of Python callables, from plain functions and classes 
to
    :func:`functools.partial` objects.
 
-   If the passed object has a ``__signature__`` attribute, this function
-   returns it without further computations.
-
    For objects defined in modules using stringized annotations
    (``from __future__ import annotations``), :func:`signature` will
    attempt to automatically un-stringize the annotations using
@@ -692,6 +689,13 @@ function.
       Python.  For example, in CPython, some built-in functions defined in
       C provide no metadata about their arguments.
 
+   .. impl-detail::
+
+      If the passed object has a :attr:`!__signature__` attribute,
+      we may use it to create the signature.
+      The exact semantics are an implementation detail and are subject to
+      unannounced changes. Consult the source code for current semantics.
+
 
 .. class:: Signature(parameters=None, *, return_annotation=Signature.empty)
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to