]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-101293: Fix support of custom callables and types in inspect.Signature...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 1 Mar 2024 12:59:49 +0000 (13:59 +0100)
committerGitHub <noreply@github.com>
Fri, 1 Mar 2024 12:59:49 +0000 (12:59 +0000)
commitd341098c59e75821958c40aeb921dd41209e51f7
treecb943794da6d5771de39f5092f95286362d52ecc
parent753b6644e3b342ad0d713cb758f37e6b29a5af04
[3.12] gh-101293: Fix support of custom callables and types in inspect.Signature.from_callable() (GH-115530) (GH-116198)

Support callables with the __call__() method and types with
__new__() and __init__() methods set to class methods, static
methods, bound methods, partial functions, and other types of
methods and descriptors.

Add tests for numerous types of callables and descriptors.
(cherry picked from commit 59167c962efcae72e8d88aa4b33062ed3de4f120)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/inspect.py
Lib/test/test_inspect/test_inspect.py
Misc/NEWS.d/next/Library/2024-02-15-19-11-49.gh-issue-101293.898b8l.rst [new file with mode: 0644]