diff options
Diffstat (limited to 'asyncio/events.py')
-rw-r--r-- | asyncio/events.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/asyncio/events.py b/asyncio/events.py index 496075b..d5f0d45 100644 --- a/asyncio/events.py +++ b/asyncio/events.py @@ -17,12 +17,11 @@ import sys import threading import traceback - -_PY34 = sys.version_info >= (3, 4) +from asyncio import compat def _get_function_source(func): - if _PY34: + if compat.PY34: func = inspect.unwrap(func) elif hasattr(func, '__wrapped__'): func = func.__wrapped__ @@ -31,7 +30,7 @@ def _get_function_source(func): return (code.co_filename, code.co_firstlineno) if isinstance(func, functools.partial): return _get_function_source(func.func) - if _PY34 and isinstance(func, functools.partialmethod): + if compat.PY34 and isinstance(func, functools.partialmethod): return _get_function_source(func.func) return None |