Skip to content

Commit 42b6e18

Browse files
authored
event loop: disable asyncio on nt for now (#308)
1 parent a59234c commit 42b6e18

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

neovim/api/nvim.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def __init__(self, session, channel_id, metadata, types,
9797
self._err_cb = err_cb
9898

9999
# only on python3.4+ we expose asyncio
100-
if IS_PYTHON3:
100+
if IS_PYTHON3 and os.name != 'nt':
101101
self.loop = self._session.loop._loop
102102

103103
def _from_nvim(self, obj, decode=None):

neovim/msgpack_rpc/event_loop/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
Tries to use pyuv as a backend, falling back to the asyncio implementation.
44
"""
55

6+
import os
7+
68
from ...compat import IS_PYTHON3
79

810
# on python3 we only support asyncio, as we expose it to plugins
9-
if IS_PYTHON3:
11+
if IS_PYTHON3 and os.name != 'nt':
1012
from .asyncio import AsyncioEventLoop
1113
EventLoop = AsyncioEventLoop
1214
else:

setup.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
'msgpack>=0.5.0',
99
]
1010

11-
if sys.version_info < (3, 4):
12-
if os.name == 'nt':
13-
install_requires.append('pyuv>=1.0.0')
14-
else:
15-
# trollius is just a backport of 3.4 asyncio module
16-
install_requires.append('trollius')
11+
if os.name == 'nt':
12+
install_requires.append('pyuv>=1.0.0')
13+
elif sys.version_info < (3, 4):
14+
# trollius is just a backport of 3.4 asyncio module
15+
install_requires.append('trollius')
1716

1817
if platform.python_implementation() != 'PyPy':
1918
# pypy already includes an implementation of the greenlet module

0 commit comments

Comments
 (0)