mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-94912: Adjusted check for non-standard coroutine function marker. (#100935)
The initial implementation did not correctly identify explicitly
marked class instances.
Follow up to 532aa4e4e0
This commit is contained in:
parent
6e4e14d98f
commit
07a87f74fa
2 changed files with 8 additions and 2 deletions
|
@ -399,8 +399,6 @@ def _has_coroutine_mark(f):
|
|||
while ismethod(f):
|
||||
f = f.__func__
|
||||
f = functools._unwrap_partial(f)
|
||||
if not (isfunction(f) or _signature_is_functionlike(f)):
|
||||
return False
|
||||
return getattr(f, "_is_coroutine_marker", None) is _is_coroutine_marker
|
||||
|
||||
def markcoroutinefunction(func):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue