From c165783367703d8a61b9a0f2b32f20c244ef567b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9lio=20Meira=20Lins?= Date: Fri, 6 Jan 2017 19:02:36 -0300 Subject: [PATCH 1/3] Fix #88: conform to new pyuv API --- neovim/msgpack_rpc/event_loop/uv.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/neovim/msgpack_rpc/event_loop/uv.py b/neovim/msgpack_rpc/event_loop/uv.py index 449d28ea..6a912c27 100644 --- a/neovim/msgpack_rpc/event_loop/uv.py +++ b/neovim/msgpack_rpc/event_loop/uv.py @@ -73,12 +73,11 @@ def _connect_child(self, argv): flags=pyuv.UV_CREATE_PIPE + pyuv.UV_WRITABLE_PIPE) stderr = pyuv.StdIO(self._error_stream, flags=pyuv.UV_CREATE_PIPE + pyuv.UV_WRITABLE_PIPE) - self._process = pyuv.Process(self._loop) - self._process.spawn(file=argv[0], - exit_callback=self._on_exit, - args=argv[1:], - flags=pyuv.UV_PROCESS_WINDOWS_HIDE, - stdio=(stdin, stdout, stderr,)) + pyuv.Process.spawn(self._loop, + args=argv, + exit_callback=self._on_exit, + flags=pyuv.UV_PROCESS_WINDOWS_HIDE, + stdio=(stdin, stdout, stderr,)) self._error_stream.start_read(self._on_read) def _start_reading(self): From 7e64fd77ec7b81020e8002c15b85216e961a9e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9lio=20Meira=20Lins?= Date: Sat, 7 Jan 2017 18:12:28 -0300 Subject: [PATCH 2/3] require pyuv>1.0 in windows --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9d8b87fa..031b2a17 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ ] if os.name == 'nt': - install_requires.append('pyuv') + install_requires.append('pyuv>=1.0.0') elif sys.version_info < (3, 4): # trollius is just a backport of 3.4 asyncio module install_requires.append('trollius') From bffbdb6e1024c49c31e0bc40829a37edc0d319fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9lio=20Meira=20Lins?= Date: Sat, 7 Jan 2017 18:14:47 -0300 Subject: [PATCH 3/3] add extras_require for pyuv Now it's possible to: `pip install neovim[pyuv]` --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index 031b2a17..a1865318 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,9 @@ install_requires = [ 'msgpack-python>=0.4.0', ] +extras_require = { + 'pyuv': ['pyuv>=1.0.0'], +} if os.name == 'nt': install_requires.append('pyuv>=1.0.0') @@ -29,4 +32,5 @@ packages=['neovim', 'neovim.api', 'neovim.msgpack_rpc', 'neovim.msgpack_rpc.event_loop', 'neovim.plugin'], install_requires=install_requires, + extras_require=extras_require, zip_safe=False)