Skip to content

Commit 171d137

Browse files
heliomeiralinsjustinmk
authored andcommitted
event_loop/uv.py: Conform to pyuv 1.0 API (#240)
Closes #88 * Specify minimum pyuv version where possible. * Add extras_require for pyuv. `pip install neovim[pyuv]`
1 parent 549f721 commit 171d137

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

neovim/msgpack_rpc/event_loop/uv.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,11 @@ def _connect_child(self, argv):
7373
flags=pyuv.UV_CREATE_PIPE + pyuv.UV_WRITABLE_PIPE)
7474
stderr = pyuv.StdIO(self._error_stream,
7575
flags=pyuv.UV_CREATE_PIPE + pyuv.UV_WRITABLE_PIPE)
76-
self._process = pyuv.Process(self._loop)
77-
self._process.spawn(file=argv[0],
78-
exit_callback=self._on_exit,
79-
args=argv[1:],
80-
flags=pyuv.UV_PROCESS_WINDOWS_HIDE,
81-
stdio=(stdin, stdout, stderr,))
76+
pyuv.Process.spawn(self._loop,
77+
args=argv,
78+
exit_callback=self._on_exit,
79+
flags=pyuv.UV_PROCESS_WINDOWS_HIDE,
80+
stdio=(stdin, stdout, stderr,))
8281
self._error_stream.start_read(self._on_read)
8382

8483
def _start_reading(self):

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
install_requires = [
88
'msgpack-python>=0.4.0',
99
]
10+
extras_require = {
11+
'pyuv': ['pyuv>=1.0.0'],
12+
}
1013

1114
if os.name == 'nt':
12-
install_requires.append('pyuv')
15+
install_requires.append('pyuv>=1.0.0')
1316
elif sys.version_info < (3, 4):
1417
# trollius is just a backport of 3.4 asyncio module
1518
install_requires.append('trollius')
@@ -29,4 +32,5 @@
2932
packages=['neovim', 'neovim.api', 'neovim.msgpack_rpc',
3033
'neovim.msgpack_rpc.event_loop', 'neovim.plugin'],
3134
install_requires=install_requires,
35+
extras_require=extras_require,
3236
zip_safe=False)

0 commit comments

Comments
 (0)