Documentation
While investigating Kludex/starlette#2648, I've noticed that the behavior of inspect.isroutine() changed with regards to functools.partial().
Please consider the following sample:
import inspect
from functools import partial
def foo(x):
pass
p = partial(foo, 1)
print(inspect.isroutine(p))
Prior to 3.13.0b3, it would evaluate to False. In newer versions, it evaluates to True.
A bisect points out that it changed as a result of 49e5740 (i.e. #121086). Neither the commit message, nor the news entry, hints anything about inspect.isroutine() behavior.
Could you please clarify whether the change was intentional? And if it was, could we have it explicitly noted in the documentation?
Linked PRs
Documentation
While investigating Kludex/starlette#2648, I've noticed that the behavior of
inspect.isroutine()changed with regards tofunctools.partial().Please consider the following sample:
Prior to 3.13.0b3, it would evaluate to
False. In newer versions, it evaluates toTrue.A bisect points out that it changed as a result of 49e5740 (i.e. #121086). Neither the commit message, nor the news entry, hints anything about
inspect.isroutine()behavior.Could you please clarify whether the change was intentional? And if it was, could we have it explicitly noted in the documentation?
Linked PRs