roxma / nvim-yarp

Yet Another Remote Plugin Framework for Neovim
MIT License
230 stars 14 forks source link

ValueError: request got unsupported keyword argument(s): async_ #20

Closed asymmetric closed 6 years ago

asymmetric commented 6 years ago

When opening any file:

[ncm2_core@yarp] error caught in notification handler 'on_warmup [{'subscope_detectors': {}, 'sources': {}, 'filter': [], 'complete_length': [[1, 4], [7, 3]], 'popup_limit': -1, 'context': {'
lnum': 1, 'filepath': '/home/asymmetric/code/dapphub/k/repo.nix', 'tick': [[0, 1, 1], 0], 'scope_level': 1, 'curpos': [0, 1, 1, 0, 1], 'ccol': 1, 'bufnr': 5, 'context_id': 59, 'typed': '', 'f
iletype': 'nix', 'bcol': 1, 'changedtick': 2, 'scope': 'nix'}, 'matcher': 'abbrfuzzy', 'auto_popup': 1, 'lines': [], 'sorter': 'abbrfuzzy'}]'
[ncm2_core@yarp] Traceback (most recent call last):
[ncm2_core@yarp]   File "/home/asymmetric/.vim/plugged/nvim-yarp/pythonx/yarp.py", line 30, in on_notification
[ncm2_core@yarp]     getattr(module_obj, method)(*args)
[ncm2_core@yarp]   File "/home/asymmetric/.vim/plugged/ncm2/pythonx/ncm2_core.py", line 273, in on_warmup
[ncm2_core@yarp]     self.notify('ncm2#_warmup_sources', data['context'], warmups)
[ncm2_core@yarp]   File "/home/asymmetric/.vim/plugged/ncm2/pythonx/ncm2_core.py", line 45, in notify
[ncm2_core@yarp]     self.nvim.call(method, *args, async_=True)
[ncm2_core@yarp]   File "/home/asymmetric/.local/lib/python3.5/site-packages/neovim/api/nvim.py", line 230, in call
[ncm2_core@yarp]     return self.request('nvim_call_function', name, args, **kwargs)
[ncm2_core@yarp]   File "/home/asymmetric/.local/lib/python3.5/site-packages/neovim/api/nvim.py", line 131, in request
[ncm2_core@yarp]     res = self._session.request(name, *args, **kwargs)
[ncm2_core@yarp]   File "/home/asymmetric/.local/lib/python3.5/site-packages/neovim/msgpack_rpc/session.py", line 86, in request
[ncm2_core@yarp]     .format(', '.join(kwargs.keys())))
[ncm2_core@yarp] ValueError: request got unsupported keyword argument(s): async_
❯ vim --version
NVIM v0.3.2-dev
Build type: RelWithDebInfo
Lua 5.1
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-D0KcfM/neovim-0.3.0~ubuntu1+git201807242033-72ddbb6-479a1d0=. -fstack-protector-strong -Wformat -Werror=format-security -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -DMIN_LOG_LEVEL=3 -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim-D0KcfM/neovim-0.3.0~ubuntu1+git201807242033-72ddbb6-479a1d0/build/config -I/build/neovim-D0KcfM/neovim-0.3.0~ubuntu1+git201807242033-72ddbb6-479a1d0/src -I/build/neovim-D0KcfM/neovim-0.3.0~ubuntu1+git201807242033-72ddbb6-479a1d0/.deps/usr/include -I/usr/include -I/build/neovim-D0KcfM/neovim-0.3.0~ubuntu1+git201807242033-72ddbb6-479a1d0/build/src/nvim/auto -I/build/neovim-D0KcfM/neovim-0.3.0~ubuntu1+git201807242033-72ddbb6-479a1d0/build/include
Compiled by buildd@lgw01-amd64-057
Features: +acl +iconv +jemalloc +tui
See ":help feature-compile"
   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
roxma commented 6 years ago

Please upgrade neovim python client to the latest version.

mpeaton commented 5 years ago

async_ keyword is unsupported?

roxma commented 5 years ago

@mpeaton

On older neovim client library, nvim.call used to accept nvim.call(async=). The argument name async= is renamed to async_= since python3 has async as keyword. This plugin follows latest pynvim, which means argument async_= does not work with older pynvim.