File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
CHANGES
2
2
=======
3
3
4
+ 2.0.1 (2018-03-13)
5
+ ------------------
6
+
7
+ * Fix ``PendingDeprecationWarning `` on Python 3.7 (#33)
8
+
9
+
4
10
2.0.0 (2017-10-09)
5
11
------------------
6
12
Original file line number Diff line number Diff line change 1
1
import asyncio
2
+ import sys
2
3
3
4
4
- __version__ = '2.0.0'
5
+ __version__ = '2.0.1'
6
+
7
+ PY_37 = sys .version_info >= (3 , 7 )
5
8
6
9
7
10
class timeout :
@@ -89,8 +92,12 @@ def _cancel_task(self):
89
92
90
93
91
94
def current_task (loop ):
92
- task = asyncio .Task .current_task (loop = loop )
95
+ if PY_37 :
96
+ task = asyncio .current_task (loop = loop )
97
+ else :
98
+ task = asyncio .Task .current_task (loop = loop )
93
99
if task is None :
100
+ # this should be removed, tokio must use register_task and family API
94
101
if hasattr (loop , 'current_task' ):
95
102
task = loop .current_task ()
96
103
You can’t perform that action at this time.
0 commit comments