gh-127750: Restore inspect and pydoc support of singledispatchmethod (GH-130309)

The code is still flawed, because it does not recognize class and static
methods, and the first argument is not removed from the signature of
bound methods, but at least it does not worse than in 3.13 and older.
This commit is contained in:
Serhiy Storchaka 2025-02-20 11:08:49 +02:00 committed by GitHub
parent ed831b95a2
commit 10b32054ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 79 additions and 1 deletions

View file

@ -447,7 +447,8 @@ def isroutine(object):
or isfunction(object)
or ismethod(object)
or ismethoddescriptor(object)
or ismethodwrapper(object))
or ismethodwrapper(object)
or isinstance(object, functools._singledispatchmethod_get))
def isabstract(object):
"""Return true if the object is an abstract base class (ABC)."""