Skip to content

Commit 13dd359

Browse files
committed
fix
1 parent 39d6608 commit 13dd359

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/asyncio/events.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@
2222

2323

2424
def _get_function_source(func):
25-
if hasattr(func, '__wrapped__'):
26-
func = func.__wrapped__
25+
func = inspect.unwrap(func)
2726
if inspect.isfunction(func):
2827
code = func.__code__
2928
return (code.co_filename, code.co_firstlineno)
3029
if isinstance(func, functools.partial):
3130
return _get_function_source(func.func)
31+
if isinstance(func, functools.partialmethod):
32+
return _get_function_source(func.func)
3233
return None
3334

3435

0 commit comments

Comments
 (0)