diff options
Diffstat (limited to 'Lib/asyncio/events.py')
-rw-r--r-- | Lib/asyncio/events.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py index e85634e..6af9137 100644 --- a/Lib/asyncio/events.py +++ b/Lib/asyncio/events.py @@ -19,20 +19,15 @@ import sys import threading import traceback -from asyncio import compat - def _get_function_source(func): - if compat.PY34: - func = inspect.unwrap(func) - elif hasattr(func, '__wrapped__'): - func = func.__wrapped__ + func = inspect.unwrap(func) if inspect.isfunction(func): code = func.__code__ return (code.co_filename, code.co_firstlineno) if isinstance(func, functools.partial): return _get_function_source(func.func) - if compat.PY34 and isinstance(func, functools.partialmethod): + if isinstance(func, functools.partialmethod): return _get_function_source(func.func) return None |