summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-07-25 00:43:31 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-07-25 00:43:31 (GMT)
commit389e3d768d8f5bd312476db795f6432651bc656b (patch)
treee97e07d562b934dd0b4159ddb3d26203e0f7908a /Lib/asyncio/events.py
parent71f70b8f1a87ee3fc2750776eb24d8c906884f84 (diff)
parenteaf16abc68a09e2d976c37e34eb606f5b519f7ea (diff)
downloadcpython-389e3d768d8f5bd312476db795f6432651bc656b.zip
cpython-389e3d768d8f5bd312476db795f6432651bc656b.tar.gz
cpython-389e3d768d8f5bd312476db795f6432651bc656b.tar.bz2
Merge 3.4
Diffstat (limited to 'Lib/asyncio/events.py')
-rw-r--r--Lib/asyncio/events.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py
index 496075b..d5f0d45 100644
--- a/Lib/asyncio/events.py
+++ b/Lib/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