Skip to content

Commit fa4729e

Browse files
committed
Fix typing.Coroutine import for earlier Python 3.5 versions
1 parent ed1d524 commit fa4729e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

saltyrtc/server/events.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
try:
1212
from typing import Coroutine
1313
except ImportError:
14-
# noinspection PyUnresolvedReferences,PyPackageRequirements
15-
from backports_abc import Coroutine
14+
try:
15+
from collections.abc import Coroutine # Python 3.5
16+
except ImportError:
17+
# noinspection PyUnresolvedReferences,PyPackageRequirements
18+
from backports_abc import Coroutine # Python 3.4
1619

1720
__all__ = (
1821
'DisconnectedData',

0 commit comments

Comments
 (0)