]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] 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:55:14 +0000 (13:55 +0100)
committerGitHub <noreply@github.com>
Fri, 1 Mar 2024 12:55:14 +0000 (12:55 +0000)
commit726c1170e84cae6b51983a6ae530b8b1f085f913
treef5c96a4eefd0f5d97d89e532be19dcfda00d5631
parent8813e5a2dea3fbea6be7cb4e3db8a64c8665bc90
[3.11] gh-101293: Fix support of custom callables and types in inspect.Signature.from_callable() (GH-115530) (GH-116197)

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]