We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9961179 commit 1f05728Copy full SHA for 1f05728
Lib/inspect.py
@@ -316,13 +316,20 @@ def _has_coroutine_mark(f):
316
f = f.__func__
317
continue
318
319
+ # Functions created by partialmethod descriptors keep a __partialmethod__ reference
320
+ pm = getattr(f, "__partialmethod__", None)
321
+ if isinstance(pm, functools.partialmethod):
322
+ f = pm
323
+ continue
324
+
325
# partial and partialmethod share .func
326
if isinstance(f, (functools.partial, functools.partialmethod)):
327
f = f.func
328
329
330
return False
331
332
333
def markcoroutinefunction(func):
334
"""
335
Decorator to ensure callable is recognised as a coroutine function.
0 commit comments