Skip to content

Instantly share code, notes, and snippets.

@liuchengxu
Created October 15, 2017 04:23
Show Gist options
  • Save liuchengxu/c952ec5bb086634d50d8475062ebebce to your computer and use it in GitHub Desktop.
Save liuchengxu/c952ec5bb086634d50d8475062ebebce to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
2017-10-15 12:10:55,805 [INFO @ cm_start.py:main:47] 30760 - start_channel for cm_core
2017-10-15 12:10:55,814 [INFO @ cm.py:setup_neovim:165] 30760 - connecting to neovim server: /var/folders/f3/l0x65b_j2c90lr5g6d_0y6x80000gn/T/nvim0n5GDK/0
2017-10-15 12:10:55,815 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 1, b'vim_get_api_info', ()]
2017-10-15 12:10:55,816 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x01\xb0vim_get_api_info\x90''
2017-10-15 12:10:55,816 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,817 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,818 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,818 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,818 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,818 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,818 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 1, None, [3, {b'types': {b'Window': {b'prefix': b'nvim_win_', b'id': 1}, b'Buffer': {b'prefix': b'nvim_buf_', b'id': 0}, b'Tabpage': {b'prefix': b'nvim_tabpage_', b'id': 2}}, b'version': {b'api_compatible': 0, b'api_level': 2, b'api_prerelease': False, b'minor': 2, b'patch': 0, b'major': 0}, b'functions': [{b'since': 1, b'method': True, b'name': b'nvim_buf_line_count', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'method': False, b'name': b'buffer_get_line', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_set_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index'], [b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_get_line_slice', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'return_type': b'ArrayOf(String)'}, {b'method': False, b'name': b'buffer_set_line_slice', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 2, b'method': True, b'name': b'nvim_buf_get_changedtick', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_del_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'buffer_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'method': True, b'name': b'nvim_buf_get_number', b'return_type': b'Integer', b'since': 1, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 2}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_name', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'String'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_name', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_is_valid', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Boolean'}, {b'method': False, b'name': b'buffer_insert', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'lnum'], [b'ArrayOf(String)', b'lines']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_mark', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_add_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_clear_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_list_wins', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_set_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_del_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'tabpage_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'tabpage_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_win', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Window'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_number', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_is_valid', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Boolean'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_attach', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Dictionary', b'options']], b'return_type': b'void'}, {b'method': False, b'name': b'ui_attach', b'return_type': b'void', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Boolean', b'enable_rgb']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_ui_detach', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_try_resize', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_command', b'parameters': [[b'String', b'command']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_feedkeys', b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_input', b'parameters': [[b'String', b'keys']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_replace_termcodes', b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_command_output', b'parameters': [[b'String', b'str']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_eval', b'parameters': [[b'String', b'expr']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_call_function', b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_strwidth', b'parameters': [[b'String', b'str']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_list_runtime_paths', b'parameters': [], b'return_type': b'ArrayOf(String)'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_dir', b'parameters': [[b'String', b'dir']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_line', b'parameters': [], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_line', b'parameters': [[b'String', b'line']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_current_line', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_var', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_var', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_var', b'parameters': [[b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'vim_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_get_vvar', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_get_option', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_out_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_writeln', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_bufs', b'parameters': [], b'return_type': b'ArrayOf(Buffer)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_buf', b'parameters': [], b'return_type': b'Buffer'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_buf', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_wins', b'parameters': [], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_win', b'parameters': [], b'return_type': b'Window'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_win', b'parameters': [[b'Window', b'window']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_tabpages', b'parameters': [], b'return_type': b'ArrayOf(Tabpage)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_tabpage', b'parameters': [], b'return_type': b'Tabpage'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_tabpage', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_subscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_unsubscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_by_name', b'parameters': [[b'String', b'name']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_map', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 2, b'method': False, b'name': b'nvim_get_mode', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 1, b'method': False, b'name': b'nvim_get_api_info', b'parameters': [], b'return_type': b'Array'}, {b'since': 1, b'method': False, b'name': b'nvim_call_atomic', b'parameters': [[b'Array', b'calls']], b'return_type': b'Array'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_buf', b'parameters': [[b'Window', b'window']], b'return_type': b'Buffer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_cursor', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_cursor', b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_height', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_height', b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_width', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_width', b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_var', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_del_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'window_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'window_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_option', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_option', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_position', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_tabpage', b'parameters': [[b'Window', b'window']], b'return_type': b'Tabpage'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_number', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_is_valid', b'parameters': [[b'Window', b'window']], b'return_type': b'Boolean'}, {b'method': True, b'name': b'buffer_line_count', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_lines', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_lines', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_number', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_name', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_name', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_mark', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_add_highlight', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_clear_highlight', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_window', b'return_type': b'Window', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_detach', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_try_resize', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'command']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_feedkeys', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_input', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'keys']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_replace_termcodes', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command_output', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_eval', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'expr']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_call_function', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_strwidth', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_list_runtime_paths', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_change_directory', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'dir']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_line', b'return_type': b'String', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_current_line', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_vvar', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_out_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_err_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_report_error', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_buffers', b'return_type': b'ArrayOf(Buffer)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_buffer', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_window', b'return_type': b'Window', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_window', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_tabpages', b'return_type': b'ArrayOf(Tabpage)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_tabpage', b'return_type': b'void', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_subscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_unsubscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_name_to_color', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_color_map', b'return_type': b'Dictionary', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_api_info', b'return_type': b'Array', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_cursor', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_cursor', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_height', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_height', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_width', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_width', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_position', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}], b'error_types': {b'Validation': {b'id': 1}, b'Exception': {b'id': 0}}}]]
2017-10-15 12:10:55,819 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, [3, {b'types': {b'Window': {b'prefix': b'nvim_win_', b'id': 1}, b'Buffer': {b'prefix': b'nvim_buf_', b'id': 0}, b'Tabpage': {b'prefix': b'nvim_tabpage_', b'id': 2}}, b'version': {b'api_compatible': 0, b'api_level': 2, b'api_prerelease': False, b'minor': 2, b'patch': 0, b'major': 0}, b'functions': [{b'since': 1, b'method': True, b'name': b'nvim_buf_line_count', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'method': False, b'name': b'buffer_get_line', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_set_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index'], [b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_get_line_slice', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'return_type': b'ArrayOf(String)'}, {b'method': False, b'name': b'buffer_set_line_slice', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 2, b'method': True, b'name': b'nvim_buf_get_changedtick', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_del_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'buffer_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'method': True, b'name': b'nvim_buf_get_number', b'return_type': b'Integer', b'since': 1, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 2}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_name', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'String'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_name', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_is_valid', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Boolean'}, {b'method': False, b'name': b'buffer_insert', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'lnum'], [b'ArrayOf(String)', b'lines']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_mark', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_add_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_clear_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_list_wins', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_set_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_del_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'tabpage_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'tabpage_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_win', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Window'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_number', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_is_valid', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Boolean'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_attach', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Dictionary', b'options']], b'return_type': b'void'}, {b'method': False, b'name': b'ui_attach', b'return_type': b'void', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Boolean', b'enable_rgb']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_ui_detach', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_try_resize', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_command', b'parameters': [[b'String', b'command']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_feedkeys', b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_input', b'parameters': [[b'String', b'keys']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_replace_termcodes', b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_command_output', b'parameters': [[b'String', b'str']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_eval', b'parameters': [[b'String', b'expr']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_call_function', b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_strwidth', b'parameters': [[b'String', b'str']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_list_runtime_paths', b'parameters': [], b'return_type': b'ArrayOf(String)'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_dir', b'parameters': [[b'String', b'dir']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_line', b'parameters': [], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_line', b'parameters': [[b'String', b'line']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_current_line', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_var', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_var', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_var', b'parameters': [[b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'vim_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_get_vvar', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_get_option', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_out_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_writeln', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_bufs', b'parameters': [], b'return_type': b'ArrayOf(Buffer)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_buf', b'parameters': [], b'return_type': b'Buffer'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_buf', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_wins', b'parameters': [], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_win', b'parameters': [], b'return_type': b'Window'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_win', b'parameters': [[b'Window', b'window']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_tabpages', b'parameters': [], b'return_type': b'ArrayOf(Tabpage)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_tabpage', b'parameters': [], b'return_type': b'Tabpage'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_tabpage', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_subscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_unsubscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_by_name', b'parameters': [[b'String', b'name']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_map', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 2, b'method': False, b'name': b'nvim_get_mode', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 1, b'method': False, b'name': b'nvim_get_api_info', b'parameters': [], b'return_type': b'Array'}, {b'since': 1, b'method': False, b'name': b'nvim_call_atomic', b'parameters': [[b'Array', b'calls']], b'return_type': b'Array'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_buf', b'parameters': [[b'Window', b'window']], b'return_type': b'Buffer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_cursor', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_cursor', b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_height', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_height', b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_width', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_width', b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_var', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_del_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'window_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'window_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_option', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_option', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_position', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_tabpage', b'parameters': [[b'Window', b'window']], b'return_type': b'Tabpage'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_number', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_is_valid', b'parameters': [[b'Window', b'window']], b'return_type': b'Boolean'}, {b'method': True, b'name': b'buffer_line_count', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_lines', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_lines', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_number', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_name', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_name', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_mark', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_add_highlight', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_clear_highlight', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_window', b'return_type': b'Window', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_detach', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_try_resize', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'command']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_feedkeys', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_input', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'keys']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_replace_termcodes', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command_output', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_eval', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'expr']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_call_function', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_strwidth', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_list_runtime_paths', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_change_directory', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'dir']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_line', b'return_type': b'String', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_current_line', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_vvar', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_out_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_err_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_report_error', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_buffers', b'return_type': b'ArrayOf(Buffer)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_buffer', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_window', b'return_type': b'Window', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_window', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_tabpages', b'return_type': b'ArrayOf(Tabpage)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_tabpage', b'return_type': b'void', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_subscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_unsubscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_name_to_color', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_color_map', b'return_type': b'Dictionary', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_api_info', b'return_type': b'Array', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_cursor', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_cursor', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_height', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_height', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_width', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_width', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_position', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}], b'error_types': {b'Validation': {b'id': 1}, b'Exception': {b'id': 0}}}]
2017-10-15 12:10:55,820 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,820 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,820 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,820 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,825 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 2, 'nvim_eval', ('globpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)',)]
2017-10-15 12:10:55,825 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x02\xa9nvim_eval\x91\xda\x00Fglobpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)''
2017-10-15 12:10:55,825 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,826 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,826 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 2, None, b'/tmp/plugged/nvim-completion-manager/pythonx\n']
2017-10-15 12:10:55,826 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b'/tmp/plugged/nvim-completion-manager/pythonx\n'
2017-10-15 12:10:55,826 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,826 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,826 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,826 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,839 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 3, 'nvim_get_var', ('cm_completed_snippet_engine',)]
2017-10-15 12:10:55,839 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x03\xacnvim_get_var\x91\xbbcm_completed_snippet_engine''
2017-10-15 12:10:55,839 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,839 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,839 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 3, None, b'']
2017-10-15 12:10:55,839 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b''
2017-10-15 12:10:55,839 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,839 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,839 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,839 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,840 [INFO @ cm.py:start_and_run_channel:199] 30760 - starting core, enter event loop
2017-10-15 12:10:55,840 [INFO @ cm.py:start_and_run_channel:275] 30760 - <cm_core> entering event loop
2017-10-15 12:10:55,840 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_setup, args: []
2017-10-15 12:10:55,840 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#_core_channel_started', [3])]
2017-10-15 12:10:55,840 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xb8cm#_core_channel_started\x91\x03''
2017-10-15 12:10:55,840 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 4, 'nvim_get_var', ('_cm_servername',)]
2017-10-15 12:10:55,840 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x04\xacnvim_get_var\x91\xae_cm_servername''
2017-10-15 12:10:55,840 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1031e9340> to wait for response
2017-10-15 12:10:55,841 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,841 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,841 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]]
2017-10-15 12:10:55,841 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,841 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x1031e9470> will handle it
2017-10-15 12:10:55,841 [INFO @ cm.py:on_notification:238] 30760 - delay notification handling, method[cm_start_channels]
2017-10-15 12:10:55,841 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x1031e9470> finished executing
2017-10-15 12:10:55,841 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x1031e9470> is now dying...
2017-10-15 12:10:55,841 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,841 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 4, None, b'/var/folders/f3/l0x65b_j2c90lr5g6d_0y6x80000gn/T/nvim0n5GDK/0']
2017-10-15 12:10:55,841 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b'/var/folders/f3/l0x65b_j2c90lr5g6d_0y6x80000gn/T/nvim0n5GDK/0'
2017-10-15 12:10:55,841 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1031e9340>, switching back
2017-10-15 12:10:55,842 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 5, 'nvim_get_var', ('_cm_start_py_path',)]
2017-10-15 12:10:55,842 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x05\xacnvim_get_var\x91\xb1_cm_start_py_path''
2017-10-15 12:10:55,842 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1031e9340> to wait for response
2017-10-15 12:10:55,842 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,842 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,842 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,842 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 5, None, b'/tmp/plugged/nvim-completion-manager/pythonx/cm_start.py']
2017-10-15 12:10:55,842 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b'/tmp/plugged/nvim-completion-manager/pythonx/cm_start.py'
2017-10-15 12:10:55,842 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1031e9340>, switching back
2017-10-15 12:10:55,842 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 6, 'nvim_get_var', ('_cm_py3',)]
2017-10-15 12:10:55,842 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x06\xacnvim_get_var\x91\xa7_cm_py3''
2017-10-15 12:10:55,842 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1031e9340> to wait for response
2017-10-15 12:10:55,842 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,842 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,843 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,843 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 6, None, b'/Users/xlc/anaconda3/bin/python3']
2017-10-15 12:10:55,843 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b'/Users/xlc/anaconda3/bin/python3'
2017-10-15 12:10:55,843 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1031e9340>, switching back
2017-10-15 12:10:55,843 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 7, 'nvim_eval', ("get(g:,'python_host_prog','python2')",)]
2017-10-15 12:10:55,843 [DEBUG @ base.py:send:113] 30760 - Sending 'b"\x94\x00\x07\xa9nvim_eval\x91\xda\x00$get(g:,'python_host_prog','python2')"'
2017-10-15 12:10:55,843 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1031e9340> to wait for response
2017-10-15 12:10:55,843 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,843 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,843 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,843 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 7, None, b'python2']
2017-10-15 12:10:55,843 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b'python2'
2017-10-15 12:10:55,843 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1031e9340>, switching back
2017-10-15 12:10:55,843 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 8, 'nvim_get_var', ('cm_complete_popup_delay',)]
2017-10-15 12:10:55,843 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x08\xacnvim_get_var\x91\xb7cm_complete_popup_delay''
2017-10-15 12:10:55,843 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1031e9340> to wait for response
2017-10-15 12:10:55,844 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,844 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,844 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,844 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 8, None, 50]
2017-10-15 12:10:55,844 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, 50
2017-10-15 12:10:55,844 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1031e9340>, switching back
2017-10-15 12:10:55,844 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 9, 'nvim_get_var', ('cm_completed_snippet_enable',)]
2017-10-15 12:10:55,844 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\t\xacnvim_get_var\x91\xbbcm_completed_snippet_enable''
2017-10-15 12:10:55,844 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1031e9340> to wait for response
2017-10-15 12:10:55,844 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,844 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,845 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,845 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 9, None, 0]
2017-10-15 12:10:55,845 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, 0
2017-10-15 12:10:55,845 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1031e9340>, switching back
2017-10-15 12:10:55,845 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 10, 'nvim_get_var', ('cm_completed_snippet_engine',)]
2017-10-15 12:10:55,845 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\n\xacnvim_get_var\x91\xbbcm_completed_snippet_engine''
2017-10-15 12:10:55,845 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1031e9340> to wait for response
2017-10-15 12:10:55,845 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,845 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,845 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,845 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 10, None, b'']
2017-10-15 12:10:55,845 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b''
2017-10-15 12:10:55,845 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1031e9340>, switching back
2017-10-15 12:10:55,845 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 11, 'nvim_get_var', ('cm_multi_threading',)]
2017-10-15 12:10:55,845 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x0b\xacnvim_get_var\x91\xb2cm_multi_threading''
2017-10-15 12:10:55,846 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1031e9340> to wait for response
2017-10-15 12:10:55,846 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,846 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,846 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,846 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 11, None, 1]
2017-10-15 12:10:55,846 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, 1
2017-10-15 12:10:55,846 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1031e9340>, switching back
2017-10-15 12:10:55,846 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 12, 'nvim_eval', ('globpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)',)]
2017-10-15 12:10:55,846 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x0c\xa9nvim_eval\x91\xda\x00Fglobpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)''
2017-10-15 12:10:55,846 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1031e9340> to wait for response
2017-10-15 12:10:55,848 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,848 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,849 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,849 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 12, None, b'/tmp/plugged/nvim-completion-manager/pythonx\n']
2017-10-15 12:10:55,849 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b'/tmp/plugged/nvim-completion-manager/pythonx\n'
2017-10-15 12:10:55,849 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1031e9340>, switching back
2017-10-15 12:10:55,849 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 13, 'nvim_eval', ("globpath(&rtp,'pythonx/cm_sources/*.py',1)",)]
2017-10-15 12:10:55,849 [DEBUG @ base.py:send:113] 30760 - Sending 'b"\x94\x00\r\xa9nvim_eval\x91\xda\x00*globpath(&rtp,'pythonx/cm_sources/*.py',1)"'
2017-10-15 12:10:55,849 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1031e9340> to wait for response
2017-10-15 12:10:55,849 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,849 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,849 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,850 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 13, None, b'/tmp/plugged/nvim-completion-manager/pythonx/cm_sources/cm_bufkeyword.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_sources/cm_filepath.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_sources/cm_gocode.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_sources/cm_jedi.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_sources/cm_keyword_continue.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_sources/cm_tags.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_sources/cm_tmux.py']
2017-10-15 12:10:55,850 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b'/tmp/plugged/nvim-completion-manager/pythonx/cm_sources/cm_bufkeyword.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_sources/cm_filepath.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_sources/cm_gocode.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_sources/cm_jedi.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_sources/cm_keyword_continue.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_sources/cm_tags.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_sources/cm_tmux.py'
2017-10-15 12:10:55,850 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1031e9340>, switching back
2017-10-15 12:10:55,852 [INFO @ cm_core.py:register_source:135] 30760 - registering source: {'enable': True, 'priority': 5, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3'}, 'abbreviation': 'Key', 'name': 'cm-bufkeyword'}
2017-10-15 12:10:55,852 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#register_source', [{'priority': 5, 'enable': True, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3'}, 'abbreviation': 'Key', 'name': 'cm-bufkeyword'}])]
2017-10-15 12:10:55,852 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xb2cm#register_source\x91\x85\xa8priority\x05\xa6enable\xc3\xa7channel\x83\xa6module\xb8cm_sources.cm_bufkeyword\xa6events\x92\xabInsertEnter\xa8BufEnter\xa4type\xa7python3\xacabbreviation\xa3Key\xa4name\xadcm-bufkeyword''
2017-10-15 12:10:55,852 [INFO @ cm_core.py:_detect_sources:149] 30760 - source <cm_sources.cm_bufkeyword> registered
2017-10-15 12:10:55,853 [INFO @ cm_core.py:register_source:135] 30760 - registering source: {'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'abbreviation': 'path', 'sort': 0, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3'}, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}
2017-10-15 12:10:55,853 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#register_source', [{'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'abbreviation': 'path', 'enable': True, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3'}, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}])]
2017-10-15 12:10:55,853 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xb2cm#register_source\x91\x89\xacword_pattern\xb0([^\\W]|[-.~%$])+\xa8priority\x06\xa4name\xabcm-filepath\xacabbreviation\xa4path\xa6enable\xc3\xb3cm_refresh_patterns\x92\xbc(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)\xbc([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+\xa4sort\x00\xa7channel\x83\xa6module\xb6cm_sources.cm_filepath\xa6events\x90\xa4type\xa7python3\xa7options\x81\xacpath_pattern\xb8(([^\\W]|[-.~%$]|[/\\\\])+)''
2017-10-15 12:10:55,853 [INFO @ cm_core.py:_detect_sources:149] 30760 - source <cm_sources.cm_filepath> registered
2017-10-15 12:10:55,855 [INFO @ cm_core.py:register_source:135] 30760 - registering source: {'word_pattern': '[\\w/]+', 'early_cache': 1, 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3'}, 'cm_refresh_patterns': ['\\.']}
2017-10-15 12:10:55,855 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#register_source', [{'word_pattern': '[\\w/]+', 'early_cache': 1, 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3'}, 'cm_refresh_patterns': ['\\.']}])]
2017-10-15 12:10:55,855 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xb2cm#register_source\x91\x8a\xacword_pattern\xa6[\\w/]+\xabearly_cache\x01\xa8priority\t\xa4name\xa9cm-gocode\xacabbreviation\xa2Go\xa7scoping\xc3\xa6scopes\x91\xa2go\xa6enable\xc3\xa7channel\x83\xa6module\xb4cm_sources.cm_gocode\xa6events\x90\xa4type\xa7python3\xb3cm_refresh_patterns\x91\xa2\\.''
2017-10-15 12:10:55,855 [INFO @ cm_core.py:_detect_sources:149] 30760 - source <cm_sources.cm_gocode> registered
2017-10-15 12:10:55,857 [INFO @ cm_core.py:register_source:135] 30760 - registering source: {'priority': 9, 'name': 'cm-jedi', 'abbreviation': 'Py', 'scoping': True, 'scopes': ['python'], 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?']}
2017-10-15 12:10:55,857 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#register_source', [{'scoping': True, 'name': 'cm-jedi', 'abbreviation': 'Py', 'priority': 9, 'scopes': ['python'], 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?']}])]
2017-10-15 12:10:55,857 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xb2cm#register_source\x91\x88\xa7scoping\xc3\xa4name\xa7cm-jedi\xacabbreviation\xa2Py\xa8priority\t\xa6scopes\x91\xa6python\xa6enable\xc3\xa7channel\x84\xa6module\xb2cm_sources.cm_jedi\xa6events\x90\xa4type\xa7python3\xacmulti_thread\x00\xb3cm_refresh_patterns\x94\xb2^(import|from).*\\s\xa2\\.\xa5\\(\\s?\xa4,\\s?''
2017-10-15 12:10:55,857 [INFO @ cm_core.py:_detect_sources:149] 30760 - source <cm_sources.cm_jedi> registered
2017-10-15 12:10:55,861 [INFO @ cm_core.py:register_source:135] 30760 - registering source: {'word_pattern': '\\w+', 'priority': 5, 'name': 'cm-keyword-continue', 'abbreviation': '', 'sort': 0, 'cm_refresh_length': 0, 'enable': True, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3'}, 'auto_popup': 0}
2017-10-15 12:10:55,861 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#register_source', [{'word_pattern': '\\w+', 'priority': 5, 'name': 'cm-keyword-continue', 'abbreviation': '', 'enable': True, 'cm_refresh_length': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3'}, 'auto_popup': 0}])]
2017-10-15 12:10:55,862 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xb2cm#register_source\x91\x89\xacword_pattern\xa3\\w+\xa8priority\x05\xa4name\xb3cm-keyword-continue\xacabbreviation\xa0\xa6enable\xc3\xb1cm_refresh_length\x00\xa4sort\x00\xa7channel\x83\xa6module\xbecm_sources.cm_keyword_continue\xa6events\x90\xa4type\xa7python3\xaaauto_popup\x00''
2017-10-15 12:10:55,863 [INFO @ cm_core.py:_detect_sources:149] 30760 - source <cm_sources.cm_keyword_continue> registered
2017-10-15 12:10:55,866 [INFO @ cm_core.py:register_source:135] 30760 - registering source: {'enable': True, 'priority': 6, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3'}, 'abbreviation': 'Tag', 'name': 'cm-tags'}
2017-10-15 12:10:55,867 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#register_source', [{'priority': 6, 'enable': True, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3'}, 'abbreviation': 'Tag', 'name': 'cm-tags'}])]
2017-10-15 12:10:55,867 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xb2cm#register_source\x91\x85\xa8priority\x06\xa6enable\xc3\xa7channel\x83\xa6module\xb2cm_sources.cm_tags\xa6events\x91\xa8WinEnter\xa4type\xa7python3\xacabbreviation\xa3Tag\xa4name\xa7cm-tags''
2017-10-15 12:10:55,867 [INFO @ cm_core.py:_detect_sources:149] 30760 - source <cm_sources.cm_tags> registered
2017-10-15 12:10:55,870 [INFO @ cm_core.py:register_source:135] 30760 - registering source: {'enable': True, 'priority': 4, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3'}, 'abbreviation': 'Tmux', 'name': 'cm-tmux'}
2017-10-15 12:10:55,870 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#register_source', [{'priority': 4, 'enable': True, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3'}, 'abbreviation': 'Tmux', 'name': 'cm-tmux'}])]
2017-10-15 12:10:55,871 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xb2cm#register_source\x91\x85\xa8priority\x04\xa6enable\xc3\xa7channel\x83\xa6module\xb2cm_sources.cm_tmux\xa6events\x94\xaaCursorHold\xabCursorHoldI\xabFocusGained\xa8BufEnter\xa4type\xa7python3\xacabbreviation\xa4Tmux\xa4name\xa7cm-tmux''
2017-10-15 12:10:55,871 [INFO @ cm_core.py:_detect_sources:149] 30760 - source <cm_sources.cm_tmux> registered
2017-10-15 12:10:55,872 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 14, 'nvim_eval', ("globpath(&rtp,'pythonx/cm_scopers/*.py',1)",)]
2017-10-15 12:10:55,872 [DEBUG @ base.py:send:113] 30760 - Sending 'b"\x94\x00\x0e\xa9nvim_eval\x91\xda\x00*globpath(&rtp,'pythonx/cm_scopers/*.py',1)"'
2017-10-15 12:10:55,872 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1031e9340> to wait for response
2017-10-15 12:10:55,873 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,873 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,874 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,874 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3'}}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]]
2017-10-15 12:10:55,874 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3'}}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,874 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x1031e9508> will handle it
2017-10-15 12:10:55,875 [INFO @ cm.py:on_notification:238] 30760 - delay notification handling, method[cm_start_channels]
2017-10-15 12:10:55,875 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x1031e9508> finished executing
2017-10-15 12:10:55,876 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x1031e9508> is now dying...
2017-10-15 12:10:55,876 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,876 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3'}}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3'}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]]
2017-10-15 12:10:55,876 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3'}}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3'}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,876 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x1031e9508> will handle it
2017-10-15 12:10:55,877 [INFO @ cm.py:on_notification:238] 30760 - delay notification handling, method[cm_start_channels]
2017-10-15 12:10:55,877 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x1031e9508> finished executing
2017-10-15 12:10:55,877 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x1031e9508> is now dying...
2017-10-15 12:10:55,877 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,877 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3'}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3'}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]]
2017-10-15 12:10:55,877 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3'}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3'}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,877 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x1031e9508> will handle it
2017-10-15 12:10:55,878 [INFO @ cm.py:on_notification:238] 30760 - delay notification handling, method[cm_start_channels]
2017-10-15 12:10:55,878 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x1031e9508> finished executing
2017-10-15 12:10:55,878 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x1031e9508> is now dying...
2017-10-15 12:10:55,878 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,878 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3'}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3'}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]]
2017-10-15 12:10:55,878 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3'}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3'}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,878 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x1031e9508> will handle it
2017-10-15 12:10:55,879 [INFO @ cm.py:on_notification:238] 30760 - delay notification handling, method[cm_start_channels]
2017-10-15 12:10:55,879 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x1031e9508> finished executing
2017-10-15 12:10:55,879 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x1031e9508> is now dying...
2017-10-15 12:10:55,879 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,879 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3'}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3'}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3'}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3'}, b'name': b'cm-keyword-continue'}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]]
2017-10-15 12:10:55,879 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3'}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3'}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3'}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3'}, b'name': b'cm-keyword-continue'}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,879 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x1031e9508> will handle it
2017-10-15 12:10:55,880 [INFO @ cm.py:on_notification:238] 30760 - delay notification handling, method[cm_start_channels]
2017-10-15 12:10:55,880 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x1031e9508> finished executing
2017-10-15 12:10:55,880 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x1031e9508> is now dying...
2017-10-15 12:10:55,880 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,880 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3'}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3'}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3'}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3'}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3'}}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]]
2017-10-15 12:10:55,880 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3'}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3'}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3'}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3'}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3'}}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,881 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x1031e9508> will handle it
2017-10-15 12:10:55,881 [INFO @ cm.py:on_notification:238] 30760 - delay notification handling, method[cm_start_channels]
2017-10-15 12:10:55,881 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x1031e9508> finished executing
2017-10-15 12:10:55,881 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x1031e9508> is now dying...
2017-10-15 12:10:55,881 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,881 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,882 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,882 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3'}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3'}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3'}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3'}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3'}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3'}}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]]
2017-10-15 12:10:55,882 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_start_channels', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3'}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3'}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3'}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3'}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3'}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3'}}}, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,882 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x1031e9508> will handle it
2017-10-15 12:10:55,882 [INFO @ cm.py:on_notification:238] 30760 - delay notification handling, method[cm_start_channels]
2017-10-15 12:10:55,883 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x1031e9508> finished executing
2017-10-15 12:10:55,883 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x1031e9508> is now dying...
2017-10-15 12:10:55,883 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,883 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 14, None, b'/tmp/plugged/nvim-completion-manager/pythonx/cm_scopers/html_scoper.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_scopers/markdown_scoper.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_scopers/rst_scoper.py']
2017-10-15 12:10:55,883 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b'/tmp/plugged/nvim-completion-manager/pythonx/cm_scopers/html_scoper.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_scopers/markdown_scoper.py\n/tmp/plugged/nvim-completion-manager/pythonx/cm_scopers/rst_scoper.py'
2017-10-15 12:10:55,883 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1031e9340>, switching back
2017-10-15 12:10:55,885 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 15, 'nvim_get_var', ('cm_completed_snippet_engine',)]
2017-10-15 12:10:55,885 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x0f\xacnvim_get_var\x91\xbbcm_completed_snippet_engine''
2017-10-15 12:10:55,885 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1031e9340> to wait for response
2017-10-15 12:10:55,885 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,885 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,885 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,885 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 15, None, b'']
2017-10-15 12:10:55,886 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b''
2017-10-15 12:10:55,886 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1031e9340>, switching back
2017-10-15 12:10:55,886 [INFO @ cm_core.py:_load_scopers:96] 30760 - scoper <cm_scopers.html_scoper> imported for html
2017-10-15 12:10:55,886 [INFO @ cm_core.py:_load_scopers:96] 30760 - scoper <cm_scopers.html_scoper> imported for xhtml
2017-10-15 12:10:55,886 [INFO @ cm_core.py:_load_scopers:96] 30760 - scoper <cm_scopers.html_scoper> imported for php
2017-10-15 12:10:55,886 [INFO @ cm_core.py:_load_scopers:96] 30760 - scoper <cm_scopers.html_scoper> imported for blade
2017-10-15 12:10:55,886 [INFO @ cm_core.py:_load_scopers:96] 30760 - scoper <cm_scopers.html_scoper> imported for jinja
2017-10-15 12:10:55,886 [INFO @ cm_core.py:_load_scopers:96] 30760 - scoper <cm_scopers.html_scoper> imported for jinja2
2017-10-15 12:10:55,886 [INFO @ cm_core.py:_load_scopers:96] 30760 - scoper <cm_scopers.html_scoper> imported for vue.html.javascript.css
2017-10-15 12:10:55,886 [INFO @ cm_core.py:_load_scopers:96] 30760 - scoper <cm_scopers.html_scoper> imported for vue
2017-10-15 12:10:55,888 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 16, 'nvim_get_var', ('cm_completed_snippet_engine',)]
2017-10-15 12:10:55,888 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x10\xacnvim_get_var\x91\xbbcm_completed_snippet_engine''
2017-10-15 12:10:55,888 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1031e9340> to wait for response
2017-10-15 12:10:55,888 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,888 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,888 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,888 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 16, None, b'']
2017-10-15 12:10:55,889 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b''
2017-10-15 12:10:55,889 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1031e9340>, switching back
2017-10-15 12:10:55,889 [INFO @ cm_core.py:_load_scopers:96] 30760 - scoper <cm_scopers.markdown_scoper> imported for markdown
2017-10-15 12:10:55,890 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 17, 'nvim_get_var', ('cm_completed_snippet_engine',)]
2017-10-15 12:10:55,890 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x11\xacnvim_get_var\x91\xbbcm_completed_snippet_engine''
2017-10-15 12:10:55,890 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1031e9340> to wait for response
2017-10-15 12:10:55,890 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,890 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,890 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,890 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 17, None, b'']
2017-10-15 12:10:55,890 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b''
2017-10-15 12:10:55,890 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1031e9340>, switching back
2017-10-15 12:10:55,890 [INFO @ cm_core.py:_load_scopers:96] 30760 - scoper <cm_scopers.rst_scoper> imported for rst
2017-10-15 12:10:55,890 [INFO @ cm_core.py:_load_scopers:101] 30760 - _subscope_detectors: {'php': [<cm_scopers.html_scoper.Scoper object at 0x103482f98>], 'blade': [<cm_scopers.html_scoper.Scoper object at 0x103482f98>], 'vue.html.javascript.css': [<cm_scopers.html_scoper.Scoper object at 0x103482f98>], 'jinja': [<cm_scopers.html_scoper.Scoper object at 0x103482f98>], 'rst': [<cm_scopers.rst_scoper.Scoper object at 0x1034842b0>], 'vue': [<cm_scopers.html_scoper.Scoper object at 0x103482f98>], 'html': [<cm_scopers.html_scoper.Scoper object at 0x103482f98>], 'xhtml': [<cm_scopers.html_scoper.Scoper object at 0x103482f98>], 'markdown': [<cm_scopers.markdown_scoper.Scoper object at 0x10344c550>], 'jinja2': [<cm_scopers.html_scoper.Scoper object at 0x103482f98>]}
2017-10-15 12:10:55,890 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_setup completed
2017-10-15 12:10:55,890 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_start_channels, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}}, {'typed': '', 'bufnr': 1, 'lnum': 1, 'filetype': 'go', 'col': 1, 'changedtick': 3, 'curpos': [0, 1, 1, 0, 1], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,890 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_start_channels completed
2017-10-15 12:10:55,890 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_start_channels, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3'}, 'enable': True}}, {'typed': '', 'bufnr': 1, 'lnum': 1, 'filetype': 'go', 'col': 1, 'changedtick': 3, 'curpos': [0, 1, 1, 0, 1], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,891 [INFO @ cm_core.py:_start_channel:703] 30760 - starting <cm-bufkeyword> thread channel
2017-10-15 12:10:55,891 [INFO @ cm.py:setup_neovim:165] 30760 - connecting to neovim server: /var/folders/f3/l0x65b_j2c90lr5g6d_0y6x80000gn/T/nvim0n5GDK/0
2017-10-15 12:10:55,891 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_start_channels completed
2017-10-15 12:10:55,891 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_start_channels, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3'}, 'enable': True}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3'}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}}, {'typed': '', 'bufnr': 1, 'lnum': 1, 'filetype': 'go', 'col': 1, 'changedtick': 3, 'curpos': [0, 1, 1, 0, 1], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,891 [INFO @ cm_core.py:_start_channel:703] 30760 - starting <cm-filepath> thread channel
2017-10-15 12:10:55,891 [INFO @ cm.py:setup_neovim:165] 30760 - connecting to neovim server: /var/folders/f3/l0x65b_j2c90lr5g6d_0y6x80000gn/T/nvim0n5GDK/0
2017-10-15 12:10:55,892 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_start_channels completed
2017-10-15 12:10:55,892 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_start_channels, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3'}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3'}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3'}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}}, {'typed': '', 'bufnr': 1, 'lnum': 1, 'filetype': 'go', 'col': 1, 'changedtick': 3, 'curpos': [0, 1, 1, 0, 1], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,892 [INFO @ cm_core.py:_start_channel:703] 30760 - starting <cm-gocode> thread channel
2017-10-15 12:10:55,892 [INFO @ cm.py:setup_neovim:165] 30760 - connecting to neovim server: /var/folders/f3/l0x65b_j2c90lr5g6d_0y6x80000gn/T/nvim0n5GDK/0
2017-10-15 12:10:55,893 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_start_channels completed
2017-10-15 12:10:55,893 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_start_channels, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3'}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3'}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3'}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}}, {'typed': '', 'bufnr': 1, 'lnum': 1, 'filetype': 'go', 'col': 1, 'changedtick': 3, 'curpos': [0, 1, 1, 0, 1], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,893 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_start_channels completed
2017-10-15 12:10:55,893 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_start_channels, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3'}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3'}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3'}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3'}, 'enable': True, 'name': 'cm-keyword-continue'}}, {'typed': '', 'bufnr': 1, 'lnum': 1, 'filetype': 'go', 'col': 1, 'changedtick': 3, 'curpos': [0, 1, 1, 0, 1], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,893 [INFO @ cm_core.py:_start_channel:703] 30760 - starting <cm-keyword-continue> thread channel
2017-10-15 12:10:55,893 [INFO @ cm.py:setup_neovim:165] 30760 - connecting to neovim server: /var/folders/f3/l0x65b_j2c90lr5g6d_0y6x80000gn/T/nvim0n5GDK/0
2017-10-15 12:10:55,894 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 1, b'vim_get_api_info', ()]
2017-10-15 12:10:55,894 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 1, b'vim_get_api_info', ()]
2017-10-15 12:10:55,894 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 1, b'vim_get_api_info', ()]
2017-10-15 12:10:55,894 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_start_channels completed
2017-10-15 12:10:55,894 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x01\xb0vim_get_api_info\x90''
2017-10-15 12:10:55,895 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 1, b'vim_get_api_info', ()]
2017-10-15 12:10:55,895 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x01\xb0vim_get_api_info\x90''
2017-10-15 12:10:55,895 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x01\xb0vim_get_api_info\x90''
2017-10-15 12:10:55,895 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_start_channels, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3'}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3'}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3'}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3'}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3'}, 'enable': True}}, {'typed': '', 'bufnr': 1, 'lnum': 1, 'filetype': 'go', 'col': 1, 'changedtick': 3, 'curpos': [0, 1, 1, 0, 1], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,895 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x01\xb0vim_get_api_info\x90''
2017-10-15 12:10:55,895 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,895 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,896 [INFO @ cm_core.py:_start_channel:703] 30760 - starting <cm-tags> thread channel
2017-10-15 12:10:55,896 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,896 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,896 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,896 [INFO @ cm.py:setup_neovim:165] 30760 - connecting to neovim server: /var/folders/f3/l0x65b_j2c90lr5g6d_0y6x80000gn/T/nvim0n5GDK/0
2017-10-15 12:10:55,896 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_start_channels completed
2017-10-15 12:10:55,896 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,897 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,897 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_start_channels, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3'}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3'}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3'}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3'}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3'}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3'}, 'enable': True}}, {'typed': '', 'bufnr': 1, 'lnum': 1, 'filetype': 'go', 'col': 1, 'changedtick': 3, 'curpos': [0, 1, 1, 0, 1], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,897 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,898 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,898 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,898 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 1, b'vim_get_api_info', ()]
2017-10-15 12:10:55,898 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,898 [INFO @ cm_core.py:_start_channel:703] 30760 - starting <cm-tmux> thread channel
2017-10-15 12:10:55,898 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,899 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,899 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,899 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x01\xb0vim_get_api_info\x90''
2017-10-15 12:10:55,899 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,899 [INFO @ cm.py:setup_neovim:165] 30760 - connecting to neovim server: /var/folders/f3/l0x65b_j2c90lr5g6d_0y6x80000gn/T/nvim0n5GDK/0
2017-10-15 12:10:55,899 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_start_channels completed
2017-10-15 12:10:55,900 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,900 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,900 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,900 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,900 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,900 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,901 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 1, b'vim_get_api_info', ()]
2017-10-15 12:10:55,901 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,901 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,901 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,901 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,901 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 1, None, [5, {b'types': {b'Window': {b'prefix': b'nvim_win_', b'id': 1}, b'Buffer': {b'prefix': b'nvim_buf_', b'id': 0}, b'Tabpage': {b'prefix': b'nvim_tabpage_', b'id': 2}}, b'version': {b'api_compatible': 0, b'api_level': 2, b'api_prerelease': False, b'minor': 2, b'patch': 0, b'major': 0}, b'functions': [{b'since': 1, b'method': True, b'name': b'nvim_buf_line_count', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'method': False, b'name': b'buffer_get_line', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_set_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index'], [b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_get_line_slice', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'return_type': b'ArrayOf(String)'}, {b'method': False, b'name': b'buffer_set_line_slice', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 2, b'method': True, b'name': b'nvim_buf_get_changedtick', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_del_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'buffer_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'method': True, b'name': b'nvim_buf_get_number', b'return_type': b'Integer', b'since': 1, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 2}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_name', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'String'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_name', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_is_valid', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Boolean'}, {b'method': False, b'name': b'buffer_insert', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'lnum'], [b'ArrayOf(String)', b'lines']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_mark', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_add_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_clear_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_list_wins', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_set_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_del_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'tabpage_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'tabpage_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_win', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Window'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_number', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_is_valid', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Boolean'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_attach', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Dictionary', b'options']], b'return_type': b'void'}, {b'method': False, b'name': b'ui_attach', b'return_type': b'void', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Boolean', b'enable_rgb']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_ui_detach', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_try_resize', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_command', b'parameters': [[b'String', b'command']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_feedkeys', b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_input', b'parameters': [[b'String', b'keys']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_replace_termcodes', b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_command_output', b'parameters': [[b'String', b'str']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_eval', b'parameters': [[b'String', b'expr']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_call_function', b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_strwidth', b'parameters': [[b'String', b'str']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_list_runtime_paths', b'parameters': [], b'return_type': b'ArrayOf(String)'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_dir', b'parameters': [[b'String', b'dir']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_line', b'parameters': [], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_line', b'parameters': [[b'String', b'line']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_current_line', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_var', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_var', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_var', b'parameters': [[b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'vim_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_get_vvar', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_get_option', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_out_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_writeln', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_bufs', b'parameters': [], b'return_type': b'ArrayOf(Buffer)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_buf', b'parameters': [], b'return_type': b'Buffer'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_buf', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_wins', b'parameters': [], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_win', b'parameters': [], b'return_type': b'Window'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_win', b'parameters': [[b'Window', b'window']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_tabpages', b'parameters': [], b'return_type': b'ArrayOf(Tabpage)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_tabpage', b'parameters': [], b'return_type': b'Tabpage'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_tabpage', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_subscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_unsubscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_by_name', b'parameters': [[b'String', b'name']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_map', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 2, b'method': False, b'name': b'nvim_get_mode', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 1, b'method': False, b'name': b'nvim_get_api_info', b'parameters': [], b'return_type': b'Array'}, {b'since': 1, b'method': False, b'name': b'nvim_call_atomic', b'parameters': [[b'Array', b'calls']], b'return_type': b'Array'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_buf', b'parameters': [[b'Window', b'window']], b'return_type': b'Buffer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_cursor', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_cursor', b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_height', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_height', b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_width', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_width', b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_var', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_del_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'window_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'window_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_option', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_option', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_position', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_tabpage', b'parameters': [[b'Window', b'window']], b'return_type': b'Tabpage'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_number', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_is_valid', b'parameters': [[b'Window', b'window']], b'return_type': b'Boolean'}, {b'method': True, b'name': b'buffer_line_count', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_lines', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_lines', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_number', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_name', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_name', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_mark', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_add_highlight', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_clear_highlight', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_window', b'return_type': b'Window', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_detach', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_try_resize', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'command']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_feedkeys', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_input', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'keys']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_replace_termcodes', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command_output', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_eval', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'expr']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_call_function', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_strwidth', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_list_runtime_paths', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_change_directory', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'dir']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_line', b'return_type': b'String', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_current_line', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_vvar', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_out_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_err_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_report_error', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_buffers', b'return_type': b'ArrayOf(Buffer)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_buffer', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_window', b'return_type': b'Window', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_window', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_tabpages', b'return_type': b'ArrayOf(Tabpage)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_tabpage', b'return_type': b'void', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_subscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_unsubscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_name_to_color', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_color_map', b'return_type': b'Dictionary', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_api_info', b'return_type': b'Array', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_cursor', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_cursor', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_height', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_height', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_width', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_width', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_position', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}], b'error_types': {b'Validation': {b'id': 1}, b'Exception': {b'id': 0}}}]]
2017-10-15 12:10:55,902 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,902 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x01\xb0vim_get_api_info\x90''
2017-10-15 12:10:55,902 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 1, None, [6, {b'types': {b'Window': {b'prefix': b'nvim_win_', b'id': 1}, b'Buffer': {b'prefix': b'nvim_buf_', b'id': 0}, b'Tabpage': {b'prefix': b'nvim_tabpage_', b'id': 2}}, b'version': {b'api_compatible': 0, b'api_level': 2, b'api_prerelease': False, b'minor': 2, b'patch': 0, b'major': 0}, b'functions': [{b'since': 1, b'method': True, b'name': b'nvim_buf_line_count', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'method': False, b'name': b'buffer_get_line', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_set_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index'], [b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_get_line_slice', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'return_type': b'ArrayOf(String)'}, {b'method': False, b'name': b'buffer_set_line_slice', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 2, b'method': True, b'name': b'nvim_buf_get_changedtick', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_del_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'buffer_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'method': True, b'name': b'nvim_buf_get_number', b'return_type': b'Integer', b'since': 1, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 2}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_name', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'String'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_name', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_is_valid', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Boolean'}, {b'method': False, b'name': b'buffer_insert', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'lnum'], [b'ArrayOf(String)', b'lines']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_mark', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_add_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_clear_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_list_wins', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_set_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_del_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'tabpage_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'tabpage_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_win', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Window'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_number', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_is_valid', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Boolean'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_attach', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Dictionary', b'options']], b'return_type': b'void'}, {b'method': False, b'name': b'ui_attach', b'return_type': b'void', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Boolean', b'enable_rgb']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_ui_detach', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_try_resize', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_command', b'parameters': [[b'String', b'command']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_feedkeys', b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_input', b'parameters': [[b'String', b'keys']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_replace_termcodes', b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_command_output', b'parameters': [[b'String', b'str']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_eval', b'parameters': [[b'String', b'expr']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_call_function', b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_strwidth', b'parameters': [[b'String', b'str']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_list_runtime_paths', b'parameters': [], b'return_type': b'ArrayOf(String)'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_dir', b'parameters': [[b'String', b'dir']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_line', b'parameters': [], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_line', b'parameters': [[b'String', b'line']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_current_line', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_var', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_var', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_var', b'parameters': [[b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'vim_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_get_vvar', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_get_option', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_out_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_writeln', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_bufs', b'parameters': [], b'return_type': b'ArrayOf(Buffer)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_buf', b'parameters': [], b'return_type': b'Buffer'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_buf', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_wins', b'parameters': [], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_win', b'parameters': [], b'return_type': b'Window'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_win', b'parameters': [[b'Window', b'window']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_tabpages', b'parameters': [], b'return_type': b'ArrayOf(Tabpage)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_tabpage', b'parameters': [], b'return_type': b'Tabpage'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_tabpage', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_subscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_unsubscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_by_name', b'parameters': [[b'String', b'name']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_map', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 2, b'method': False, b'name': b'nvim_get_mode', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 1, b'method': False, b'name': b'nvim_get_api_info', b'parameters': [], b'return_type': b'Array'}, {b'since': 1, b'method': False, b'name': b'nvim_call_atomic', b'parameters': [[b'Array', b'calls']], b'return_type': b'Array'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_buf', b'parameters': [[b'Window', b'window']], b'return_type': b'Buffer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_cursor', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_cursor', b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_height', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_height', b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_width', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_width', b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_var', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_del_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'window_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'window_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_option', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_option', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_position', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_tabpage', b'parameters': [[b'Window', b'window']], b'return_type': b'Tabpage'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_number', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_is_valid', b'parameters': [[b'Window', b'window']], b'return_type': b'Boolean'}, {b'method': True, b'name': b'buffer_line_count', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_lines', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_lines', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_number', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_name', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_name', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_mark', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_add_highlight', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_clear_highlight', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_window', b'return_type': b'Window', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_detach', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_try_resize', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'command']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_feedkeys', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_input', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'keys']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_replace_termcodes', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command_output', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_eval', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'expr']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_call_function', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_strwidth', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_list_runtime_paths', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_change_directory', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'dir']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_line', b'return_type': b'String', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_current_line', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_vvar', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_out_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_err_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_report_error', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_buffers', b'return_type': b'ArrayOf(Buffer)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_buffer', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_window', b'return_type': b'Window', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_window', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_tabpages', b'return_type': b'ArrayOf(Tabpage)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_tabpage', b'return_type': b'void', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_subscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_unsubscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_name_to_color', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_color_map', b'return_type': b'Dictionary', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_api_info', b'return_type': b'Array', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_cursor', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_cursor', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_height', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_height', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_width', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_width', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_position', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}], b'error_types': {b'Validation': {b'id': 1}, b'Exception': {b'id': 0}}}]]
2017-10-15 12:10:55,902 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,902 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,902 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,903 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, [5, {b'types': {b'Window': {b'prefix': b'nvim_win_', b'id': 1}, b'Buffer': {b'prefix': b'nvim_buf_', b'id': 0}, b'Tabpage': {b'prefix': b'nvim_tabpage_', b'id': 2}}, b'version': {b'api_compatible': 0, b'api_level': 2, b'api_prerelease': False, b'minor': 2, b'patch': 0, b'major': 0}, b'functions': [{b'since': 1, b'method': True, b'name': b'nvim_buf_line_count', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'method': False, b'name': b'buffer_get_line', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_set_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index'], [b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_get_line_slice', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'return_type': b'ArrayOf(String)'}, {b'method': False, b'name': b'buffer_set_line_slice', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 2, b'method': True, b'name': b'nvim_buf_get_changedtick', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_del_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'buffer_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'method': True, b'name': b'nvim_buf_get_number', b'return_type': b'Integer', b'since': 1, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 2}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_name', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'String'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_name', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_is_valid', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Boolean'}, {b'method': False, b'name': b'buffer_insert', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'lnum'], [b'ArrayOf(String)', b'lines']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_mark', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_add_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_clear_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_list_wins', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_set_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_del_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'tabpage_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'tabpage_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_win', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Window'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_number', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_is_valid', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Boolean'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_attach', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Dictionary', b'options']], b'return_type': b'void'}, {b'method': False, b'name': b'ui_attach', b'return_type': b'void', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Boolean', b'enable_rgb']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_ui_detach', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_try_resize', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_command', b'parameters': [[b'String', b'command']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_feedkeys', b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_input', b'parameters': [[b'String', b'keys']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_replace_termcodes', b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_command_output', b'parameters': [[b'String', b'str']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_eval', b'parameters': [[b'String', b'expr']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_call_function', b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_strwidth', b'parameters': [[b'String', b'str']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_list_runtime_paths', b'parameters': [], b'return_type': b'ArrayOf(String)'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_dir', b'parameters': [[b'String', b'dir']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_line', b'parameters': [], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_line', b'parameters': [[b'String', b'line']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_current_line', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_var', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_var', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_var', b'parameters': [[b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'vim_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_get_vvar', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_get_option', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_out_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_writeln', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_bufs', b'parameters': [], b'return_type': b'ArrayOf(Buffer)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_buf', b'parameters': [], b'return_type': b'Buffer'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_buf', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_wins', b'parameters': [], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_win', b'parameters': [], b'return_type': b'Window'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_win', b'parameters': [[b'Window', b'window']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_tabpages', b'parameters': [], b'return_type': b'ArrayOf(Tabpage)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_tabpage', b'parameters': [], b'return_type': b'Tabpage'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_tabpage', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_subscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_unsubscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_by_name', b'parameters': [[b'String', b'name']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_map', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 2, b'method': False, b'name': b'nvim_get_mode', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 1, b'method': False, b'name': b'nvim_get_api_info', b'parameters': [], b'return_type': b'Array'}, {b'since': 1, b'method': False, b'name': b'nvim_call_atomic', b'parameters': [[b'Array', b'calls']], b'return_type': b'Array'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_buf', b'parameters': [[b'Window', b'window']], b'return_type': b'Buffer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_cursor', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_cursor', b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_height', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_height', b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_width', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_width', b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_var', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_del_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'window_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'window_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_option', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_option', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_position', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_tabpage', b'parameters': [[b'Window', b'window']], b'return_type': b'Tabpage'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_number', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_is_valid', b'parameters': [[b'Window', b'window']], b'return_type': b'Boolean'}, {b'method': True, b'name': b'buffer_line_count', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_lines', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_lines', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_number', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_name', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_name', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_mark', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_add_highlight', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_clear_highlight', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_window', b'return_type': b'Window', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_detach', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_try_resize', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'command']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_feedkeys', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_input', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'keys']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_replace_termcodes', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command_output', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_eval', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'expr']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_call_function', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_strwidth', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_list_runtime_paths', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_change_directory', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'dir']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_line', b'return_type': b'String', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_current_line', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_vvar', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_out_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_err_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_report_error', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_buffers', b'return_type': b'ArrayOf(Buffer)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_buffer', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_window', b'return_type': b'Window', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_window', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_tabpages', b'return_type': b'ArrayOf(Tabpage)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_tabpage', b'return_type': b'void', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_subscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_unsubscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_name_to_color', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_color_map', b'return_type': b'Dictionary', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_api_info', b'return_type': b'Array', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_cursor', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_cursor', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_height', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_height', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_width', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_width', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_position', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}], b'error_types': {b'Validation': {b'id': 1}, b'Exception': {b'id': 0}}}]
2017-10-15 12:10:55,904 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,904 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, [6, {b'types': {b'Window': {b'prefix': b'nvim_win_', b'id': 1}, b'Buffer': {b'prefix': b'nvim_buf_', b'id': 0}, b'Tabpage': {b'prefix': b'nvim_tabpage_', b'id': 2}}, b'version': {b'api_compatible': 0, b'api_level': 2, b'api_prerelease': False, b'minor': 2, b'patch': 0, b'major': 0}, b'functions': [{b'since': 1, b'method': True, b'name': b'nvim_buf_line_count', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'method': False, b'name': b'buffer_get_line', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_set_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index'], [b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_get_line_slice', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'return_type': b'ArrayOf(String)'}, {b'method': False, b'name': b'buffer_set_line_slice', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 2, b'method': True, b'name': b'nvim_buf_get_changedtick', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_del_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'buffer_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'method': True, b'name': b'nvim_buf_get_number', b'return_type': b'Integer', b'since': 1, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 2}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_name', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'String'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_name', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_is_valid', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Boolean'}, {b'method': False, b'name': b'buffer_insert', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'lnum'], [b'ArrayOf(String)', b'lines']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_mark', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_add_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_clear_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_list_wins', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_set_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_del_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'tabpage_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'tabpage_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_win', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Window'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_number', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_is_valid', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Boolean'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_attach', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Dictionary', b'options']], b'return_type': b'void'}, {b'method': False, b'name': b'ui_attach', b'return_type': b'void', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Boolean', b'enable_rgb']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_ui_detach', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_try_resize', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_command', b'parameters': [[b'String', b'command']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_feedkeys', b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_input', b'parameters': [[b'String', b'keys']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_replace_termcodes', b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_command_output', b'parameters': [[b'String', b'str']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_eval', b'parameters': [[b'String', b'expr']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_call_function', b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_strwidth', b'parameters': [[b'String', b'str']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_list_runtime_paths', b'parameters': [], b'return_type': b'ArrayOf(String)'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_dir', b'parameters': [[b'String', b'dir']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_line', b'parameters': [], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_line', b'parameters': [[b'String', b'line']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_current_line', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_var', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_var', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_var', b'parameters': [[b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'vim_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_get_vvar', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_get_option', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_out_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_writeln', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_bufs', b'parameters': [], b'return_type': b'ArrayOf(Buffer)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_buf', b'parameters': [], b'return_type': b'Buffer'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_buf', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_wins', b'parameters': [], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_win', b'parameters': [], b'return_type': b'Window'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_win', b'parameters': [[b'Window', b'window']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_tabpages', b'parameters': [], b'return_type': b'ArrayOf(Tabpage)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_tabpage', b'parameters': [], b'return_type': b'Tabpage'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_tabpage', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_subscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_unsubscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_by_name', b'parameters': [[b'String', b'name']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_map', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 2, b'method': False, b'name': b'nvim_get_mode', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 1, b'method': False, b'name': b'nvim_get_api_info', b'parameters': [], b'return_type': b'Array'}, {b'since': 1, b'method': False, b'name': b'nvim_call_atomic', b'parameters': [[b'Array', b'calls']], b'return_type': b'Array'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_buf', b'parameters': [[b'Window', b'window']], b'return_type': b'Buffer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_cursor', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_cursor', b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_height', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_height', b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_width', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_width', b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_var', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_del_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'window_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'window_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_option', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_option', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_position', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_tabpage', b'parameters': [[b'Window', b'window']], b'return_type': b'Tabpage'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_number', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_is_valid', b'parameters': [[b'Window', b'window']], b'return_type': b'Boolean'}, {b'method': True, b'name': b'buffer_line_count', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_lines', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_lines', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_number', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_name', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_name', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_mark', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_add_highlight', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_clear_highlight', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_window', b'return_type': b'Window', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_detach', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_try_resize', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'command']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_feedkeys', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_input', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'keys']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_replace_termcodes', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command_output', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_eval', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'expr']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_call_function', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_strwidth', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_list_runtime_paths', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_change_directory', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'dir']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_line', b'return_type': b'String', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_current_line', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_vvar', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_out_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_err_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_report_error', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_buffers', b'return_type': b'ArrayOf(Buffer)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_buffer', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_window', b'return_type': b'Window', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_window', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_tabpages', b'return_type': b'ArrayOf(Tabpage)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_tabpage', b'return_type': b'void', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_subscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_unsubscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_name_to_color', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_color_map', b'return_type': b'Dictionary', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_api_info', b'return_type': b'Array', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_cursor', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_cursor', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_height', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_height', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_width', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_width', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_position', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}], b'error_types': {b'Validation': {b'id': 1}, b'Exception': {b'id': 0}}}]
2017-10-15 12:10:55,904 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 1, None, [4, {b'types': {b'Window': {b'prefix': b'nvim_win_', b'id': 1}, b'Buffer': {b'prefix': b'nvim_buf_', b'id': 0}, b'Tabpage': {b'prefix': b'nvim_tabpage_', b'id': 2}}, b'version': {b'api_compatible': 0, b'api_level': 2, b'api_prerelease': False, b'minor': 2, b'patch': 0, b'major': 0}, b'functions': [{b'since': 1, b'method': True, b'name': b'nvim_buf_line_count', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'method': False, b'name': b'buffer_get_line', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_set_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index'], [b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_get_line_slice', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'return_type': b'ArrayOf(String)'}, {b'method': False, b'name': b'buffer_set_line_slice', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 2, b'method': True, b'name': b'nvim_buf_get_changedtick', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_del_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'buffer_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'method': True, b'name': b'nvim_buf_get_number', b'return_type': b'Integer', b'since': 1, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 2}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_name', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'String'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_name', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_is_valid', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Boolean'}, {b'method': False, b'name': b'buffer_insert', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'lnum'], [b'ArrayOf(String)', b'lines']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_mark', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_add_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_clear_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_list_wins', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_set_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_del_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'tabpage_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'tabpage_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_win', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Window'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_number', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_is_valid', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Boolean'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_attach', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Dictionary', b'options']], b'return_type': b'void'}, {b'method': False, b'name': b'ui_attach', b'return_type': b'void', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Boolean', b'enable_rgb']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_ui_detach', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_try_resize', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_command', b'parameters': [[b'String', b'command']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_feedkeys', b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_input', b'parameters': [[b'String', b'keys']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_replace_termcodes', b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_command_output', b'parameters': [[b'String', b'str']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_eval', b'parameters': [[b'String', b'expr']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_call_function', b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_strwidth', b'parameters': [[b'String', b'str']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_list_runtime_paths', b'parameters': [], b'return_type': b'ArrayOf(String)'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_dir', b'parameters': [[b'String', b'dir']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_line', b'parameters': [], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_line', b'parameters': [[b'String', b'line']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_current_line', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_var', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_var', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_var', b'parameters': [[b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'vim_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_get_vvar', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_get_option', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_out_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_writeln', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_bufs', b'parameters': [], b'return_type': b'ArrayOf(Buffer)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_buf', b'parameters': [], b'return_type': b'Buffer'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_buf', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_wins', b'parameters': [], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_win', b'parameters': [], b'return_type': b'Window'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_win', b'parameters': [[b'Window', b'window']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_tabpages', b'parameters': [], b'return_type': b'ArrayOf(Tabpage)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_tabpage', b'parameters': [], b'return_type': b'Tabpage'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_tabpage', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_subscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_unsubscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_by_name', b'parameters': [[b'String', b'name']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_map', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 2, b'method': False, b'name': b'nvim_get_mode', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 1, b'method': False, b'name': b'nvim_get_api_info', b'parameters': [], b'return_type': b'Array'}, {b'since': 1, b'method': False, b'name': b'nvim_call_atomic', b'parameters': [[b'Array', b'calls']], b'return_type': b'Array'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_buf', b'parameters': [[b'Window', b'window']], b'return_type': b'Buffer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_cursor', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_cursor', b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_height', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_height', b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_width', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_width', b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_var', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_del_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'window_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'window_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_option', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_option', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_position', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_tabpage', b'parameters': [[b'Window', b'window']], b'return_type': b'Tabpage'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_number', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_is_valid', b'parameters': [[b'Window', b'window']], b'return_type': b'Boolean'}, {b'method': True, b'name': b'buffer_line_count', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_lines', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_lines', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_number', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_name', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_name', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_mark', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_add_highlight', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_clear_highlight', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_window', b'return_type': b'Window', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_detach', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_try_resize', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'command']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_feedkeys', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_input', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'keys']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_replace_termcodes', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command_output', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_eval', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'expr']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_call_function', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_strwidth', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_list_runtime_paths', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_change_directory', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'dir']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_line', b'return_type': b'String', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_current_line', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_vvar', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_out_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_err_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_report_error', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_buffers', b'return_type': b'ArrayOf(Buffer)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_buffer', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_window', b'return_type': b'Window', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_window', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_tabpages', b'return_type': b'ArrayOf(Tabpage)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_tabpage', b'return_type': b'void', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_subscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_unsubscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_name_to_color', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_color_map', b'return_type': b'Dictionary', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_api_info', b'return_type': b'Array', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_cursor', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_cursor', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_height', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_height', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_width', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_width', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_position', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}], b'error_types': {b'Validation': {b'id': 1}, b'Exception': {b'id': 0}}}]]
2017-10-15 12:10:55,904 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 1, None, [7, {b'types': {b'Window': {b'prefix': b'nvim_win_', b'id': 1}, b'Buffer': {b'prefix': b'nvim_buf_', b'id': 0}, b'Tabpage': {b'prefix': b'nvim_tabpage_', b'id': 2}}, b'version': {b'api_compatible': 0, b'api_level': 2, b'api_prerelease': False, b'minor': 2, b'patch': 0, b'major': 0}, b'functions': [{b'since': 1, b'method': True, b'name': b'nvim_buf_line_count', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'method': False, b'name': b'buffer_get_line', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_set_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index'], [b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_get_line_slice', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'return_type': b'ArrayOf(String)'}, {b'method': False, b'name': b'buffer_set_line_slice', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 2, b'method': True, b'name': b'nvim_buf_get_changedtick', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_del_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'buffer_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'method': True, b'name': b'nvim_buf_get_number', b'return_type': b'Integer', b'since': 1, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 2}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_name', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'String'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_name', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_is_valid', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Boolean'}, {b'method': False, b'name': b'buffer_insert', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'lnum'], [b'ArrayOf(String)', b'lines']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_mark', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_add_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_clear_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_list_wins', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_set_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_del_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'tabpage_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'tabpage_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_win', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Window'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_number', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_is_valid', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Boolean'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_attach', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Dictionary', b'options']], b'return_type': b'void'}, {b'method': False, b'name': b'ui_attach', b'return_type': b'void', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Boolean', b'enable_rgb']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_ui_detach', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_try_resize', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_command', b'parameters': [[b'String', b'command']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_feedkeys', b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_input', b'parameters': [[b'String', b'keys']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_replace_termcodes', b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_command_output', b'parameters': [[b'String', b'str']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_eval', b'parameters': [[b'String', b'expr']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_call_function', b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_strwidth', b'parameters': [[b'String', b'str']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_list_runtime_paths', b'parameters': [], b'return_type': b'ArrayOf(String)'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_dir', b'parameters': [[b'String', b'dir']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_line', b'parameters': [], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_line', b'parameters': [[b'String', b'line']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_current_line', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_var', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_var', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_var', b'parameters': [[b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'vim_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_get_vvar', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_get_option', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_out_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_writeln', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_bufs', b'parameters': [], b'return_type': b'ArrayOf(Buffer)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_buf', b'parameters': [], b'return_type': b'Buffer'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_buf', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_wins', b'parameters': [], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_win', b'parameters': [], b'return_type': b'Window'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_win', b'parameters': [[b'Window', b'window']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_tabpages', b'parameters': [], b'return_type': b'ArrayOf(Tabpage)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_tabpage', b'parameters': [], b'return_type': b'Tabpage'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_tabpage', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_subscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_unsubscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_by_name', b'parameters': [[b'String', b'name']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_map', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 2, b'method': False, b'name': b'nvim_get_mode', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 1, b'method': False, b'name': b'nvim_get_api_info', b'parameters': [], b'return_type': b'Array'}, {b'since': 1, b'method': False, b'name': b'nvim_call_atomic', b'parameters': [[b'Array', b'calls']], b'return_type': b'Array'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_buf', b'parameters': [[b'Window', b'window']], b'return_type': b'Buffer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_cursor', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_cursor', b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_height', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_height', b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_width', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_width', b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_var', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_del_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'window_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'window_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_option', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_option', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_position', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_tabpage', b'parameters': [[b'Window', b'window']], b'return_type': b'Tabpage'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_number', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_is_valid', b'parameters': [[b'Window', b'window']], b'return_type': b'Boolean'}, {b'method': True, b'name': b'buffer_line_count', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_lines', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_lines', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_number', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_name', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_name', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_mark', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_add_highlight', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_clear_highlight', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_window', b'return_type': b'Window', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_detach', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_try_resize', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'command']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_feedkeys', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_input', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'keys']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_replace_termcodes', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command_output', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_eval', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'expr']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_call_function', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_strwidth', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_list_runtime_paths', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_change_directory', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'dir']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_line', b'return_type': b'String', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_current_line', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_vvar', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_out_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_err_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_report_error', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_buffers', b'return_type': b'ArrayOf(Buffer)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_buffer', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_window', b'return_type': b'Window', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_window', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_tabpages', b'return_type': b'ArrayOf(Tabpage)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_tabpage', b'return_type': b'void', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_subscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_unsubscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_name_to_color', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_color_map', b'return_type': b'Dictionary', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_api_info', b'return_type': b'Array', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_cursor', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_cursor', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_height', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_height', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_width', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_width', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_position', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}], b'error_types': {b'Validation': {b'id': 1}, b'Exception': {b'id': 0}}}]]
2017-10-15 12:10:55,904 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,905 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,905 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,905 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,906 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, [4, {b'types': {b'Window': {b'prefix': b'nvim_win_', b'id': 1}, b'Buffer': {b'prefix': b'nvim_buf_', b'id': 0}, b'Tabpage': {b'prefix': b'nvim_tabpage_', b'id': 2}}, b'version': {b'api_compatible': 0, b'api_level': 2, b'api_prerelease': False, b'minor': 2, b'patch': 0, b'major': 0}, b'functions': [{b'since': 1, b'method': True, b'name': b'nvim_buf_line_count', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'method': False, b'name': b'buffer_get_line', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_set_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index'], [b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_get_line_slice', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'return_type': b'ArrayOf(String)'}, {b'method': False, b'name': b'buffer_set_line_slice', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 2, b'method': True, b'name': b'nvim_buf_get_changedtick', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_del_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'buffer_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'method': True, b'name': b'nvim_buf_get_number', b'return_type': b'Integer', b'since': 1, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 2}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_name', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'String'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_name', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_is_valid', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Boolean'}, {b'method': False, b'name': b'buffer_insert', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'lnum'], [b'ArrayOf(String)', b'lines']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_mark', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_add_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_clear_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_list_wins', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_set_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_del_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'tabpage_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'tabpage_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_win', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Window'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_number', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_is_valid', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Boolean'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_attach', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Dictionary', b'options']], b'return_type': b'void'}, {b'method': False, b'name': b'ui_attach', b'return_type': b'void', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Boolean', b'enable_rgb']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_ui_detach', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_try_resize', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_command', b'parameters': [[b'String', b'command']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_feedkeys', b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_input', b'parameters': [[b'String', b'keys']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_replace_termcodes', b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_command_output', b'parameters': [[b'String', b'str']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_eval', b'parameters': [[b'String', b'expr']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_call_function', b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_strwidth', b'parameters': [[b'String', b'str']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_list_runtime_paths', b'parameters': [], b'return_type': b'ArrayOf(String)'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_dir', b'parameters': [[b'String', b'dir']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_line', b'parameters': [], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_line', b'parameters': [[b'String', b'line']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_current_line', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_var', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_var', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_var', b'parameters': [[b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'vim_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_get_vvar', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_get_option', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_out_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_writeln', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_bufs', b'parameters': [], b'return_type': b'ArrayOf(Buffer)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_buf', b'parameters': [], b'return_type': b'Buffer'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_buf', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_wins', b'parameters': [], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_win', b'parameters': [], b'return_type': b'Window'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_win', b'parameters': [[b'Window', b'window']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_tabpages', b'parameters': [], b'return_type': b'ArrayOf(Tabpage)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_tabpage', b'parameters': [], b'return_type': b'Tabpage'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_tabpage', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_subscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_unsubscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_by_name', b'parameters': [[b'String', b'name']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_map', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 2, b'method': False, b'name': b'nvim_get_mode', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 1, b'method': False, b'name': b'nvim_get_api_info', b'parameters': [], b'return_type': b'Array'}, {b'since': 1, b'method': False, b'name': b'nvim_call_atomic', b'parameters': [[b'Array', b'calls']], b'return_type': b'Array'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_buf', b'parameters': [[b'Window', b'window']], b'return_type': b'Buffer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_cursor', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_cursor', b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_height', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_height', b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_width', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_width', b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_var', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_del_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'window_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'window_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_option', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_option', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_position', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_tabpage', b'parameters': [[b'Window', b'window']], b'return_type': b'Tabpage'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_number', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_is_valid', b'parameters': [[b'Window', b'window']], b'return_type': b'Boolean'}, {b'method': True, b'name': b'buffer_line_count', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_lines', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_lines', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_number', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_name', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_name', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_mark', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_add_highlight', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_clear_highlight', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_window', b'return_type': b'Window', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_detach', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_try_resize', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'command']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_feedkeys', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_input', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'keys']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_replace_termcodes', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command_output', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_eval', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'expr']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_call_function', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_strwidth', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_list_runtime_paths', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_change_directory', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'dir']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_line', b'return_type': b'String', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_current_line', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_vvar', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_out_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_err_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_report_error', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_buffers', b'return_type': b'ArrayOf(Buffer)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_buffer', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_window', b'return_type': b'Window', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_window', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_tabpages', b'return_type': b'ArrayOf(Tabpage)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_tabpage', b'return_type': b'void', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_subscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_unsubscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_name_to_color', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_color_map', b'return_type': b'Dictionary', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_api_info', b'return_type': b'Array', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_cursor', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_cursor', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_height', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_height', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_width', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_width', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_position', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}], b'error_types': {b'Validation': {b'id': 1}, b'Exception': {b'id': 0}}}]
2017-10-15 12:10:55,906 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, [7, {b'types': {b'Window': {b'prefix': b'nvim_win_', b'id': 1}, b'Buffer': {b'prefix': b'nvim_buf_', b'id': 0}, b'Tabpage': {b'prefix': b'nvim_tabpage_', b'id': 2}}, b'version': {b'api_compatible': 0, b'api_level': 2, b'api_prerelease': False, b'minor': 2, b'patch': 0, b'major': 0}, b'functions': [{b'since': 1, b'method': True, b'name': b'nvim_buf_line_count', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'method': False, b'name': b'buffer_get_line', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_set_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index'], [b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_get_line_slice', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'return_type': b'ArrayOf(String)'}, {b'method': False, b'name': b'buffer_set_line_slice', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 2, b'method': True, b'name': b'nvim_buf_get_changedtick', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_del_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'buffer_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'method': True, b'name': b'nvim_buf_get_number', b'return_type': b'Integer', b'since': 1, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 2}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_name', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'String'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_name', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_is_valid', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Boolean'}, {b'method': False, b'name': b'buffer_insert', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'lnum'], [b'ArrayOf(String)', b'lines']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_mark', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_add_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_clear_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_list_wins', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_set_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_del_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'tabpage_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'tabpage_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_win', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Window'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_number', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_is_valid', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Boolean'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_attach', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Dictionary', b'options']], b'return_type': b'void'}, {b'method': False, b'name': b'ui_attach', b'return_type': b'void', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Boolean', b'enable_rgb']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_ui_detach', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_try_resize', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_command', b'parameters': [[b'String', b'command']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_feedkeys', b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_input', b'parameters': [[b'String', b'keys']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_replace_termcodes', b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_command_output', b'parameters': [[b'String', b'str']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_eval', b'parameters': [[b'String', b'expr']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_call_function', b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_strwidth', b'parameters': [[b'String', b'str']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_list_runtime_paths', b'parameters': [], b'return_type': b'ArrayOf(String)'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_dir', b'parameters': [[b'String', b'dir']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_line', b'parameters': [], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_line', b'parameters': [[b'String', b'line']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_current_line', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_var', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_var', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_var', b'parameters': [[b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'vim_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_get_vvar', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_get_option', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_out_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_writeln', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_bufs', b'parameters': [], b'return_type': b'ArrayOf(Buffer)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_buf', b'parameters': [], b'return_type': b'Buffer'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_buf', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_wins', b'parameters': [], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_win', b'parameters': [], b'return_type': b'Window'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_win', b'parameters': [[b'Window', b'window']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_tabpages', b'parameters': [], b'return_type': b'ArrayOf(Tabpage)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_tabpage', b'parameters': [], b'return_type': b'Tabpage'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_tabpage', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_subscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_unsubscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_by_name', b'parameters': [[b'String', b'name']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_map', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 2, b'method': False, b'name': b'nvim_get_mode', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 1, b'method': False, b'name': b'nvim_get_api_info', b'parameters': [], b'return_type': b'Array'}, {b'since': 1, b'method': False, b'name': b'nvim_call_atomic', b'parameters': [[b'Array', b'calls']], b'return_type': b'Array'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_buf', b'parameters': [[b'Window', b'window']], b'return_type': b'Buffer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_cursor', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_cursor', b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_height', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_height', b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_width', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_width', b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_var', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_del_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'window_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'window_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_option', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_option', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_position', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_tabpage', b'parameters': [[b'Window', b'window']], b'return_type': b'Tabpage'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_number', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_is_valid', b'parameters': [[b'Window', b'window']], b'return_type': b'Boolean'}, {b'method': True, b'name': b'buffer_line_count', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_lines', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_lines', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_number', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_name', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_name', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_mark', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_add_highlight', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_clear_highlight', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_window', b'return_type': b'Window', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_detach', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_try_resize', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'command']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_feedkeys', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_input', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'keys']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_replace_termcodes', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command_output', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_eval', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'expr']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_call_function', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_strwidth', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_list_runtime_paths', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_change_directory', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'dir']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_line', b'return_type': b'String', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_current_line', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_vvar', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_out_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_err_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_report_error', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_buffers', b'return_type': b'ArrayOf(Buffer)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_buffer', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_window', b'return_type': b'Window', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_window', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_tabpages', b'return_type': b'ArrayOf(Tabpage)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_tabpage', b'return_type': b'void', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_subscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_unsubscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_name_to_color', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_color_map', b'return_type': b'Dictionary', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_api_info', b'return_type': b'Array', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_cursor', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_cursor', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_height', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_height', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_width', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_width', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_position', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}], b'error_types': {b'Validation': {b'id': 1}, b'Exception': {b'id': 0}}}]
2017-10-15 12:10:55,907 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,907 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,907 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,907 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,908 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,909 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,909 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,909 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,909 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,909 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,909 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,909 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,909 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,909 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 1, None, [8, {b'types': {b'Window': {b'prefix': b'nvim_win_', b'id': 1}, b'Buffer': {b'prefix': b'nvim_buf_', b'id': 0}, b'Tabpage': {b'prefix': b'nvim_tabpage_', b'id': 2}}, b'version': {b'api_compatible': 0, b'api_level': 2, b'api_prerelease': False, b'minor': 2, b'patch': 0, b'major': 0}, b'functions': [{b'since': 1, b'method': True, b'name': b'nvim_buf_line_count', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'method': False, b'name': b'buffer_get_line', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_set_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index'], [b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_get_line_slice', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'return_type': b'ArrayOf(String)'}, {b'method': False, b'name': b'buffer_set_line_slice', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 2, b'method': True, b'name': b'nvim_buf_get_changedtick', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_del_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'buffer_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'method': True, b'name': b'nvim_buf_get_number', b'return_type': b'Integer', b'since': 1, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 2}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_name', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'String'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_name', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_is_valid', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Boolean'}, {b'method': False, b'name': b'buffer_insert', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'lnum'], [b'ArrayOf(String)', b'lines']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_mark', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_add_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_clear_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_list_wins', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_set_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_del_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'tabpage_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'tabpage_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_win', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Window'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_number', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_is_valid', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Boolean'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_attach', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Dictionary', b'options']], b'return_type': b'void'}, {b'method': False, b'name': b'ui_attach', b'return_type': b'void', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Boolean', b'enable_rgb']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_ui_detach', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_try_resize', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_command', b'parameters': [[b'String', b'command']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_feedkeys', b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_input', b'parameters': [[b'String', b'keys']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_replace_termcodes', b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_command_output', b'parameters': [[b'String', b'str']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_eval', b'parameters': [[b'String', b'expr']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_call_function', b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_strwidth', b'parameters': [[b'String', b'str']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_list_runtime_paths', b'parameters': [], b'return_type': b'ArrayOf(String)'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_dir', b'parameters': [[b'String', b'dir']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_line', b'parameters': [], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_line', b'parameters': [[b'String', b'line']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_current_line', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_var', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_var', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_var', b'parameters': [[b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'vim_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_get_vvar', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_get_option', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_out_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_writeln', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_bufs', b'parameters': [], b'return_type': b'ArrayOf(Buffer)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_buf', b'parameters': [], b'return_type': b'Buffer'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_buf', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_wins', b'parameters': [], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_win', b'parameters': [], b'return_type': b'Window'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_win', b'parameters': [[b'Window', b'window']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_tabpages', b'parameters': [], b'return_type': b'ArrayOf(Tabpage)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_tabpage', b'parameters': [], b'return_type': b'Tabpage'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_tabpage', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_subscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_unsubscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_by_name', b'parameters': [[b'String', b'name']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_map', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 2, b'method': False, b'name': b'nvim_get_mode', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 1, b'method': False, b'name': b'nvim_get_api_info', b'parameters': [], b'return_type': b'Array'}, {b'since': 1, b'method': False, b'name': b'nvim_call_atomic', b'parameters': [[b'Array', b'calls']], b'return_type': b'Array'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_buf', b'parameters': [[b'Window', b'window']], b'return_type': b'Buffer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_cursor', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_cursor', b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_height', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_height', b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_width', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_width', b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_var', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_del_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'window_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'window_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_option', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_option', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_position', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_tabpage', b'parameters': [[b'Window', b'window']], b'return_type': b'Tabpage'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_number', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_is_valid', b'parameters': [[b'Window', b'window']], b'return_type': b'Boolean'}, {b'method': True, b'name': b'buffer_line_count', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_lines', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_lines', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_number', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_name', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_name', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_mark', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_add_highlight', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_clear_highlight', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_window', b'return_type': b'Window', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_detach', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_try_resize', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'command']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_feedkeys', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_input', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'keys']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_replace_termcodes', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command_output', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_eval', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'expr']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_call_function', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_strwidth', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_list_runtime_paths', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_change_directory', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'dir']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_line', b'return_type': b'String', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_current_line', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_vvar', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_out_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_err_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_report_error', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_buffers', b'return_type': b'ArrayOf(Buffer)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_buffer', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_window', b'return_type': b'Window', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_window', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_tabpages', b'return_type': b'ArrayOf(Tabpage)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_tabpage', b'return_type': b'void', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_subscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_unsubscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_name_to_color', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_color_map', b'return_type': b'Dictionary', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_api_info', b'return_type': b'Array', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_cursor', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_cursor', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_height', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_height', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_width', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_width', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_position', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}], b'error_types': {b'Validation': {b'id': 1}, b'Exception': {b'id': 0}}}]]
2017-10-15 12:10:55,910 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,910 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,910 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,910 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,916 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 2, 'nvim_eval', ('globpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)',)]
2017-10-15 12:10:55,916 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, [8, {b'types': {b'Window': {b'prefix': b'nvim_win_', b'id': 1}, b'Buffer': {b'prefix': b'nvim_buf_', b'id': 0}, b'Tabpage': {b'prefix': b'nvim_tabpage_', b'id': 2}}, b'version': {b'api_compatible': 0, b'api_level': 2, b'api_prerelease': False, b'minor': 2, b'patch': 0, b'major': 0}, b'functions': [{b'since': 1, b'method': True, b'name': b'nvim_buf_line_count', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'method': False, b'name': b'buffer_get_line', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_set_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index'], [b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_get_line_slice', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'return_type': b'ArrayOf(String)'}, {b'method': False, b'name': b'buffer_set_line_slice', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 2, b'method': True, b'name': b'nvim_buf_get_changedtick', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_del_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'buffer_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'method': True, b'name': b'nvim_buf_get_number', b'return_type': b'Integer', b'since': 1, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 2}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_name', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'String'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_name', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_is_valid', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Boolean'}, {b'method': False, b'name': b'buffer_insert', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'lnum'], [b'ArrayOf(String)', b'lines']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_mark', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_add_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_clear_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_list_wins', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_set_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_del_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'tabpage_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'tabpage_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_win', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Window'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_number', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_is_valid', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Boolean'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_attach', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Dictionary', b'options']], b'return_type': b'void'}, {b'method': False, b'name': b'ui_attach', b'return_type': b'void', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Boolean', b'enable_rgb']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_ui_detach', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_try_resize', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_command', b'parameters': [[b'String', b'command']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_feedkeys', b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_input', b'parameters': [[b'String', b'keys']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_replace_termcodes', b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_command_output', b'parameters': [[b'String', b'str']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_eval', b'parameters': [[b'String', b'expr']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_call_function', b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_strwidth', b'parameters': [[b'String', b'str']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_list_runtime_paths', b'parameters': [], b'return_type': b'ArrayOf(String)'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_dir', b'parameters': [[b'String', b'dir']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_line', b'parameters': [], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_line', b'parameters': [[b'String', b'line']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_current_line', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_var', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_var', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_var', b'parameters': [[b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'vim_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_get_vvar', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_get_option', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_out_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_writeln', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_bufs', b'parameters': [], b'return_type': b'ArrayOf(Buffer)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_buf', b'parameters': [], b'return_type': b'Buffer'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_buf', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_wins', b'parameters': [], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_win', b'parameters': [], b'return_type': b'Window'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_win', b'parameters': [[b'Window', b'window']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_tabpages', b'parameters': [], b'return_type': b'ArrayOf(Tabpage)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_tabpage', b'parameters': [], b'return_type': b'Tabpage'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_tabpage', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_subscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_unsubscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_by_name', b'parameters': [[b'String', b'name']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_map', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 2, b'method': False, b'name': b'nvim_get_mode', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 1, b'method': False, b'name': b'nvim_get_api_info', b'parameters': [], b'return_type': b'Array'}, {b'since': 1, b'method': False, b'name': b'nvim_call_atomic', b'parameters': [[b'Array', b'calls']], b'return_type': b'Array'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_buf', b'parameters': [[b'Window', b'window']], b'return_type': b'Buffer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_cursor', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_cursor', b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_height', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_height', b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_width', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_width', b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_var', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_del_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'window_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'window_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_option', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_option', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_position', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_tabpage', b'parameters': [[b'Window', b'window']], b'return_type': b'Tabpage'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_number', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_is_valid', b'parameters': [[b'Window', b'window']], b'return_type': b'Boolean'}, {b'method': True, b'name': b'buffer_line_count', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_lines', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_lines', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_number', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_name', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_name', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_mark', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_add_highlight', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_clear_highlight', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_window', b'return_type': b'Window', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_detach', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_try_resize', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'command']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_feedkeys', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_input', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'keys']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_replace_termcodes', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command_output', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_eval', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'expr']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_call_function', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_strwidth', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_list_runtime_paths', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_change_directory', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'dir']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_line', b'return_type': b'String', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_current_line', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_vvar', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_out_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_err_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_report_error', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_buffers', b'return_type': b'ArrayOf(Buffer)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_buffer', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_window', b'return_type': b'Window', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_window', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_tabpages', b'return_type': b'ArrayOf(Tabpage)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_tabpage', b'return_type': b'void', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_subscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_unsubscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_name_to_color', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_color_map', b'return_type': b'Dictionary', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_api_info', b'return_type': b'Array', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_cursor', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_cursor', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_height', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_height', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_width', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_width', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_position', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}], b'error_types': {b'Validation': {b'id': 1}, b'Exception': {b'id': 0}}}]
2017-10-15 12:10:55,916 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,922 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 2, 'nvim_eval', ('globpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)',)]
2017-10-15 12:10:55,922 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,922 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,922 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x02\xa9nvim_eval\x91\xda\x00Fglobpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)''
2017-10-15 12:10:55,923 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,923 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 1, None, [9, {b'types': {b'Window': {b'prefix': b'nvim_win_', b'id': 1}, b'Buffer': {b'prefix': b'nvim_buf_', b'id': 0}, b'Tabpage': {b'prefix': b'nvim_tabpage_', b'id': 2}}, b'version': {b'api_compatible': 0, b'api_level': 2, b'api_prerelease': False, b'minor': 2, b'patch': 0, b'major': 0}, b'functions': [{b'since': 1, b'method': True, b'name': b'nvim_buf_line_count', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'method': False, b'name': b'buffer_get_line', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_set_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index'], [b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_get_line_slice', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'return_type': b'ArrayOf(String)'}, {b'method': False, b'name': b'buffer_set_line_slice', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 2, b'method': True, b'name': b'nvim_buf_get_changedtick', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_del_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'buffer_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'method': True, b'name': b'nvim_buf_get_number', b'return_type': b'Integer', b'since': 1, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 2}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_name', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'String'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_name', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_is_valid', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Boolean'}, {b'method': False, b'name': b'buffer_insert', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'lnum'], [b'ArrayOf(String)', b'lines']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_mark', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_add_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_clear_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_list_wins', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_set_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_del_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'tabpage_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'tabpage_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_win', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Window'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_number', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_is_valid', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Boolean'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_attach', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Dictionary', b'options']], b'return_type': b'void'}, {b'method': False, b'name': b'ui_attach', b'return_type': b'void', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Boolean', b'enable_rgb']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_ui_detach', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_try_resize', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_command', b'parameters': [[b'String', b'command']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_feedkeys', b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_input', b'parameters': [[b'String', b'keys']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_replace_termcodes', b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_command_output', b'parameters': [[b'String', b'str']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_eval', b'parameters': [[b'String', b'expr']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_call_function', b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_strwidth', b'parameters': [[b'String', b'str']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_list_runtime_paths', b'parameters': [], b'return_type': b'ArrayOf(String)'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_dir', b'parameters': [[b'String', b'dir']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_line', b'parameters': [], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_line', b'parameters': [[b'String', b'line']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_current_line', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_var', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_var', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_var', b'parameters': [[b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'vim_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_get_vvar', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_get_option', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_out_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_writeln', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_bufs', b'parameters': [], b'return_type': b'ArrayOf(Buffer)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_buf', b'parameters': [], b'return_type': b'Buffer'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_buf', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_wins', b'parameters': [], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_win', b'parameters': [], b'return_type': b'Window'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_win', b'parameters': [[b'Window', b'window']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_tabpages', b'parameters': [], b'return_type': b'ArrayOf(Tabpage)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_tabpage', b'parameters': [], b'return_type': b'Tabpage'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_tabpage', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_subscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_unsubscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_by_name', b'parameters': [[b'String', b'name']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_map', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 2, b'method': False, b'name': b'nvim_get_mode', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 1, b'method': False, b'name': b'nvim_get_api_info', b'parameters': [], b'return_type': b'Array'}, {b'since': 1, b'method': False, b'name': b'nvim_call_atomic', b'parameters': [[b'Array', b'calls']], b'return_type': b'Array'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_buf', b'parameters': [[b'Window', b'window']], b'return_type': b'Buffer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_cursor', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_cursor', b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_height', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_height', b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_width', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_width', b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_var', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_del_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'window_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'window_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_option', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_option', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_position', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_tabpage', b'parameters': [[b'Window', b'window']], b'return_type': b'Tabpage'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_number', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_is_valid', b'parameters': [[b'Window', b'window']], b'return_type': b'Boolean'}, {b'method': True, b'name': b'buffer_line_count', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_lines', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_lines', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_number', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_name', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_name', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_mark', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_add_highlight', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_clear_highlight', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_window', b'return_type': b'Window', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_detach', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_try_resize', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'command']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_feedkeys', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_input', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'keys']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_replace_termcodes', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command_output', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_eval', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'expr']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_call_function', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_strwidth', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_list_runtime_paths', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_change_directory', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'dir']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_line', b'return_type': b'String', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_current_line', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_vvar', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_out_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_err_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_report_error', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_buffers', b'return_type': b'ArrayOf(Buffer)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_buffer', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_window', b'return_type': b'Window', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_window', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_tabpages', b'return_type': b'ArrayOf(Tabpage)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_tabpage', b'return_type': b'void', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_subscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_unsubscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_name_to_color', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_color_map', b'return_type': b'Dictionary', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_api_info', b'return_type': b'Array', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_cursor', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_cursor', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_height', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_height', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_width', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_width', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_position', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}], b'error_types': {b'Validation': {b'id': 1}, b'Exception': {b'id': 0}}}]]
2017-10-15 12:10:55,923 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x02\xa9nvim_eval\x91\xda\x00Fglobpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)''
2017-10-15 12:10:55,928 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 2, 'nvim_eval', ('globpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)',)]
2017-10-15 12:10:55,934 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 2, 'nvim_eval', ('globpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)',)]
2017-10-15 12:10:55,934 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,934 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,935 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, [9, {b'types': {b'Window': {b'prefix': b'nvim_win_', b'id': 1}, b'Buffer': {b'prefix': b'nvim_buf_', b'id': 0}, b'Tabpage': {b'prefix': b'nvim_tabpage_', b'id': 2}}, b'version': {b'api_compatible': 0, b'api_level': 2, b'api_prerelease': False, b'minor': 2, b'patch': 0, b'major': 0}, b'functions': [{b'since': 1, b'method': True, b'name': b'nvim_buf_line_count', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'method': False, b'name': b'buffer_get_line', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_set_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index'], [b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'index']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_get_line_slice', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'return_type': b'ArrayOf(String)'}, {b'method': False, b'name': b'buffer_set_line_slice', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'include_start'], [b'Boolean', b'include_end'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_lines', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 2, b'method': True, b'name': b'nvim_buf_get_changedtick', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_del_var', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'buffer_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'buffer_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_option', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'method': True, b'name': b'nvim_buf_get_number', b'return_type': b'Integer', b'since': 1, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 2}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_name', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'String'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_set_name', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_is_valid', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'Boolean'}, {b'method': False, b'name': b'buffer_insert', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'lnum'], [b'ArrayOf(String)', b'lines']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_buf_get_mark', b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_add_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_buf_clear_highlight', b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_list_wins', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_set_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_del_var', b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'tabpage_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'tabpage_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_win', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Window'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_get_number', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_tabpage_is_valid', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'Boolean'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_attach', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Dictionary', b'options']], b'return_type': b'void'}, {b'method': False, b'name': b'ui_attach', b'return_type': b'void', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height'], [b'Boolean', b'enable_rgb']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_ui_detach', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_try_resize', b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_ui_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_command', b'parameters': [[b'String', b'command']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_feedkeys', b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_input', b'parameters': [[b'String', b'keys']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_replace_termcodes', b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_command_output', b'parameters': [[b'String', b'str']], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_eval', b'parameters': [[b'String', b'expr']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_call_function', b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_strwidth', b'parameters': [[b'String', b'str']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_list_runtime_paths', b'parameters': [], b'return_type': b'ArrayOf(String)'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_dir', b'parameters': [[b'String', b'dir']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_line', b'parameters': [], b'return_type': b'String'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_line', b'parameters': [[b'String', b'line']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_current_line', b'parameters': [], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_var', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_var', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_del_var', b'parameters': [[b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'vim_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': False, b'name': b'nvim_get_vvar', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_get_option', b'parameters': [[b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': False, b'name': b'nvim_set_option', b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_out_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_write', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_err_writeln', b'parameters': [[b'String', b'str']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_bufs', b'parameters': [], b'return_type': b'ArrayOf(Buffer)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_buf', b'parameters': [], b'return_type': b'Buffer'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_buf', b'parameters': [[b'Buffer', b'buffer']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_wins', b'parameters': [], b'return_type': b'ArrayOf(Window)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_win', b'parameters': [], b'return_type': b'Window'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_win', b'parameters': [[b'Window', b'window']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_list_tabpages', b'parameters': [], b'return_type': b'ArrayOf(Tabpage)'}, {b'since': 1, b'method': False, b'name': b'nvim_get_current_tabpage', b'parameters': [], b'return_type': b'Tabpage'}, {b'since': 1, b'method': False, b'name': b'nvim_set_current_tabpage', b'parameters': [[b'Tabpage', b'tabpage']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_subscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_unsubscribe', b'parameters': [[b'String', b'event']], b'return_type': b'void'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_by_name', b'parameters': [[b'String', b'name']], b'return_type': b'Integer'}, {b'since': 1, b'method': False, b'name': b'nvim_get_color_map', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 2, b'method': False, b'name': b'nvim_get_mode', b'parameters': [], b'return_type': b'Dictionary'}, {b'since': 1, b'method': False, b'name': b'nvim_get_api_info', b'parameters': [], b'return_type': b'Array'}, {b'since': 1, b'method': False, b'name': b'nvim_call_atomic', b'parameters': [[b'Array', b'calls']], b'return_type': b'Array'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_buf', b'parameters': [[b'Window', b'window']], b'return_type': b'Buffer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_cursor', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_cursor', b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_height', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_height', b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_width', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_width', b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_var', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_del_var', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'void'}, {b'method': False, b'name': b'window_set_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'window_del_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_option', b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'return_type': b'Object'}, {b'since': 1, b'method': True, b'name': b'nvim_win_set_option', b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'return_type': b'void'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_position', b'parameters': [[b'Window', b'window']], b'return_type': b'ArrayOf(Integer, 2)'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_tabpage', b'parameters': [[b'Window', b'window']], b'return_type': b'Tabpage'}, {b'since': 1, b'method': True, b'name': b'nvim_win_get_number', b'parameters': [[b'Window', b'window']], b'return_type': b'Integer'}, {b'since': 1, b'method': True, b'name': b'nvim_win_is_valid', b'parameters': [[b'Window', b'window']], b'return_type': b'Boolean'}, {b'method': True, b'name': b'buffer_line_count', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_lines', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_lines', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'start'], [b'Integer', b'end'], [b'Boolean', b'strict_indexing'], [b'ArrayOf(String)', b'replacement']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_number', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_name', b'return_type': b'String', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_set_name', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_get_mark', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_add_highlight', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'String', b'hl_group'], [b'Integer', b'line'], [b'Integer', b'col_start'], [b'Integer', b'col_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'buffer_clear_highlight', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer'], [b'Integer', b'src_id'], [b'Integer', b'line_start'], [b'Integer', b'line_end']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_get_window', b'return_type': b'Window', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': True, b'name': b'tabpage_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_detach', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'ui_try_resize', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Integer', b'width'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'command']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_feedkeys', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'keys'], [b'String', b'mode'], [b'Boolean', b'escape_csi']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_input', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'keys']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_replace_termcodes', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str'], [b'Boolean', b'from_part'], [b'Boolean', b'do_lt'], [b'Boolean', b'special']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_command_output', b'return_type': b'String', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_eval', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'expr']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_call_function', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'fname'], [b'Array', b'args']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_strwidth', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_list_runtime_paths', b'return_type': b'ArrayOf(String)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_change_directory', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'dir']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_line', b'return_type': b'String', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_line', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'line']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_del_current_line', b'return_type': b'void', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_vvar', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_out_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_err_write', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_report_error', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'str']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_buffers', b'return_type': b'ArrayOf(Buffer)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_buffer', b'return_type': b'void', b'since': 0, b'parameters': [[b'Buffer', b'buffer']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_windows', b'return_type': b'ArrayOf(Window)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_window', b'return_type': b'Window', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_window', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_tabpages', b'return_type': b'ArrayOf(Tabpage)', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_current_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_set_current_tabpage', b'return_type': b'void', b'since': 0, b'parameters': [[b'Tabpage', b'tabpage']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_subscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_unsubscribe', b'return_type': b'void', b'since': 0, b'parameters': [[b'String', b'event']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_name_to_color', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'String', b'name']], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_color_map', b'return_type': b'Dictionary', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': False, b'name': b'vim_get_api_info', b'return_type': b'Array', b'since': 0, b'parameters': [], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_buffer', b'return_type': b'Buffer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_cursor', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_cursor', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'ArrayOf(Integer, 2)', b'pos']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_height', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_height', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'height']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_width', b'return_type': b'Integer', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_width', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'Integer', b'width']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_var', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_option', b'return_type': b'Object', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_set_option', b'return_type': b'void', b'since': 0, b'parameters': [[b'Window', b'window'], [b'String', b'name'], [b'Object', b'value']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_position', b'return_type': b'ArrayOf(Integer, 2)', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_get_tabpage', b'return_type': b'Tabpage', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}, {b'method': True, b'name': b'window_is_valid', b'return_type': b'Boolean', b'since': 0, b'parameters': [[b'Window', b'window']], b'deprecated_since': 1}], b'error_types': {b'Validation': {b'id': 1}, b'Exception': {b'id': 0}}}]
2017-10-15 12:10:55,935 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,935 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x02\xa9nvim_eval\x91\xda\x00Fglobpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)''
2017-10-15 12:10:55,935 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x02\xa9nvim_eval\x91\xda\x00Fglobpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)''
2017-10-15 12:10:55,936 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,936 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,936 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,936 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,936 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,937 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,937 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,937 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 2, None, b'/tmp/plugged/nvim-completion-manager/pythonx\n']
2017-10-15 12:10:55,937 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,937 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 2, None, b'/tmp/plugged/nvim-completion-manager/pythonx\n']
2017-10-15 12:10:55,937 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,942 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 2, 'nvim_eval', ('globpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)',)]
2017-10-15 12:10:55,942 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,942 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b'/tmp/plugged/nvim-completion-manager/pythonx\n'
2017-10-15 12:10:55,942 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,943 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b'/tmp/plugged/nvim-completion-manager/pythonx\n'
2017-10-15 12:10:55,943 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 2, None, b'/tmp/plugged/nvim-completion-manager/pythonx\n']
2017-10-15 12:10:55,943 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x02\xa9nvim_eval\x91\xda\x00Fglobpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)''
2017-10-15 12:10:55,943 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 2, None, b'/tmp/plugged/nvim-completion-manager/pythonx\n']
2017-10-15 12:10:55,943 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,943 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,943 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,943 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b'/tmp/plugged/nvim-completion-manager/pythonx\n'
2017-10-15 12:10:55,943 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,943 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b'/tmp/plugged/nvim-completion-manager/pythonx\n'
2017-10-15 12:10:55,943 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,949 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 2, 'nvim_eval', ('globpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)',)]
2017-10-15 12:10:55,950 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,950 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,950 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,950 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,950 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,950 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x02\xa9nvim_eval\x91\xda\x00Fglobpath(&rtp,"pythonx",1) . "\\n" . globpath(&rtp,"rplugin/python3",1)''
2017-10-15 12:10:55,950 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,950 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,950 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,950 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 2, None, b'/tmp/plugged/nvim-completion-manager/pythonx\n']
2017-10-15 12:10:55,950 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,951 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,951 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,951 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,951 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,951 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b'/tmp/plugged/nvim-completion-manager/pythonx\n'
2017-10-15 12:10:55,951 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,952 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 3, 'nvim_get_var', ('cm_completed_snippet_engine',)]
2017-10-15 12:10:55,952 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,952 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,952 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 3, 'nvim_get_var', ('cm_completed_snippet_engine',)]
2017-10-15 12:10:55,952 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,952 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 2, None, b'/tmp/plugged/nvim-completion-manager/pythonx\n']
2017-10-15 12:10:55,953 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x03\xacnvim_get_var\x91\xbbcm_completed_snippet_engine''
2017-10-15 12:10:55,953 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x03\xacnvim_get_var\x91\xbbcm_completed_snippet_engine''
2017-10-15 12:10:55,953 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,953 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 3, 'nvim_get_var', ('cm_completed_snippet_engine',)]
2017-10-15 12:10:55,953 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b'/tmp/plugged/nvim-completion-manager/pythonx\n'
2017-10-15 12:10:55,954 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 3, 'nvim_get_var', ('cm_completed_snippet_engine',)]
2017-10-15 12:10:55,954 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,954 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,954 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,954 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x03\xacnvim_get_var\x91\xbbcm_completed_snippet_engine''
2017-10-15 12:10:55,954 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,954 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x03\xacnvim_get_var\x91\xbbcm_completed_snippet_engine''
2017-10-15 12:10:55,954 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,955 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,955 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,955 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,955 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,955 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,955 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 3, None, b'']
2017-10-15 12:10:55,955 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 3, None, b'']
2017-10-15 12:10:55,956 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,956 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,956 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b''
2017-10-15 12:10:55,956 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,956 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 3, 'nvim_get_var', ('cm_completed_snippet_engine',)]
2017-10-15 12:10:55,956 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b''
2017-10-15 12:10:55,956 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 3, None, b'']
2017-10-15 12:10:55,956 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,956 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,957 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 3, None, b'']
2017-10-15 12:10:55,957 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x03\xacnvim_get_var\x91\xbbcm_completed_snippet_engine''
2017-10-15 12:10:55,957 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,957 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b''
2017-10-15 12:10:55,957 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,957 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b''
2017-10-15 12:10:55,957 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,958 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 3, 'nvim_get_var', ('cm_completed_snippet_engine',)]
2017-10-15 12:10:55,958 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,958 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,958 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,958 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,958 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x03\xacnvim_get_var\x91\xbbcm_completed_snippet_engine''
2017-10-15 12:10:55,958 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,958 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,958 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,958 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,958 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,959 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,959 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 3, None, b'']
2017-10-15 12:10:55,959 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,959 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,959 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,959 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b''
2017-10-15 12:10:55,959 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,959 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 4, 'nvim_eval', ('cm#context()',)]
2017-10-15 12:10:55,960 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,960 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,960 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,960 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 3, None, b'']
2017-10-15 12:10:55,960 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x04\xa9nvim_eval\x91\xaccm#context()''
2017-10-15 12:10:55,960 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#_channel_started', ['cm-filepath', 4])]
2017-10-15 12:10:55,960 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#_channel_started', ['cm-keyword-continue', 7])]
2017-10-15 12:10:55,960 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,960 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, b''
2017-10-15 12:10:55,961 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,961 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xb3cm#_channel_started\x92\xabcm-filepath\x04''
2017-10-15 12:10:55,961 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xb3cm#_channel_started\x92\xb3cm-keyword-continue\x07''
2017-10-15 12:10:55,961 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,961 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,961 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,962 [INFO @ cm.py:start_and_run_channel:223] 30760 - <cm-filepath> handler created, entering event loop
2017-10-15 12:10:55,962 [INFO @ cm.py:start_and_run_channel:223] 30760 - <cm-keyword-continue> handler created, entering event loop
2017-10-15 12:10:55,962 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,962 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,962 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 4, None, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:10:55,962 [INFO @ cm.py:start_and_run_channel:275] 30760 - <cm-filepath> entering event loop
2017-10-15 12:10:55,963 [INFO @ cm.py:start_and_run_channel:275] 30760 - <cm-keyword-continue> entering event loop
2017-10-15 12:10:55,963 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 4, 'nvim_call_function', ('tagfiles', [])]
2017-10-15 12:10:55,963 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,963 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, {b'typed': b'', b'bufnr': 1, b'lnum': 1, b'filetype': b'go', b'col': 1, b'changedtick': 3, b'curpos': [0, 1, 1, 0, 1], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}
2017-10-15 12:10:55,963 [DEBUG @ cm.py:on_notification:248] 30760 - channel method: cm_setup, args: []
2017-10-15 12:10:55,964 [DEBUG @ cm.py:on_notification:248] 30760 - channel method: cm_setup, args: []
2017-10-15 12:10:55,964 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x04\xb2nvim_call_function\x92\xa8tagfiles\x90''
2017-10-15 12:10:55,964 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,964 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,964 [INFO @ cm.py:on_notification:261] 30760 - method: cm_setup not implemented, ignore this message
2017-10-15 12:10:55,965 [INFO @ cm.py:on_notification:261] 30760 - method: cm_setup not implemented, ignore this message
2017-10-15 12:10:55,965 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,965 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,965 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,966 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,969 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,970 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,971 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 4, None, []]
2017-10-15 12:10:55,971 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,971 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, []
2017-10-15 12:10:55,972 [INFO @ cm_bufkeyword.py:refresh_keyword:35] 30760 - refreshing_keyword, word_pattern [(-?\d*\.\d\w*)|([^\`\~\!\@\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)]
2017-10-15 12:10:55,972 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,973 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 5, 'nvim_get_current_buf', ()]
2017-10-15 12:10:55,973 [INFO @ cm_tmux.py:refresh_keyword:53] 30760 - list-window: 1
2017-10-15 12:10:55,974 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,974 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x05\xb4nvim_get_current_buf\x90''
2017-10-15 12:10:55,974 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,974 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,974 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,978 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,979 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#_channel_started', ['cm-tags', 8])]
2017-10-15 12:10:55,979 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 5, None, ExtType(code=0, data=b'\x01')]
2017-10-15 12:10:55,980 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xb3cm#_channel_started\x92\xa7cm-tags\x08''
2017-10-15 12:10:55,980 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, ExtType(code=0, data=b'\x01')
2017-10-15 12:10:55,980 [INFO @ cm.py:start_and_run_channel:223] 30760 - <cm-tags> handler created, entering event loop
2017-10-15 12:10:55,980 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,980 [INFO @ cm.py:start_and_run_channel:275] 30760 - <cm-tags> entering event loop
2017-10-15 12:10:55,980 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,981 [DEBUG @ cm.py:on_notification:248] 30760 - channel method: cm_setup, args: []
2017-10-15 12:10:55,981 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,981 [INFO @ cm.py:on_notification:261] 30760 - method: cm_setup not implemented, ignore this message
2017-10-15 12:10:55,981 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,982 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,982 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 6, 'buffer_line_count', (ExtType(code=0, data=b'\x01'),)]
2017-10-15 12:10:55,982 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x06\xb1buffer_line_count\x91\xd4\x00\x01''
2017-10-15 12:10:55,982 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,983 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,983 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 6, None, 849]
2017-10-15 12:10:55,983 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, 849
2017-10-15 12:10:55,983 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,983 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,985 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,986 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,987 [INFO @ cm_bufkeyword.py:refresh_keyword:47] 30760 - keyword refresh begin, current count: 0
2017-10-15 12:10:55,987 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 7, 'nvim_buf_get_lines', (ExtType(code=0, data=b'\x01'), 0, 1000, False)]
2017-10-15 12:10:55,988 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x07\xb2nvim_buf_get_lines\x94\xd4\x00\x01\x00\xcd\x03\xe8\xc2''
2017-10-15 12:10:55,988 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,988 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#_channel_started', ['cm-gocode', 5])]
2017-10-15 12:10:55,988 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xb3cm#_channel_started\x92\xa9cm-gocode\x05''
2017-10-15 12:10:55,988 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,988 [INFO @ cm.py:start_and_run_channel:223] 30760 - <cm-gocode> handler created, entering event loop
2017-10-15 12:10:55,989 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,989 [INFO @ cm.py:start_and_run_channel:275] 30760 - <cm-gocode> entering event loop
2017-10-15 12:10:55,989 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,989 [DEBUG @ cm.py:on_notification:248] 30760 - channel method: cm_setup, args: []
2017-10-15 12:10:55,989 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,989 [INFO @ cm.py:on_notification:261] 30760 - method: cm_setup not implemented, ignore this message
2017-10-15 12:10:55,989 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,990 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,990 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 7, None, [b'// Modified for Tendermint', b'// Originally Copyright (c) 2013-2014 Conformal Systems LLC.', b'// https://github.com/conformal/btcd/blob/master/LICENSE', b'', b'package p2p', b'', b'import (', b'\t"encoding/binary"', b'\t"encoding/json"', b'\t"math"', b'\t"math/rand"', b'\t"net"', b'\t"os"', b'\t"sync"', b'\t"time"', b'', b'\tlog "github.com/sirupsen/logrus"', b'\tcrypto "github.com/tendermint/go-crypto"', b'\tcmn "github.com/tendermint/tmlibs/common"', b')', b'', b'const (', b'\t// addresses under which the address manager will claim to need more addresses.', b'\tneedAddressThreshold = 1000', b'', b'\t// interval used to dump the address cache to disk for future use.', b'\tdumpAddressInterval = time.Minute * 2', b'', b'\t// max addresses in each old address bucket.', b'\toldBucketSize = 64', b'', b'\t// buckets we split old addresses over.', b'\toldBucketCount = 64', b'', b'\t// max addresses in each new address bucket.', b'\tnewBucketSize = 64', b'', b'\t// buckets that we spread new addresses over.', b'\tnewBucketCount = 256', b'', b'\t// old buckets over which an address group will be spread.', b'\toldBucketsPerGroup = 4', b'', b'\t// new buckets over which an source address group will be spread.', b'\tnewBucketsPerGroup = 32', b'', b'\t// buckets a frequently seen new address may end up in.', b'\tmaxNewBucketsPerAddress = 4', b'', b'\t// days before which we assume an address has vanished', b'\t// if we have not seen it announced in that long.', b'\tnumMissingDays = 30', b'', b'\t// tries without a single success before we assume an address is bad.', b'\tnumRetries = 3', b'', b'\t// max failures we will accept without a success before considering an address bad.', b'\tmaxFailures = 10', b'', b'\t// days since the last success before we will consider evicting an address.', b'\tminBadDays = 7', b'', b'\t// % of total addresses known returned by GetSelection.', b'\tgetSelectionPercent = 23', b'', b'\t// min addresses that must be returned by GetSelection. Useful for bootstrapping.', b'\tminGetSelection = 32', b'', b'\t// max addresses returned by GetSelection', b'\t// NOTE: this must match "maxPexMessageSize"', b'\tmaxGetSelection = 250', b'', b'\t// current version of the on-disk format.', b'\tserializationVersion = 1', b')', b'', b'const (', b'\tbucketTypeNew = 0x01', b'\tbucketTypeOld = 0x02', b')', b'', b'// AddrBook - concurrency safe peer address manager.', b'type AddrBook struct {', b'\tcmn.BaseService', b'', b'\tmtx sync.Mutex', b'\tfilePath string', b'\troutabilityStrict bool', b'\trand *rand.Rand', b'\tkey string', b'\tourAddrs map[string]*NetAddress', b'\taddrLookup map[string]*knownAddress // new & old', b'\taddrNew []map[string]*knownAddress', b'\taddrOld []map[string]*knownAddress', b'\twg sync.WaitGroup', b'\tnOld int', b'\tnNew int', b'}', b'', b'// NewAddrBook creates a new address book.', b'// Use Start to begin processing asynchronous address updates.', b'func NewAddrBook(filePath string, routabilityStrict bool) *AddrBook {', b'\tam := &AddrBook{', b'\t\trand: rand.New(rand.NewSource(time.Now().UnixNano())),', b'\t\tourAddrs: make(map[string]*NetAddress),', b'\t\taddrLookup: make(map[string]*knownAddress),', b'\t\tfilePath: filePath,', b'\t\troutabilityStrict: routabilityStrict,', b'\t}', b'\tam.init()', b'\tam.BaseService = *cmn.NewBaseService(nil, "AddrBook", am)', b'\treturn am', b'}', b'', b"// When modifying this, don't forget to update loadFromFile()", b'func (a *AddrBook) init() {', b'\ta.key = crypto.CRandHex(24) // 24/2 * 8 = 96 bits', b'\t// New addr buckets', b'\ta.addrNew = make([]map[string]*knownAddress, newBucketCount)', b'\tfor i := range a.addrNew {', b'\t\ta.addrNew[i] = make(map[string]*knownAddress)', b'\t}', b'\t// Old addr buckets', b'\ta.addrOld = make([]map[string]*knownAddress, oldBucketCount)', b'\tfor i := range a.addrOld {', b'\t\ta.addrOld[i] = make(map[string]*knownAddress)', b'\t}', b'}', b'', b'// OnStart implements Service.', b'func (a *AddrBook) OnStart() error {', b'\ta.BaseService.OnStart()', b'\ta.loadFromFile(a.filePath)', b'\ta.wg.Add(1)', b'\tgo a.saveRoutine()', b'\treturn nil', b'}', b'', b'// OnStop implements Service.', b'func (a *AddrBook) OnStop() {', b'\ta.BaseService.OnStop()', b'}', b'', b'func (a *AddrBook) Wait() {', b'\ta.wg.Wait()', b'}', b'', b'func (a *AddrBook) AddOurAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithField("addr", addr).Info("Add our address to book")', b'', b'\ta.ourAddrs[addr.String()] = addr', b'}', b'', b'func (a *AddrBook) OurAddresses() []*NetAddress {', b'\taddrs := []*NetAddress{}', b'\tfor _, addr := range a.ourAddrs {', b'\t\taddrs = append(addrs, addr)', b'\t}', b'\treturn addrs', b'}', b'', b'// NOTE: addr must not be nil', b'func (a *AddrBook) AddAddress(addr *NetAddress, src *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithFields(log.Fields{', b'\t\t"addr": addr,', b'\t\t"src": src,', b'\t}).Info("Add address to book")', b'\ta.addAddress(addr, src)', b'}', b'', b'func (a *AddrBook) NeedMoreAddrs() bool {', b'\treturn a.Size() < needAddressThreshold', b'}', b'', b'func (a *AddrBook) Size() int {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\treturn a.size()', b'}', b'', b'func (a *AddrBook) size() int {', b'\treturn a.nNew + a.nOld', b'}', b'', b'// Pick an address to connect to with new/old bias.', b'func (a *AddrBook) PickAddress(newBias int) *NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'\tif newBias > 100 {', b'\t\tnewBias = 100', b'\t}', b'\tif newBias < 0 {', b'\t\tnewBias = 0', b'\t}', b'', b'\t// Bias between new and old addresses.', b'\toldCorrelation := math.Sqrt(float64(a.nOld)) * (100.0 - float64(newBias))', b'\tnewCorrelation := math.Sqrt(float64(a.nNew)) * float64(newBias)', b'', b'\tif (newCorrelation+oldCorrelation)*a.rand.Float64() < oldCorrelation {', b'\t\t// pick random Old bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrOld[a.rand.Intn(len(a.addrOld))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t} else {', b'\t\t// pick random New bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrNew[a.rand.Intn(len(a.addrNew))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t}', b'\treturn nil', b'}', b'', b'func (a *AddrBook) MarkGood(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markGood()', b'\tif ka.isNew() {', b'\t\ta.moveToOld(ka)', b'\t}', b'}', b'', b'func (a *AddrBook) MarkAttempt(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markAttempt()', b'}', b'', b'// MarkBad currently just ejects the address. In the future, consider', b'// blacklisting.', b'func (a *AddrBook) MarkBad(addr *NetAddress) {', b'\ta.RemoveAddress(addr)', b'}', b'', b'// RemoveAddress removes the address from the book.', b'func (a *AddrBook) RemoveAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tlog.WithField("addr", addr).Info("Remove address from book")', b'\ta.removeFromAllBuckets(ka)', b'}', b'', b'/* Peer exchange */', b'', b'// GetSelection randomly selects some addresses (old & new). Suitable for peer-exchange protocols.', b'func (a *AddrBook) GetSelection() []*NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'', b'\tallAddr := make([]*NetAddress, a.size())', b'\ti := 0', b'\tfor _, v := range a.addrLookup {', b'\t\tallAddr[i] = v.Addr', b'\t\ti++', b'\t}', b'', b'\tnumAddresses := cmn.MaxInt(', b'\t\tcmn.MinInt(minGetSelection, len(allAddr)),', b'\t\tlen(allAddr)*getSelectionPercent/100)', b'\tnumAddresses = cmn.MinInt(maxGetSelection, numAddresses)', b'', b'\t// Fisher-Yates shuffle the array. We only need to do the first', b"\t// `numAddresses' since we are throwing the rest.", b'\tfor i := 0; i < numAddresses; i++ {', b'\t\t// pick a number between current index and the end', b'\t\tj := rand.Intn(len(allAddr)-i) + i', b'\t\tallAddr[i], allAddr[j] = allAddr[j], allAddr[i]', b'\t}', b'', b'\t// slice off the limit we are willing to share.', b'\treturn allAddr[:numAddresses]', b'}', b'', b'/* Loading & Saving */', b'', b'type addrBookJSON struct {', b'\tKey string', b'\tAddrs []*knownAddress', b'}', b'', b'func (a *AddrBook) saveToFile(filePath string) {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\t// Compile Addrs', b'\taddrs := []*knownAddress{}', b'\tfor _, ka := range a.addrLookup {', b'\t\taddrs = append(addrs, ka)', b'\t}', b'', b'\taJSON := &addrBookJSON{', b'\t\tKey: a.key,', b'\t\tAddrs: addrs,', b'\t}', b'', b'\tjsonBytes, err := json.MarshalIndent(aJSON, "", "\\t")', b'\tif err != nil {', b'\t\tlog.WithField("err", err).Error("Failed to save AddrBook to file")', b'\t\treturn', b'\t}', b'\terr = cmn.WriteFileAtomic(filePath, jsonBytes, 0644)', b'\tif err != nil {', b'\t\tlog.WithFields(log.Fields{', b'\t\t\t"file": filePath,', b'\t\t\t"err": err,', b'\t\t}).Error("Failed to save AddrBook to file")', b'\t}', b'}', b'', b'// Returns false if file does not exist.', b'// cmn.Panics if file is corrupt.', b'func (a *AddrBook) loadFromFile(filePath string) bool {', b"\t// If doesn't exist, do nothing.", b'\t_, err := os.Stat(filePath)', b'\tif os.IsNotExist(err) {', b'\t\treturn false', b'\t}', b'', b'\t// Load addrBookJSON{}', b'\tr, err := os.Open(filePath)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error opening file %s: %v", filePath, err))', b'\t}', b'\tdefer r.Close()', b'\taJSON := &addrBookJSON{}', b'\tdec := json.NewDecoder(r)', b'\terr = dec.Decode(aJSON)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error reading file %s: %v", filePath, err))', b'\t}', b'', b'\t// Restore all the fields...', b'\t// Restore the key', b'\ta.key = aJSON.Key', b'\t// Restore .addrNew & .addrOld', b'\tfor _, ka := range aJSON.Addrs {', b'\t\tfor _, bucketIndex := range ka.Buckets {', b'\t\t\tbucket := a.getBucket(ka.BucketType, bucketIndex)', b'\t\t\tbucket[ka.Addr.String()] = ka', b'\t\t}', b'\t\ta.addrLookup[ka.Addr.String()] = ka', b'\t\tif ka.BucketType == bucketTypeNew {', b'\t\t\ta.nNew++', b'\t\t} else {', b'\t\t\ta.nOld++', b'\t\t}', b'\t}', b'\treturn true', b'}', b'', b'// Save saves the book.', b'func (a *AddrBook) Save() {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'\ta.saveToFile(a.filePath)', b'}', b'', b'/* Private methods */', b'', b'func (a *AddrBook) saveRoutine() {', b'\tdumpAddressTicker := time.NewTicker(dumpAddressInterval)', b'out:', b'\tfor {', b'\t\tselect {', b'\t\tcase <-dumpAddressTicker.C:', b'\t\t\ta.saveToFile(a.filePath)', b'\t\tcase <-a.Quit:', b'\t\t\tbreak out', b'\t\t}', b'\t}', b'\tdumpAddressTicker.Stop()', b'\ta.saveToFile(a.filePath)', b'\ta.wg.Done()', b'\tlog.Info("Address handler done")', b'}', b'', b'func (a *AddrBook) getBucket(bucketType byte, bucketIdx int) map[string]*knownAddress {', b'\tswitch bucketType {', b'\tcase bucketTypeNew:', b'\t\treturn a.addrNew[bucketIdx]', b'\tcase bucketTypeOld:', b'\t\treturn a.addrOld[bucketIdx]', b'\tdefault:', b'\t\tcmn.PanicSanity("Should not happen")', b'\t\treturn nil', b'\t}', b'}', b'', b"// Adds ka to new bucket. Returns false if it couldn't do it cuz buckets full.", b'// NOTE: currently it always returns true.', b'func (a *AddrBook) addToNewBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot add address already in old bucket to a new bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > newBucketSize {', b'\t\tlog.Info("new bucket is full, expiring old ")', b'\t\ta.expireNew(bucketIdx)', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nNew++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b"// Adds ka to old bucket. Returns false if it couldn't do it cuz buckets full.", b'func (a *AddrBook) addToOldBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isNew() {', b'\t\tlog.Error(cmn.Fmt("Cannot add new address to old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'\tif len(ka.Buckets) != 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot add already old address to another old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > oldBucketSize {', b'\t\treturn false', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nOld++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b'func (a *AddrBook) removeFromBucket(ka *knownAddress, bucketType byte, bucketIdx int) {', b'\tif ka.BucketType != bucketType {', b'\t\tlog.Error(cmn.Fmt("Bucket type mismatch: %v", ka))', b'\t\treturn', b'\t}', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tdelete(bucket, ka.Addr.String())', b'\tif ka.removeBucketRef(bucketIdx) == 0 {', b'\t\tif bucketType == bucketTypeNew {', b'\t\t\ta.nNew--', b'\t\t} else {', b'\t\t\ta.nOld--', b'\t\t}', b'\t\tdelete(a.addrLookup, ka.Addr.String())', b'\t}', b'}', b'', b'func (a *AddrBook) removeFromAllBuckets(ka *knownAddress) {', b'\tfor _, bucketIdx := range ka.Buckets {', b'\t\tbucket := a.getBucket(ka.BucketType, bucketIdx)', b'\t\tdelete(bucket, ka.Addr.String())', b'\t}', b'\tka.Buckets = nil', b'\tif ka.BucketType == bucketTypeNew {', b'\t\ta.nNew--', b'\t} else {', b'\t\ta.nOld--', b'\t}', b'\tdelete(a.addrLookup, ka.Addr.String())', b'}', b'', b'func (a *AddrBook) pickOldest(bucketType byte, bucketIdx int) *knownAddress {', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tvar oldest *knownAddress', b'\tfor _, ka := range bucket {', b'\t\tif oldest == nil || ka.LastAttempt.Before(oldest.LastAttempt) {', b'\t\t\toldest = ka', b'\t\t}', b'\t}', b'\treturn oldest', b'}', b'', b'func (a *AddrBook) addAddress(addr, src *NetAddress) {', b'\tif a.routabilityStrict && !addr.Routable() {', b'\t\tlog.Error(cmn.Fmt("Cannot add non-routable address %v", addr))', b'\t\treturn', b'\t}', b'\tif _, ok := a.ourAddrs[addr.String()]; ok {', b'\t\t// Ignore our own listener address.', b'\t\treturn', b'\t}', b'', b'\tka := a.addrLookup[addr.String()]', b'', b'\tif ka != nil {', b'\t\t// Already old.', b'\t\tif ka.isOld() {', b'\t\t\treturn', b'\t\t}', b'\t\t// Already in max new buckets.', b'\t\tif len(ka.Buckets) == maxNewBucketsPerAddress {', b'\t\t\treturn', b'\t\t}', b'\t\t// The more entries we have, the less likely we are to add more.', b'\t\tfactor := int32(2 * len(ka.Buckets))', b'\t\tif a.rand.Int31n(factor) != 0 {', b'\t\t\treturn', b'\t\t}', b'\t} else {', b'\t\tka = newKnownAddress(addr, src)', b'\t}', b'', b'\tbucket := a.calcNewBucket(addr, src)', b'\ta.addToNewBucket(ka, bucket)', b'', b'\tlog.Info("Added new address", "address", addr, "total", a.size())', b'}', b'', b'// Make space in the new buckets by expiring the really bad entries.', b'// If no bad entries are available we remove the oldest.', b'func (a *AddrBook) expireNew(bucketIdx int) {', b'\tfor addrStr, ka := range a.addrNew[bucketIdx] {', b'\t\t// If an entry is bad, throw it away', b'\t\tif ka.isBad() {', b'\t\t\tlog.Info(cmn.Fmt("expiring bad address %v", addrStr))', b'\t\t\ta.removeFromBucket(ka, bucketTypeNew, bucketIdx)', b'\t\t\treturn', b'\t\t}', b'\t}', b'', b"\t// If we haven't thrown out a bad entry, throw out the oldest entry", b'\toldest := a.pickOldest(bucketTypeNew, bucketIdx)', b'\ta.removeFromBucket(oldest, bucketTypeNew, bucketIdx)', b'}', b'', b'// Promotes an address from new to old.', b'// TODO: Move to old probabilistically.', b'// The better a node is, the less likely it should be evicted from an old bucket.', b'func (a *AddrBook) moveToOld(ka *knownAddress) {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that is already old %v", ka))', b'\t\treturn', b'\t}', b'\tif len(ka.Buckets) == 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that isn\'t in any new buckets %v", ka))', b'\t\treturn', b'\t}', b'', b'\t// Remember one of the buckets in which ka is in.', b'\tfreedBucket := ka.Buckets[0]', b'\t// Remove from all (new) buckets.', b'\ta.removeFromAllBuckets(ka)', b"\t// It's officially old now.", b'\tka.BucketType = bucketTypeOld', b'', b'\t// Try to add it to its oldBucket destination.', b'\toldBucketIdx := a.calcOldBucket(ka.Addr)', b'\tadded := a.addToOldBucket(ka, oldBucketIdx)', b'\tif !added {', b'\t\t// No room, must evict something', b'\t\toldest := a.pickOldest(bucketTypeOld, oldBucketIdx)', b'\t\ta.removeFromBucket(oldest, bucketTypeOld, oldBucketIdx)', b'\t\t// Find new bucket to put oldest in', b'\t\tnewBucketIdx := a.calcNewBucket(oldest.Addr, oldest.Src)', b'\t\tadded := a.addToNewBucket(oldest, newBucketIdx)', b'\t\t// No space in newBucket either, just put it in freedBucket from above.', b'\t\tif !added {', b'\t\t\tadded := a.addToNewBucket(oldest, freedBucket)', b'\t\t\tif !added {', b'\t\t\t\tlog.Error(cmn.Fmt("Could not migrate oldest %v to freedBucket %v", oldest, freedBucket))', b'\t\t\t}', b'\t\t}', b'\t\t// Finally, add to bucket again.', b'\t\tadded = a.addToOldBucket(ka, oldBucketIdx)', b'\t\tif !added {', b'\t\t\tlog.Error(cmn.Fmt("Could not re-add ka %v to oldBucketIdx %v", ka, oldBucketIdx))', b'\t\t}', b'\t}', b'}', b'', b'// doublesha256( key + sourcegroup +', b'// int64(doublesha256(key + group + sourcegroup))%bucket_per_group ) % num_new_buckets', b'func (a *AddrBook) calcNewBucket(addr, src *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(a.groupKey(addr))...)', b'\tdata1 = append(data1, []byte(a.groupKey(src))...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= newBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(src)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % newBucketCount)', b'}', b'', b'// doublesha256( key + group +', b'// int64(doublesha256(key + addr))%buckets_per_group ) % num_old_buckets', b'func (a *AddrBook) calcOldBucket(addr *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(addr.String())...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= oldBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(addr)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % oldBucketCount)', b'}', b'', b'// Return a string representing the network group of this address.', b'// This is the /16 for IPv6, the /32 (/36 for he.net) for IPv6, the string', b'// "local" for a local address and the string "unroutable for an unroutable', b'// address.', b'func (a *AddrBook) groupKey(na *NetAddress) string {', b'\tif a.routabilityStrict && na.Local() {', b'\t\treturn "local"', b'\t}', b'\tif a.routabilityStrict && !na.Routable() {', b'\t\treturn "unroutable"', b'\t}', b'', b'\tif ipv4 := na.IP.To4(); ipv4 != nil {', b'\t\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'\tif na.RFC6145() || na.RFC6052() {', b'\t\t// last four bytes are the ip address', b'\t\tip := net.IP(na.IP[12:16])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\tif na.RFC3964() {', b'\t\tip := net.IP(na.IP[2:7])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'', b'\t}', b'\tif na.RFC4380() {', b'\t\t// teredo tunnels have the last 4 bytes as the v4 address XOR', b'\t\t// 0xff.', b'\t\tip := net.IP(make([]byte, 4))', b'\t\tfor i, byte := range na.IP[12:16] {', b'\t\t\tip[i] = byte ^ 0xff', b'\t\t}', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\t// OK, so now we know ourselves to be a IPv6 address.', b"\t// bitcoind uses /32 for everything, except for Hurricane Electric's", b'\t// (he.net) IP range, which it uses /36 for.', b'\tbits := 32', b'\theNet := &net.IPNet{IP: net.ParseIP("2001:470::"),', b'\t\tMask: net.CIDRMask(32, 128)}', b'\tif heNet.Contains(na.IP) {', b'\t\tbits = 36', b'\t}', b'', b'\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(bits, 128)}).String()', b'}', b'', b'//-----------------------------------------------------------------------------', b'', b'/*', b' knownAddress', b'', b' tracks information about a known network address that is used', b' to determine how viable an address is.', b'*/', b'type knownAddress struct {', b'\tAddr *NetAddress', b'\tSrc *NetAddress', b'\tAttempts int32', b'\tLastAttempt time.Time', b'\tLastSuccess time.Time', b'\tBucketType byte', b'\tBuckets []int', b'}', b'', b'func newKnownAddress(addr *NetAddress, src *NetAddress) *knownAddress {', b'\treturn &knownAddress{', b'\t\tAddr: addr,', b'\t\tSrc: src,', b'\t\tAttempts: 0,', b'\t\tLastAttempt: time.Now(),', b'\t\tBucketType: bucketTypeNew,', b'\t\tBuckets: nil,', b'\t}', b'}', b'', b'func (ka *knownAddress) isOld() bool {', b'\treturn ka.BucketType == bucketTypeOld', b'}', b'', b'func (ka *knownAddress) isNew() bool {', b'\treturn ka.BucketType == bucketTypeNew', b'}', b'', b'func (ka *knownAddress) markAttempt() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts += 1', b'}', b'', b'func (ka *knownAddress) markGood() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts = 0', b'\tka.LastSuccess = now', b'}', b'', b'func (ka *knownAddress) addBucketRef(bucketIdx int) int {', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket == bucketIdx {', b'\t\t\t// TODO refactor to return error?', b'\t\t\t// log.Warn(Fmt("Bucket already exists in ka.Buckets: %v", ka))', b'\t\t\treturn -1', b'\t\t}', b'\t}', b'\tka.Buckets = append(ka.Buckets, bucketIdx)', b'\treturn len(ka.Buckets)', b'}', b'', b'func (ka *knownAddress) removeBucketRef(bucketIdx int) int {', b'\tbuckets := []int{}', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket != bucketIdx {', b'\t\t\tbuckets = append(buckets, bucket)', b'\t\t}', b'\t}', b'\tif len(buckets) != len(ka.Buckets)-1 {', b'\t\t// TODO refactor to return error?', b'\t\t// log.Warn(Fmt("bucketIdx not found in ka.Buckets: %v", ka))', b'\t\treturn -1', b'\t}', b'\tka.Buckets = buckets', b'\treturn len(ka.Buckets)', b'}', b'', b'/*', b' An address is bad if the address in question has not been tried in the last', b' minute and meets one of the following criteria:', b'', b' 1) It claims to be from the future', b" 2) It hasn't been seen in over a month", b' 3) It has failed at least three times and never succeeded', b' 4) It has failed ten times in the last week', b'', b' All addresses that meet these criteria are assumed to be worthless and not', b' worth keeping hold of.', b'*/', b'func (ka *knownAddress) isBad() bool {', b'\t// Has been attempted in the last minute --> good', b'\tif ka.LastAttempt.Before(time.Now().Add(-1 * time.Minute)) {', b'\t\treturn false', b'\t}', b'', b'\t// Over a month old?', b'\tif ka.LastAttempt.After(time.Now().Add(-1 * numMissingDays * time.Hour * 24)) {', b'\t\treturn true', b'\t}', b'', b'\t// Never succeeded?', b'\tif ka.LastSuccess.IsZero() && ka.Attempts >= numRetries {', b'\t\treturn true', b'\t}', b'', b"\t// Hasn't succeeded in too long?", b'\tif ka.LastSuccess.Before(time.Now().Add(-1*minBadDays*time.Hour*24)) &&', b'\t\tka.Attempts >= maxFailures {', b'\t\treturn true', b'\t}', b'', b'\treturn false', b'}']]
2017-10-15 12:10:55,990 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, [b'// Modified for Tendermint', b'// Originally Copyright (c) 2013-2014 Conformal Systems LLC.', b'// https://github.com/conformal/btcd/blob/master/LICENSE', b'', b'package p2p', b'', b'import (', b'\t"encoding/binary"', b'\t"encoding/json"', b'\t"math"', b'\t"math/rand"', b'\t"net"', b'\t"os"', b'\t"sync"', b'\t"time"', b'', b'\tlog "github.com/sirupsen/logrus"', b'\tcrypto "github.com/tendermint/go-crypto"', b'\tcmn "github.com/tendermint/tmlibs/common"', b')', b'', b'const (', b'\t// addresses under which the address manager will claim to need more addresses.', b'\tneedAddressThreshold = 1000', b'', b'\t// interval used to dump the address cache to disk for future use.', b'\tdumpAddressInterval = time.Minute * 2', b'', b'\t// max addresses in each old address bucket.', b'\toldBucketSize = 64', b'', b'\t// buckets we split old addresses over.', b'\toldBucketCount = 64', b'', b'\t// max addresses in each new address bucket.', b'\tnewBucketSize = 64', b'', b'\t// buckets that we spread new addresses over.', b'\tnewBucketCount = 256', b'', b'\t// old buckets over which an address group will be spread.', b'\toldBucketsPerGroup = 4', b'', b'\t// new buckets over which an source address group will be spread.', b'\tnewBucketsPerGroup = 32', b'', b'\t// buckets a frequently seen new address may end up in.', b'\tmaxNewBucketsPerAddress = 4', b'', b'\t// days before which we assume an address has vanished', b'\t// if we have not seen it announced in that long.', b'\tnumMissingDays = 30', b'', b'\t// tries without a single success before we assume an address is bad.', b'\tnumRetries = 3', b'', b'\t// max failures we will accept without a success before considering an address bad.', b'\tmaxFailures = 10', b'', b'\t// days since the last success before we will consider evicting an address.', b'\tminBadDays = 7', b'', b'\t// % of total addresses known returned by GetSelection.', b'\tgetSelectionPercent = 23', b'', b'\t// min addresses that must be returned by GetSelection. Useful for bootstrapping.', b'\tminGetSelection = 32', b'', b'\t// max addresses returned by GetSelection', b'\t// NOTE: this must match "maxPexMessageSize"', b'\tmaxGetSelection = 250', b'', b'\t// current version of the on-disk format.', b'\tserializationVersion = 1', b')', b'', b'const (', b'\tbucketTypeNew = 0x01', b'\tbucketTypeOld = 0x02', b')', b'', b'// AddrBook - concurrency safe peer address manager.', b'type AddrBook struct {', b'\tcmn.BaseService', b'', b'\tmtx sync.Mutex', b'\tfilePath string', b'\troutabilityStrict bool', b'\trand *rand.Rand', b'\tkey string', b'\tourAddrs map[string]*NetAddress', b'\taddrLookup map[string]*knownAddress // new & old', b'\taddrNew []map[string]*knownAddress', b'\taddrOld []map[string]*knownAddress', b'\twg sync.WaitGroup', b'\tnOld int', b'\tnNew int', b'}', b'', b'// NewAddrBook creates a new address book.', b'// Use Start to begin processing asynchronous address updates.', b'func NewAddrBook(filePath string, routabilityStrict bool) *AddrBook {', b'\tam := &AddrBook{', b'\t\trand: rand.New(rand.NewSource(time.Now().UnixNano())),', b'\t\tourAddrs: make(map[string]*NetAddress),', b'\t\taddrLookup: make(map[string]*knownAddress),', b'\t\tfilePath: filePath,', b'\t\troutabilityStrict: routabilityStrict,', b'\t}', b'\tam.init()', b'\tam.BaseService = *cmn.NewBaseService(nil, "AddrBook", am)', b'\treturn am', b'}', b'', b"// When modifying this, don't forget to update loadFromFile()", b'func (a *AddrBook) init() {', b'\ta.key = crypto.CRandHex(24) // 24/2 * 8 = 96 bits', b'\t// New addr buckets', b'\ta.addrNew = make([]map[string]*knownAddress, newBucketCount)', b'\tfor i := range a.addrNew {', b'\t\ta.addrNew[i] = make(map[string]*knownAddress)', b'\t}', b'\t// Old addr buckets', b'\ta.addrOld = make([]map[string]*knownAddress, oldBucketCount)', b'\tfor i := range a.addrOld {', b'\t\ta.addrOld[i] = make(map[string]*knownAddress)', b'\t}', b'}', b'', b'// OnStart implements Service.', b'func (a *AddrBook) OnStart() error {', b'\ta.BaseService.OnStart()', b'\ta.loadFromFile(a.filePath)', b'\ta.wg.Add(1)', b'\tgo a.saveRoutine()', b'\treturn nil', b'}', b'', b'// OnStop implements Service.', b'func (a *AddrBook) OnStop() {', b'\ta.BaseService.OnStop()', b'}', b'', b'func (a *AddrBook) Wait() {', b'\ta.wg.Wait()', b'}', b'', b'func (a *AddrBook) AddOurAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithField("addr", addr).Info("Add our address to book")', b'', b'\ta.ourAddrs[addr.String()] = addr', b'}', b'', b'func (a *AddrBook) OurAddresses() []*NetAddress {', b'\taddrs := []*NetAddress{}', b'\tfor _, addr := range a.ourAddrs {', b'\t\taddrs = append(addrs, addr)', b'\t}', b'\treturn addrs', b'}', b'', b'// NOTE: addr must not be nil', b'func (a *AddrBook) AddAddress(addr *NetAddress, src *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithFields(log.Fields{', b'\t\t"addr": addr,', b'\t\t"src": src,', b'\t}).Info("Add address to book")', b'\ta.addAddress(addr, src)', b'}', b'', b'func (a *AddrBook) NeedMoreAddrs() bool {', b'\treturn a.Size() < needAddressThreshold', b'}', b'', b'func (a *AddrBook) Size() int {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\treturn a.size()', b'}', b'', b'func (a *AddrBook) size() int {', b'\treturn a.nNew + a.nOld', b'}', b'', b'// Pick an address to connect to with new/old bias.', b'func (a *AddrBook) PickAddress(newBias int) *NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'\tif newBias > 100 {', b'\t\tnewBias = 100', b'\t}', b'\tif newBias < 0 {', b'\t\tnewBias = 0', b'\t}', b'', b'\t// Bias between new and old addresses.', b'\toldCorrelation := math.Sqrt(float64(a.nOld)) * (100.0 - float64(newBias))', b'\tnewCorrelation := math.Sqrt(float64(a.nNew)) * float64(newBias)', b'', b'\tif (newCorrelation+oldCorrelation)*a.rand.Float64() < oldCorrelation {', b'\t\t// pick random Old bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrOld[a.rand.Intn(len(a.addrOld))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t} else {', b'\t\t// pick random New bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrNew[a.rand.Intn(len(a.addrNew))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t}', b'\treturn nil', b'}', b'', b'func (a *AddrBook) MarkGood(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markGood()', b'\tif ka.isNew() {', b'\t\ta.moveToOld(ka)', b'\t}', b'}', b'', b'func (a *AddrBook) MarkAttempt(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markAttempt()', b'}', b'', b'// MarkBad currently just ejects the address. In the future, consider', b'// blacklisting.', b'func (a *AddrBook) MarkBad(addr *NetAddress) {', b'\ta.RemoveAddress(addr)', b'}', b'', b'// RemoveAddress removes the address from the book.', b'func (a *AddrBook) RemoveAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tlog.WithField("addr", addr).Info("Remove address from book")', b'\ta.removeFromAllBuckets(ka)', b'}', b'', b'/* Peer exchange */', b'', b'// GetSelection randomly selects some addresses (old & new). Suitable for peer-exchange protocols.', b'func (a *AddrBook) GetSelection() []*NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'', b'\tallAddr := make([]*NetAddress, a.size())', b'\ti := 0', b'\tfor _, v := range a.addrLookup {', b'\t\tallAddr[i] = v.Addr', b'\t\ti++', b'\t}', b'', b'\tnumAddresses := cmn.MaxInt(', b'\t\tcmn.MinInt(minGetSelection, len(allAddr)),', b'\t\tlen(allAddr)*getSelectionPercent/100)', b'\tnumAddresses = cmn.MinInt(maxGetSelection, numAddresses)', b'', b'\t// Fisher-Yates shuffle the array. We only need to do the first', b"\t// `numAddresses' since we are throwing the rest.", b'\tfor i := 0; i < numAddresses; i++ {', b'\t\t// pick a number between current index and the end', b'\t\tj := rand.Intn(len(allAddr)-i) + i', b'\t\tallAddr[i], allAddr[j] = allAddr[j], allAddr[i]', b'\t}', b'', b'\t// slice off the limit we are willing to share.', b'\treturn allAddr[:numAddresses]', b'}', b'', b'/* Loading & Saving */', b'', b'type addrBookJSON struct {', b'\tKey string', b'\tAddrs []*knownAddress', b'}', b'', b'func (a *AddrBook) saveToFile(filePath string) {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\t// Compile Addrs', b'\taddrs := []*knownAddress{}', b'\tfor _, ka := range a.addrLookup {', b'\t\taddrs = append(addrs, ka)', b'\t}', b'', b'\taJSON := &addrBookJSON{', b'\t\tKey: a.key,', b'\t\tAddrs: addrs,', b'\t}', b'', b'\tjsonBytes, err := json.MarshalIndent(aJSON, "", "\\t")', b'\tif err != nil {', b'\t\tlog.WithField("err", err).Error("Failed to save AddrBook to file")', b'\t\treturn', b'\t}', b'\terr = cmn.WriteFileAtomic(filePath, jsonBytes, 0644)', b'\tif err != nil {', b'\t\tlog.WithFields(log.Fields{', b'\t\t\t"file": filePath,', b'\t\t\t"err": err,', b'\t\t}).Error("Failed to save AddrBook to file")', b'\t}', b'}', b'', b'// Returns false if file does not exist.', b'// cmn.Panics if file is corrupt.', b'func (a *AddrBook) loadFromFile(filePath string) bool {', b"\t// If doesn't exist, do nothing.", b'\t_, err := os.Stat(filePath)', b'\tif os.IsNotExist(err) {', b'\t\treturn false', b'\t}', b'', b'\t// Load addrBookJSON{}', b'\tr, err := os.Open(filePath)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error opening file %s: %v", filePath, err))', b'\t}', b'\tdefer r.Close()', b'\taJSON := &addrBookJSON{}', b'\tdec := json.NewDecoder(r)', b'\terr = dec.Decode(aJSON)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error reading file %s: %v", filePath, err))', b'\t}', b'', b'\t// Restore all the fields...', b'\t// Restore the key', b'\ta.key = aJSON.Key', b'\t// Restore .addrNew & .addrOld', b'\tfor _, ka := range aJSON.Addrs {', b'\t\tfor _, bucketIndex := range ka.Buckets {', b'\t\t\tbucket := a.getBucket(ka.BucketType, bucketIndex)', b'\t\t\tbucket[ka.Addr.String()] = ka', b'\t\t}', b'\t\ta.addrLookup[ka.Addr.String()] = ka', b'\t\tif ka.BucketType == bucketTypeNew {', b'\t\t\ta.nNew++', b'\t\t} else {', b'\t\t\ta.nOld++', b'\t\t}', b'\t}', b'\treturn true', b'}', b'', b'// Save saves the book.', b'func (a *AddrBook) Save() {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'\ta.saveToFile(a.filePath)', b'}', b'', b'/* Private methods */', b'', b'func (a *AddrBook) saveRoutine() {', b'\tdumpAddressTicker := time.NewTicker(dumpAddressInterval)', b'out:', b'\tfor {', b'\t\tselect {', b'\t\tcase <-dumpAddressTicker.C:', b'\t\t\ta.saveToFile(a.filePath)', b'\t\tcase <-a.Quit:', b'\t\t\tbreak out', b'\t\t}', b'\t}', b'\tdumpAddressTicker.Stop()', b'\ta.saveToFile(a.filePath)', b'\ta.wg.Done()', b'\tlog.Info("Address handler done")', b'}', b'', b'func (a *AddrBook) getBucket(bucketType byte, bucketIdx int) map[string]*knownAddress {', b'\tswitch bucketType {', b'\tcase bucketTypeNew:', b'\t\treturn a.addrNew[bucketIdx]', b'\tcase bucketTypeOld:', b'\t\treturn a.addrOld[bucketIdx]', b'\tdefault:', b'\t\tcmn.PanicSanity("Should not happen")', b'\t\treturn nil', b'\t}', b'}', b'', b"// Adds ka to new bucket. Returns false if it couldn't do it cuz buckets full.", b'// NOTE: currently it always returns true.', b'func (a *AddrBook) addToNewBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot add address already in old bucket to a new bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > newBucketSize {', b'\t\tlog.Info("new bucket is full, expiring old ")', b'\t\ta.expireNew(bucketIdx)', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nNew++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b"// Adds ka to old bucket. Returns false if it couldn't do it cuz buckets full.", b'func (a *AddrBook) addToOldBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isNew() {', b'\t\tlog.Error(cmn.Fmt("Cannot add new address to old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'\tif len(ka.Buckets) != 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot add already old address to another old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > oldBucketSize {', b'\t\treturn false', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nOld++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b'func (a *AddrBook) removeFromBucket(ka *knownAddress, bucketType byte, bucketIdx int) {', b'\tif ka.BucketType != bucketType {', b'\t\tlog.Error(cmn.Fmt("Bucket type mismatch: %v", ka))', b'\t\treturn', b'\t}', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tdelete(bucket, ka.Addr.String())', b'\tif ka.removeBucketRef(bucketIdx) == 0 {', b'\t\tif bucketType == bucketTypeNew {', b'\t\t\ta.nNew--', b'\t\t} else {', b'\t\t\ta.nOld--', b'\t\t}', b'\t\tdelete(a.addrLookup, ka.Addr.String())', b'\t}', b'}', b'', b'func (a *AddrBook) removeFromAllBuckets(ka *knownAddress) {', b'\tfor _, bucketIdx := range ka.Buckets {', b'\t\tbucket := a.getBucket(ka.BucketType, bucketIdx)', b'\t\tdelete(bucket, ka.Addr.String())', b'\t}', b'\tka.Buckets = nil', b'\tif ka.BucketType == bucketTypeNew {', b'\t\ta.nNew--', b'\t} else {', b'\t\ta.nOld--', b'\t}', b'\tdelete(a.addrLookup, ka.Addr.String())', b'}', b'', b'func (a *AddrBook) pickOldest(bucketType byte, bucketIdx int) *knownAddress {', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tvar oldest *knownAddress', b'\tfor _, ka := range bucket {', b'\t\tif oldest == nil || ka.LastAttempt.Before(oldest.LastAttempt) {', b'\t\t\toldest = ka', b'\t\t}', b'\t}', b'\treturn oldest', b'}', b'', b'func (a *AddrBook) addAddress(addr, src *NetAddress) {', b'\tif a.routabilityStrict && !addr.Routable() {', b'\t\tlog.Error(cmn.Fmt("Cannot add non-routable address %v", addr))', b'\t\treturn', b'\t}', b'\tif _, ok := a.ourAddrs[addr.String()]; ok {', b'\t\t// Ignore our own listener address.', b'\t\treturn', b'\t}', b'', b'\tka := a.addrLookup[addr.String()]', b'', b'\tif ka != nil {', b'\t\t// Already old.', b'\t\tif ka.isOld() {', b'\t\t\treturn', b'\t\t}', b'\t\t// Already in max new buckets.', b'\t\tif len(ka.Buckets) == maxNewBucketsPerAddress {', b'\t\t\treturn', b'\t\t}', b'\t\t// The more entries we have, the less likely we are to add more.', b'\t\tfactor := int32(2 * len(ka.Buckets))', b'\t\tif a.rand.Int31n(factor) != 0 {', b'\t\t\treturn', b'\t\t}', b'\t} else {', b'\t\tka = newKnownAddress(addr, src)', b'\t}', b'', b'\tbucket := a.calcNewBucket(addr, src)', b'\ta.addToNewBucket(ka, bucket)', b'', b'\tlog.Info("Added new address", "address", addr, "total", a.size())', b'}', b'', b'// Make space in the new buckets by expiring the really bad entries.', b'// If no bad entries are available we remove the oldest.', b'func (a *AddrBook) expireNew(bucketIdx int) {', b'\tfor addrStr, ka := range a.addrNew[bucketIdx] {', b'\t\t// If an entry is bad, throw it away', b'\t\tif ka.isBad() {', b'\t\t\tlog.Info(cmn.Fmt("expiring bad address %v", addrStr))', b'\t\t\ta.removeFromBucket(ka, bucketTypeNew, bucketIdx)', b'\t\t\treturn', b'\t\t}', b'\t}', b'', b"\t// If we haven't thrown out a bad entry, throw out the oldest entry", b'\toldest := a.pickOldest(bucketTypeNew, bucketIdx)', b'\ta.removeFromBucket(oldest, bucketTypeNew, bucketIdx)', b'}', b'', b'// Promotes an address from new to old.', b'// TODO: Move to old probabilistically.', b'// The better a node is, the less likely it should be evicted from an old bucket.', b'func (a *AddrBook) moveToOld(ka *knownAddress) {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that is already old %v", ka))', b'\t\treturn', b'\t}', b'\tif len(ka.Buckets) == 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that isn\'t in any new buckets %v", ka))', b'\t\treturn', b'\t}', b'', b'\t// Remember one of the buckets in which ka is in.', b'\tfreedBucket := ka.Buckets[0]', b'\t// Remove from all (new) buckets.', b'\ta.removeFromAllBuckets(ka)', b"\t// It's officially old now.", b'\tka.BucketType = bucketTypeOld', b'', b'\t// Try to add it to its oldBucket destination.', b'\toldBucketIdx := a.calcOldBucket(ka.Addr)', b'\tadded := a.addToOldBucket(ka, oldBucketIdx)', b'\tif !added {', b'\t\t// No room, must evict something', b'\t\toldest := a.pickOldest(bucketTypeOld, oldBucketIdx)', b'\t\ta.removeFromBucket(oldest, bucketTypeOld, oldBucketIdx)', b'\t\t// Find new bucket to put oldest in', b'\t\tnewBucketIdx := a.calcNewBucket(oldest.Addr, oldest.Src)', b'\t\tadded := a.addToNewBucket(oldest, newBucketIdx)', b'\t\t// No space in newBucket either, just put it in freedBucket from above.', b'\t\tif !added {', b'\t\t\tadded := a.addToNewBucket(oldest, freedBucket)', b'\t\t\tif !added {', b'\t\t\t\tlog.Error(cmn.Fmt("Could not migrate oldest %v to freedBucket %v", oldest, freedBucket))', b'\t\t\t}', b'\t\t}', b'\t\t// Finally, add to bucket again.', b'\t\tadded = a.addToOldBucket(ka, oldBucketIdx)', b'\t\tif !added {', b'\t\t\tlog.Error(cmn.Fmt("Could not re-add ka %v to oldBucketIdx %v", ka, oldBucketIdx))', b'\t\t}', b'\t}', b'}', b'', b'// doublesha256( key + sourcegroup +', b'// int64(doublesha256(key + group + sourcegroup))%bucket_per_group ) % num_new_buckets', b'func (a *AddrBook) calcNewBucket(addr, src *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(a.groupKey(addr))...)', b'\tdata1 = append(data1, []byte(a.groupKey(src))...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= newBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(src)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % newBucketCount)', b'}', b'', b'// doublesha256( key + group +', b'// int64(doublesha256(key + addr))%buckets_per_group ) % num_old_buckets', b'func (a *AddrBook) calcOldBucket(addr *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(addr.String())...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= oldBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(addr)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % oldBucketCount)', b'}', b'', b'// Return a string representing the network group of this address.', b'// This is the /16 for IPv6, the /32 (/36 for he.net) for IPv6, the string', b'// "local" for a local address and the string "unroutable for an unroutable', b'// address.', b'func (a *AddrBook) groupKey(na *NetAddress) string {', b'\tif a.routabilityStrict && na.Local() {', b'\t\treturn "local"', b'\t}', b'\tif a.routabilityStrict && !na.Routable() {', b'\t\treturn "unroutable"', b'\t}', b'', b'\tif ipv4 := na.IP.To4(); ipv4 != nil {', b'\t\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'\tif na.RFC6145() || na.RFC6052() {', b'\t\t// last four bytes are the ip address', b'\t\tip := net.IP(na.IP[12:16])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\tif na.RFC3964() {', b'\t\tip := net.IP(na.IP[2:7])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'', b'\t}', b'\tif na.RFC4380() {', b'\t\t// teredo tunnels have the last 4 bytes as the v4 address XOR', b'\t\t// 0xff.', b'\t\tip := net.IP(make([]byte, 4))', b'\t\tfor i, byte := range na.IP[12:16] {', b'\t\t\tip[i] = byte ^ 0xff', b'\t\t}', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\t// OK, so now we know ourselves to be a IPv6 address.', b"\t// bitcoind uses /32 for everything, except for Hurricane Electric's", b'\t// (he.net) IP range, which it uses /36 for.', b'\tbits := 32', b'\theNet := &net.IPNet{IP: net.ParseIP("2001:470::"),', b'\t\tMask: net.CIDRMask(32, 128)}', b'\tif heNet.Contains(na.IP) {', b'\t\tbits = 36', b'\t}', b'', b'\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(bits, 128)}).String()', b'}', b'', b'//-----------------------------------------------------------------------------', b'', b'/*', b' knownAddress', b'', b' tracks information about a known network address that is used', b' to determine how viable an address is.', b'*/', b'type knownAddress struct {', b'\tAddr *NetAddress', b'\tSrc *NetAddress', b'\tAttempts int32', b'\tLastAttempt time.Time', b'\tLastSuccess time.Time', b'\tBucketType byte', b'\tBuckets []int', b'}', b'', b'func newKnownAddress(addr *NetAddress, src *NetAddress) *knownAddress {', b'\treturn &knownAddress{', b'\t\tAddr: addr,', b'\t\tSrc: src,', b'\t\tAttempts: 0,', b'\t\tLastAttempt: time.Now(),', b'\t\tBucketType: bucketTypeNew,', b'\t\tBuckets: nil,', b'\t}', b'}', b'', b'func (ka *knownAddress) isOld() bool {', b'\treturn ka.BucketType == bucketTypeOld', b'}', b'', b'func (ka *knownAddress) isNew() bool {', b'\treturn ka.BucketType == bucketTypeNew', b'}', b'', b'func (ka *knownAddress) markAttempt() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts += 1', b'}', b'', b'func (ka *knownAddress) markGood() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts = 0', b'\tka.LastSuccess = now', b'}', b'', b'func (ka *knownAddress) addBucketRef(bucketIdx int) int {', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket == bucketIdx {', b'\t\t\t// TODO refactor to return error?', b'\t\t\t// log.Warn(Fmt("Bucket already exists in ka.Buckets: %v", ka))', b'\t\t\treturn -1', b'\t\t}', b'\t}', b'\tka.Buckets = append(ka.Buckets, bucketIdx)', b'\treturn len(ka.Buckets)', b'}', b'', b'func (ka *knownAddress) removeBucketRef(bucketIdx int) int {', b'\tbuckets := []int{}', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket != bucketIdx {', b'\t\t\tbuckets = append(buckets, bucket)', b'\t\t}', b'\t}', b'\tif len(buckets) != len(ka.Buckets)-1 {', b'\t\t// TODO refactor to return error?', b'\t\t// log.Warn(Fmt("bucketIdx not found in ka.Buckets: %v", ka))', b'\t\treturn -1', b'\t}', b'\tka.Buckets = buckets', b'\treturn len(ka.Buckets)', b'}', b'', b'/*', b' An address is bad if the address in question has not been tried in the last', b' minute and meets one of the following criteria:', b'', b' 1) It claims to be from the future', b" 2) It hasn't been seen in over a month", b' 3) It has failed at least three times and never succeeded', b' 4) It has failed ten times in the last week', b'', b' All addresses that meet these criteria are assumed to be worthless and not', b' worth keeping hold of.', b'*/', b'func (ka *knownAddress) isBad() bool {', b'\t// Has been attempted in the last minute --> good', b'\tif ka.LastAttempt.Before(time.Now().Add(-1 * time.Minute)) {', b'\t\treturn false', b'\t}', b'', b'\t// Over a month old?', b'\tif ka.LastAttempt.After(time.Now().Add(-1 * numMissingDays * time.Hour * 24)) {', b'\t\treturn true', b'\t}', b'', b'\t// Never succeeded?', b'\tif ka.LastSuccess.IsZero() && ka.Attempts >= numRetries {', b'\t\treturn true', b'\t}', b'', b"\t// Hasn't succeeded in too long?", b'\tif ka.LastSuccess.Before(time.Now().Add(-1*minBadDays*time.Hour*24)) &&', b'\t\tka.Attempts >= maxFailures {', b'\t\treturn true', b'\t}', b'', b'\treturn false', b'}']
2017-10-15 12:10:55,991 [DEBUG @ base.py:stop:149] 30760 - Stopped event loop
2017-10-15 12:10:55,992 [INFO @ cm_tmux.py:refresh_keyword:82] 30760 - keyword refresh complete, count: 96
2017-10-15 12:10:55,992 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:10:55,992 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#_channel_started', ['cm-tmux', 9])]
2017-10-15 12:10:55,992 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:10:55,992 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xb3cm#_channel_started\x92\xa7cm-tmux\t''
2017-10-15 12:10:55,992 [DEBUG @ base.py:run:140] 30760 - Exited event loop
2017-10-15 12:10:55,993 [INFO @ cm.py:start_and_run_channel:223] 30760 - <cm-tmux> handler created, entering event loop
2017-10-15 12:10:55,998 [INFO @ cm_bufkeyword.py:refresh_keyword:70] 30760 - keyword refresh complete, count: 613
2017-10-15 12:10:55,998 [INFO @ cm.py:start_and_run_channel:275] 30760 - <cm-tmux> entering event loop
2017-10-15 12:10:55,998 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#_channel_started', ['cm-bufkeyword', 6])]
2017-10-15 12:10:55,998 [DEBUG @ cm.py:on_notification:248] 30760 - channel method: cm_setup, args: []
2017-10-15 12:10:55,998 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xb3cm#_channel_started\x92\xadcm-bufkeyword\x06''
2017-10-15 12:10:55,999 [INFO @ cm.py:on_notification:261] 30760 - method: cm_setup not implemented, ignore this message
2017-10-15 12:10:55,999 [INFO @ cm.py:start_and_run_channel:223] 30760 - <cm-bufkeyword> handler created, entering event loop
2017-10-15 12:10:55,999 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:10:55,999 [INFO @ cm.py:start_and_run_channel:275] 30760 - <cm-bufkeyword> entering event loop
2017-10-15 12:10:55,999 [DEBUG @ cm.py:on_notification:248] 30760 - channel method: cm_setup, args: []
2017-10-15 12:10:55,999 [INFO @ cm.py:on_notification:261] 30760 - method: cm_setup not implemented, ignore this message
2017-10-15 12:10:55,999 [DEBUG @ base.py:run:138] 30760 - Entering event loop
2017-10-15 12:11:01,194 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:01,194 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:01,195 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_insert_enter', []]
2017-10-15 12:11:01,195 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_event', [b'InsertEnter', {b'typed': b'\t', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 2, b'changedtick': 4, b'curpos': [0, 15, 2, 0, 9], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]]
2017-10-15 12:11:01,195 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_insert_enter', []
2017-10-15 12:11:01,195 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_event', [b'InsertEnter', {b'typed': b'\t', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 2, b'changedtick': 4, b'curpos': [0, 15, 2, 0, 9], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:11:01,195 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674470> will handle it
2017-10-15 12:11:01,195 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x1036743d8> will handle it
2017-10-15 12:11:01,195 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_insert_enter, args: []
2017-10-15 12:11:01,196 [DEBUG @ cm.py:on_notification:248] 30760 - channel method: cm_event, args: ['InsertEnter', {'typed': '\t', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 2, 'changedtick': 4, 'curpos': [0, 15, 2, 0, 9], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:11:01,196 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_insert_enter completed
2017-10-15 12:11:01,196 [INFO @ cm_bufkeyword.py:refresh_keyword:35] 30760 - refreshing_keyword, word_pattern [(-?\d*\.\d\w*)|([^\`\~\!\@\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)]
2017-10-15 12:11:01,196 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674470> finished executing
2017-10-15 12:11:01,197 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 8, 'nvim_get_current_buf', ()]
2017-10-15 12:11:01,197 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674470> is now dying...
2017-10-15 12:11:01,197 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x08\xb4nvim_get_current_buf\x90''
2017-10-15 12:11:01,197 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:01,197 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1036743d8> to wait for response
2017-10-15 12:11:01,197 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:01,197 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:01,197 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:01,197 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:01,198 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 8, None, ExtType(code=0, data=b'\x01')]
2017-10-15 12:11:01,198 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, ExtType(code=0, data=b'\x01')
2017-10-15 12:11:01,198 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1036743d8>, switching back
2017-10-15 12:11:01,198 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 9, 'buffer_line_count', (ExtType(code=0, data=b'\x01'),)]
2017-10-15 12:11:01,198 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\t\xb1buffer_line_count\x91\xd4\x00\x01''
2017-10-15 12:11:01,198 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1036743d8> to wait for response
2017-10-15 12:11:01,198 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:01,198 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:01,198 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:01,198 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 9, None, 850]
2017-10-15 12:11:01,198 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, 850
2017-10-15 12:11:01,198 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1036743d8>, switching back
2017-10-15 12:11:01,199 [INFO @ cm_bufkeyword.py:refresh_keyword:47] 30760 - keyword refresh begin, current count: 0
2017-10-15 12:11:01,199 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 10, 'nvim_buf_get_lines', (ExtType(code=0, data=b'\x01'), 0, 1000, False)]
2017-10-15 12:11:01,199 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\n\xb2nvim_buf_get_lines\x94\xd4\x00\x01\x00\xcd\x03\xe8\xc2''
2017-10-15 12:11:01,199 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x1036743d8> to wait for response
2017-10-15 12:11:01,199 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:01,199 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:01,199 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:01,199 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:01,199 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:01,199 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:01,200 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:01,200 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 10, None, [b'// Modified for Tendermint', b'// Originally Copyright (c) 2013-2014 Conformal Systems LLC.', b'// https://github.com/conformal/btcd/blob/master/LICENSE', b'', b'package p2p', b'', b'import (', b'\t"encoding/binary"', b'\t"encoding/json"', b'\t"math"', b'\t"math/rand"', b'\t"net"', b'\t"os"', b'\t"sync"', b'\t', b'\t"time"', b'', b'\tlog "github.com/sirupsen/logrus"', b'\tcrypto "github.com/tendermint/go-crypto"', b'\tcmn "github.com/tendermint/tmlibs/common"', b')', b'', b'const (', b'\t// addresses under which the address manager will claim to need more addresses.', b'\tneedAddressThreshold = 1000', b'', b'\t// interval used to dump the address cache to disk for future use.', b'\tdumpAddressInterval = time.Minute * 2', b'', b'\t// max addresses in each old address bucket.', b'\toldBucketSize = 64', b'', b'\t// buckets we split old addresses over.', b'\toldBucketCount = 64', b'', b'\t// max addresses in each new address bucket.', b'\tnewBucketSize = 64', b'', b'\t// buckets that we spread new addresses over.', b'\tnewBucketCount = 256', b'', b'\t// old buckets over which an address group will be spread.', b'\toldBucketsPerGroup = 4', b'', b'\t// new buckets over which an source address group will be spread.', b'\tnewBucketsPerGroup = 32', b'', b'\t// buckets a frequently seen new address may end up in.', b'\tmaxNewBucketsPerAddress = 4', b'', b'\t// days before which we assume an address has vanished', b'\t// if we have not seen it announced in that long.', b'\tnumMissingDays = 30', b'', b'\t// tries without a single success before we assume an address is bad.', b'\tnumRetries = 3', b'', b'\t// max failures we will accept without a success before considering an address bad.', b'\tmaxFailures = 10', b'', b'\t// days since the last success before we will consider evicting an address.', b'\tminBadDays = 7', b'', b'\t// % of total addresses known returned by GetSelection.', b'\tgetSelectionPercent = 23', b'', b'\t// min addresses that must be returned by GetSelection. Useful for bootstrapping.', b'\tminGetSelection = 32', b'', b'\t// max addresses returned by GetSelection', b'\t// NOTE: this must match "maxPexMessageSize"', b'\tmaxGetSelection = 250', b'', b'\t// current version of the on-disk format.', b'\tserializationVersion = 1', b')', b'', b'const (', b'\tbucketTypeNew = 0x01', b'\tbucketTypeOld = 0x02', b')', b'', b'// AddrBook - concurrency safe peer address manager.', b'type AddrBook struct {', b'\tcmn.BaseService', b'', b'\tmtx sync.Mutex', b'\tfilePath string', b'\troutabilityStrict bool', b'\trand *rand.Rand', b'\tkey string', b'\tourAddrs map[string]*NetAddress', b'\taddrLookup map[string]*knownAddress // new & old', b'\taddrNew []map[string]*knownAddress', b'\taddrOld []map[string]*knownAddress', b'\twg sync.WaitGroup', b'\tnOld int', b'\tnNew int', b'}', b'', b'// NewAddrBook creates a new address book.', b'// Use Start to begin processing asynchronous address updates.', b'func NewAddrBook(filePath string, routabilityStrict bool) *AddrBook {', b'\tam := &AddrBook{', b'\t\trand: rand.New(rand.NewSource(time.Now().UnixNano())),', b'\t\tourAddrs: make(map[string]*NetAddress),', b'\t\taddrLookup: make(map[string]*knownAddress),', b'\t\tfilePath: filePath,', b'\t\troutabilityStrict: routabilityStrict,', b'\t}', b'\tam.init()', b'\tam.BaseService = *cmn.NewBaseService(nil, "AddrBook", am)', b'\treturn am', b'}', b'', b"// When modifying this, don't forget to update loadFromFile()", b'func (a *AddrBook) init() {', b'\ta.key = crypto.CRandHex(24) // 24/2 * 8 = 96 bits', b'\t// New addr buckets', b'\ta.addrNew = make([]map[string]*knownAddress, newBucketCount)', b'\tfor i := range a.addrNew {', b'\t\ta.addrNew[i] = make(map[string]*knownAddress)', b'\t}', b'\t// Old addr buckets', b'\ta.addrOld = make([]map[string]*knownAddress, oldBucketCount)', b'\tfor i := range a.addrOld {', b'\t\ta.addrOld[i] = make(map[string]*knownAddress)', b'\t}', b'}', b'', b'// OnStart implements Service.', b'func (a *AddrBook) OnStart() error {', b'\ta.BaseService.OnStart()', b'\ta.loadFromFile(a.filePath)', b'\ta.wg.Add(1)', b'\tgo a.saveRoutine()', b'\treturn nil', b'}', b'', b'// OnStop implements Service.', b'func (a *AddrBook) OnStop() {', b'\ta.BaseService.OnStop()', b'}', b'', b'func (a *AddrBook) Wait() {', b'\ta.wg.Wait()', b'}', b'', b'func (a *AddrBook) AddOurAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithField("addr", addr).Info("Add our address to book")', b'', b'\ta.ourAddrs[addr.String()] = addr', b'}', b'', b'func (a *AddrBook) OurAddresses() []*NetAddress {', b'\taddrs := []*NetAddress{}', b'\tfor _, addr := range a.ourAddrs {', b'\t\taddrs = append(addrs, addr)', b'\t}', b'\treturn addrs', b'}', b'', b'// NOTE: addr must not be nil', b'func (a *AddrBook) AddAddress(addr *NetAddress, src *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithFields(log.Fields{', b'\t\t"addr": addr,', b'\t\t"src": src,', b'\t}).Info("Add address to book")', b'\ta.addAddress(addr, src)', b'}', b'', b'func (a *AddrBook) NeedMoreAddrs() bool {', b'\treturn a.Size() < needAddressThreshold', b'}', b'', b'func (a *AddrBook) Size() int {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\treturn a.size()', b'}', b'', b'func (a *AddrBook) size() int {', b'\treturn a.nNew + a.nOld', b'}', b'', b'// Pick an address to connect to with new/old bias.', b'func (a *AddrBook) PickAddress(newBias int) *NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'\tif newBias > 100 {', b'\t\tnewBias = 100', b'\t}', b'\tif newBias < 0 {', b'\t\tnewBias = 0', b'\t}', b'', b'\t// Bias between new and old addresses.', b'\toldCorrelation := math.Sqrt(float64(a.nOld)) * (100.0 - float64(newBias))', b'\tnewCorrelation := math.Sqrt(float64(a.nNew)) * float64(newBias)', b'', b'\tif (newCorrelation+oldCorrelation)*a.rand.Float64() < oldCorrelation {', b'\t\t// pick random Old bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrOld[a.rand.Intn(len(a.addrOld))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t} else {', b'\t\t// pick random New bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrNew[a.rand.Intn(len(a.addrNew))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t}', b'\treturn nil', b'}', b'', b'func (a *AddrBook) MarkGood(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markGood()', b'\tif ka.isNew() {', b'\t\ta.moveToOld(ka)', b'\t}', b'}', b'', b'func (a *AddrBook) MarkAttempt(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markAttempt()', b'}', b'', b'// MarkBad currently just ejects the address. In the future, consider', b'// blacklisting.', b'func (a *AddrBook) MarkBad(addr *NetAddress) {', b'\ta.RemoveAddress(addr)', b'}', b'', b'// RemoveAddress removes the address from the book.', b'func (a *AddrBook) RemoveAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tlog.WithField("addr", addr).Info("Remove address from book")', b'\ta.removeFromAllBuckets(ka)', b'}', b'', b'/* Peer exchange */', b'', b'// GetSelection randomly selects some addresses (old & new). Suitable for peer-exchange protocols.', b'func (a *AddrBook) GetSelection() []*NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'', b'\tallAddr := make([]*NetAddress, a.size())', b'\ti := 0', b'\tfor _, v := range a.addrLookup {', b'\t\tallAddr[i] = v.Addr', b'\t\ti++', b'\t}', b'', b'\tnumAddresses := cmn.MaxInt(', b'\t\tcmn.MinInt(minGetSelection, len(allAddr)),', b'\t\tlen(allAddr)*getSelectionPercent/100)', b'\tnumAddresses = cmn.MinInt(maxGetSelection, numAddresses)', b'', b'\t// Fisher-Yates shuffle the array. We only need to do the first', b"\t// `numAddresses' since we are throwing the rest.", b'\tfor i := 0; i < numAddresses; i++ {', b'\t\t// pick a number between current index and the end', b'\t\tj := rand.Intn(len(allAddr)-i) + i', b'\t\tallAddr[i], allAddr[j] = allAddr[j], allAddr[i]', b'\t}', b'', b'\t// slice off the limit we are willing to share.', b'\treturn allAddr[:numAddresses]', b'}', b'', b'/* Loading & Saving */', b'', b'type addrBookJSON struct {', b'\tKey string', b'\tAddrs []*knownAddress', b'}', b'', b'func (a *AddrBook) saveToFile(filePath string) {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\t// Compile Addrs', b'\taddrs := []*knownAddress{}', b'\tfor _, ka := range a.addrLookup {', b'\t\taddrs = append(addrs, ka)', b'\t}', b'', b'\taJSON := &addrBookJSON{', b'\t\tKey: a.key,', b'\t\tAddrs: addrs,', b'\t}', b'', b'\tjsonBytes, err := json.MarshalIndent(aJSON, "", "\\t")', b'\tif err != nil {', b'\t\tlog.WithField("err", err).Error("Failed to save AddrBook to file")', b'\t\treturn', b'\t}', b'\terr = cmn.WriteFileAtomic(filePath, jsonBytes, 0644)', b'\tif err != nil {', b'\t\tlog.WithFields(log.Fields{', b'\t\t\t"file": filePath,', b'\t\t\t"err": err,', b'\t\t}).Error("Failed to save AddrBook to file")', b'\t}', b'}', b'', b'// Returns false if file does not exist.', b'// cmn.Panics if file is corrupt.', b'func (a *AddrBook) loadFromFile(filePath string) bool {', b"\t// If doesn't exist, do nothing.", b'\t_, err := os.Stat(filePath)', b'\tif os.IsNotExist(err) {', b'\t\treturn false', b'\t}', b'', b'\t// Load addrBookJSON{}', b'\tr, err := os.Open(filePath)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error opening file %s: %v", filePath, err))', b'\t}', b'\tdefer r.Close()', b'\taJSON := &addrBookJSON{}', b'\tdec := json.NewDecoder(r)', b'\terr = dec.Decode(aJSON)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error reading file %s: %v", filePath, err))', b'\t}', b'', b'\t// Restore all the fields...', b'\t// Restore the key', b'\ta.key = aJSON.Key', b'\t// Restore .addrNew & .addrOld', b'\tfor _, ka := range aJSON.Addrs {', b'\t\tfor _, bucketIndex := range ka.Buckets {', b'\t\t\tbucket := a.getBucket(ka.BucketType, bucketIndex)', b'\t\t\tbucket[ka.Addr.String()] = ka', b'\t\t}', b'\t\ta.addrLookup[ka.Addr.String()] = ka', b'\t\tif ka.BucketType == bucketTypeNew {', b'\t\t\ta.nNew++', b'\t\t} else {', b'\t\t\ta.nOld++', b'\t\t}', b'\t}', b'\treturn true', b'}', b'', b'// Save saves the book.', b'func (a *AddrBook) Save() {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'\ta.saveToFile(a.filePath)', b'}', b'', b'/* Private methods */', b'', b'func (a *AddrBook) saveRoutine() {', b'\tdumpAddressTicker := time.NewTicker(dumpAddressInterval)', b'out:', b'\tfor {', b'\t\tselect {', b'\t\tcase <-dumpAddressTicker.C:', b'\t\t\ta.saveToFile(a.filePath)', b'\t\tcase <-a.Quit:', b'\t\t\tbreak out', b'\t\t}', b'\t}', b'\tdumpAddressTicker.Stop()', b'\ta.saveToFile(a.filePath)', b'\ta.wg.Done()', b'\tlog.Info("Address handler done")', b'}', b'', b'func (a *AddrBook) getBucket(bucketType byte, bucketIdx int) map[string]*knownAddress {', b'\tswitch bucketType {', b'\tcase bucketTypeNew:', b'\t\treturn a.addrNew[bucketIdx]', b'\tcase bucketTypeOld:', b'\t\treturn a.addrOld[bucketIdx]', b'\tdefault:', b'\t\tcmn.PanicSanity("Should not happen")', b'\t\treturn nil', b'\t}', b'}', b'', b"// Adds ka to new bucket. Returns false if it couldn't do it cuz buckets full.", b'// NOTE: currently it always returns true.', b'func (a *AddrBook) addToNewBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot add address already in old bucket to a new bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > newBucketSize {', b'\t\tlog.Info("new bucket is full, expiring old ")', b'\t\ta.expireNew(bucketIdx)', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nNew++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b"// Adds ka to old bucket. Returns false if it couldn't do it cuz buckets full.", b'func (a *AddrBook) addToOldBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isNew() {', b'\t\tlog.Error(cmn.Fmt("Cannot add new address to old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'\tif len(ka.Buckets) != 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot add already old address to another old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > oldBucketSize {', b'\t\treturn false', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nOld++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b'func (a *AddrBook) removeFromBucket(ka *knownAddress, bucketType byte, bucketIdx int) {', b'\tif ka.BucketType != bucketType {', b'\t\tlog.Error(cmn.Fmt("Bucket type mismatch: %v", ka))', b'\t\treturn', b'\t}', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tdelete(bucket, ka.Addr.String())', b'\tif ka.removeBucketRef(bucketIdx) == 0 {', b'\t\tif bucketType == bucketTypeNew {', b'\t\t\ta.nNew--', b'\t\t} else {', b'\t\t\ta.nOld--', b'\t\t}', b'\t\tdelete(a.addrLookup, ka.Addr.String())', b'\t}', b'}', b'', b'func (a *AddrBook) removeFromAllBuckets(ka *knownAddress) {', b'\tfor _, bucketIdx := range ka.Buckets {', b'\t\tbucket := a.getBucket(ka.BucketType, bucketIdx)', b'\t\tdelete(bucket, ka.Addr.String())', b'\t}', b'\tka.Buckets = nil', b'\tif ka.BucketType == bucketTypeNew {', b'\t\ta.nNew--', b'\t} else {', b'\t\ta.nOld--', b'\t}', b'\tdelete(a.addrLookup, ka.Addr.String())', b'}', b'', b'func (a *AddrBook) pickOldest(bucketType byte, bucketIdx int) *knownAddress {', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tvar oldest *knownAddress', b'\tfor _, ka := range bucket {', b'\t\tif oldest == nil || ka.LastAttempt.Before(oldest.LastAttempt) {', b'\t\t\toldest = ka', b'\t\t}', b'\t}', b'\treturn oldest', b'}', b'', b'func (a *AddrBook) addAddress(addr, src *NetAddress) {', b'\tif a.routabilityStrict && !addr.Routable() {', b'\t\tlog.Error(cmn.Fmt("Cannot add non-routable address %v", addr))', b'\t\treturn', b'\t}', b'\tif _, ok := a.ourAddrs[addr.String()]; ok {', b'\t\t// Ignore our own listener address.', b'\t\treturn', b'\t}', b'', b'\tka := a.addrLookup[addr.String()]', b'', b'\tif ka != nil {', b'\t\t// Already old.', b'\t\tif ka.isOld() {', b'\t\t\treturn', b'\t\t}', b'\t\t// Already in max new buckets.', b'\t\tif len(ka.Buckets) == maxNewBucketsPerAddress {', b'\t\t\treturn', b'\t\t}', b'\t\t// The more entries we have, the less likely we are to add more.', b'\t\tfactor := int32(2 * len(ka.Buckets))', b'\t\tif a.rand.Int31n(factor) != 0 {', b'\t\t\treturn', b'\t\t}', b'\t} else {', b'\t\tka = newKnownAddress(addr, src)', b'\t}', b'', b'\tbucket := a.calcNewBucket(addr, src)', b'\ta.addToNewBucket(ka, bucket)', b'', b'\tlog.Info("Added new address", "address", addr, "total", a.size())', b'}', b'', b'// Make space in the new buckets by expiring the really bad entries.', b'// If no bad entries are available we remove the oldest.', b'func (a *AddrBook) expireNew(bucketIdx int) {', b'\tfor addrStr, ka := range a.addrNew[bucketIdx] {', b'\t\t// If an entry is bad, throw it away', b'\t\tif ka.isBad() {', b'\t\t\tlog.Info(cmn.Fmt("expiring bad address %v", addrStr))', b'\t\t\ta.removeFromBucket(ka, bucketTypeNew, bucketIdx)', b'\t\t\treturn', b'\t\t}', b'\t}', b'', b"\t// If we haven't thrown out a bad entry, throw out the oldest entry", b'\toldest := a.pickOldest(bucketTypeNew, bucketIdx)', b'\ta.removeFromBucket(oldest, bucketTypeNew, bucketIdx)', b'}', b'', b'// Promotes an address from new to old.', b'// TODO: Move to old probabilistically.', b'// The better a node is, the less likely it should be evicted from an old bucket.', b'func (a *AddrBook) moveToOld(ka *knownAddress) {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that is already old %v", ka))', b'\t\treturn', b'\t}', b'\tif len(ka.Buckets) == 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that isn\'t in any new buckets %v", ka))', b'\t\treturn', b'\t}', b'', b'\t// Remember one of the buckets in which ka is in.', b'\tfreedBucket := ka.Buckets[0]', b'\t// Remove from all (new) buckets.', b'\ta.removeFromAllBuckets(ka)', b"\t// It's officially old now.", b'\tka.BucketType = bucketTypeOld', b'', b'\t// Try to add it to its oldBucket destination.', b'\toldBucketIdx := a.calcOldBucket(ka.Addr)', b'\tadded := a.addToOldBucket(ka, oldBucketIdx)', b'\tif !added {', b'\t\t// No room, must evict something', b'\t\toldest := a.pickOldest(bucketTypeOld, oldBucketIdx)', b'\t\ta.removeFromBucket(oldest, bucketTypeOld, oldBucketIdx)', b'\t\t// Find new bucket to put oldest in', b'\t\tnewBucketIdx := a.calcNewBucket(oldest.Addr, oldest.Src)', b'\t\tadded := a.addToNewBucket(oldest, newBucketIdx)', b'\t\t// No space in newBucket either, just put it in freedBucket from above.', b'\t\tif !added {', b'\t\t\tadded := a.addToNewBucket(oldest, freedBucket)', b'\t\t\tif !added {', b'\t\t\t\tlog.Error(cmn.Fmt("Could not migrate oldest %v to freedBucket %v", oldest, freedBucket))', b'\t\t\t}', b'\t\t}', b'\t\t// Finally, add to bucket again.', b'\t\tadded = a.addToOldBucket(ka, oldBucketIdx)', b'\t\tif !added {', b'\t\t\tlog.Error(cmn.Fmt("Could not re-add ka %v to oldBucketIdx %v", ka, oldBucketIdx))', b'\t\t}', b'\t}', b'}', b'', b'// doublesha256( key + sourcegroup +', b'// int64(doublesha256(key + group + sourcegroup))%bucket_per_group ) % num_new_buckets', b'func (a *AddrBook) calcNewBucket(addr, src *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(a.groupKey(addr))...)', b'\tdata1 = append(data1, []byte(a.groupKey(src))...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= newBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(src)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % newBucketCount)', b'}', b'', b'// doublesha256( key + group +', b'// int64(doublesha256(key + addr))%buckets_per_group ) % num_old_buckets', b'func (a *AddrBook) calcOldBucket(addr *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(addr.String())...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= oldBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(addr)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % oldBucketCount)', b'}', b'', b'// Return a string representing the network group of this address.', b'// This is the /16 for IPv6, the /32 (/36 for he.net) for IPv6, the string', b'// "local" for a local address and the string "unroutable for an unroutable', b'// address.', b'func (a *AddrBook) groupKey(na *NetAddress) string {', b'\tif a.routabilityStrict && na.Local() {', b'\t\treturn "local"', b'\t}', b'\tif a.routabilityStrict && !na.Routable() {', b'\t\treturn "unroutable"', b'\t}', b'', b'\tif ipv4 := na.IP.To4(); ipv4 != nil {', b'\t\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'\tif na.RFC6145() || na.RFC6052() {', b'\t\t// last four bytes are the ip address', b'\t\tip := net.IP(na.IP[12:16])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\tif na.RFC3964() {', b'\t\tip := net.IP(na.IP[2:7])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'', b'\t}', b'\tif na.RFC4380() {', b'\t\t// teredo tunnels have the last 4 bytes as the v4 address XOR', b'\t\t// 0xff.', b'\t\tip := net.IP(make([]byte, 4))', b'\t\tfor i, byte := range na.IP[12:16] {', b'\t\t\tip[i] = byte ^ 0xff', b'\t\t}', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\t// OK, so now we know ourselves to be a IPv6 address.', b"\t// bitcoind uses /32 for everything, except for Hurricane Electric's", b'\t// (he.net) IP range, which it uses /36 for.', b'\tbits := 32', b'\theNet := &net.IPNet{IP: net.ParseIP("2001:470::"),', b'\t\tMask: net.CIDRMask(32, 128)}', b'\tif heNet.Contains(na.IP) {', b'\t\tbits = 36', b'\t}', b'', b'\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(bits, 128)}).String()', b'}', b'', b'//-----------------------------------------------------------------------------', b'', b'/*', b' knownAddress', b'', b' tracks information about a known network address that is used', b' to determine how viable an address is.', b'*/', b'type knownAddress struct {', b'\tAddr *NetAddress', b'\tSrc *NetAddress', b'\tAttempts int32', b'\tLastAttempt time.Time', b'\tLastSuccess time.Time', b'\tBucketType byte', b'\tBuckets []int', b'}', b'', b'func newKnownAddress(addr *NetAddress, src *NetAddress) *knownAddress {', b'\treturn &knownAddress{', b'\t\tAddr: addr,', b'\t\tSrc: src,', b'\t\tAttempts: 0,', b'\t\tLastAttempt: time.Now(),', b'\t\tBucketType: bucketTypeNew,', b'\t\tBuckets: nil,', b'\t}', b'}', b'', b'func (ka *knownAddress) isOld() bool {', b'\treturn ka.BucketType == bucketTypeOld', b'}', b'', b'func (ka *knownAddress) isNew() bool {', b'\treturn ka.BucketType == bucketTypeNew', b'}', b'', b'func (ka *knownAddress) markAttempt() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts += 1', b'}', b'', b'func (ka *knownAddress) markGood() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts = 0', b'\tka.LastSuccess = now', b'}', b'', b'func (ka *knownAddress) addBucketRef(bucketIdx int) int {', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket == bucketIdx {', b'\t\t\t// TODO refactor to return error?', b'\t\t\t// log.Warn(Fmt("Bucket already exists in ka.Buckets: %v", ka))', b'\t\t\treturn -1', b'\t\t}', b'\t}', b'\tka.Buckets = append(ka.Buckets, bucketIdx)', b'\treturn len(ka.Buckets)', b'}', b'', b'func (ka *knownAddress) removeBucketRef(bucketIdx int) int {', b'\tbuckets := []int{}', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket != bucketIdx {', b'\t\t\tbuckets = append(buckets, bucket)', b'\t\t}', b'\t}', b'\tif len(buckets) != len(ka.Buckets)-1 {', b'\t\t// TODO refactor to return error?', b'\t\t// log.Warn(Fmt("bucketIdx not found in ka.Buckets: %v", ka))', b'\t\treturn -1', b'\t}', b'\tka.Buckets = buckets', b'\treturn len(ka.Buckets)', b'}', b'', b'/*', b' An address is bad if the address in question has not been tried in the last', b' minute and meets one of the following criteria:', b'', b' 1) It claims to be from the future', b" 2) It hasn't been seen in over a month", b' 3) It has failed at least three times and never succeeded', b' 4) It has failed ten times in the last week', b'', b' All addresses that meet these criteria are assumed to be worthless and not', b' worth keeping hold of.', b'*/', b'func (ka *knownAddress) isBad() bool {', b'\t// Has been attempted in the last minute --> good', b'\tif ka.LastAttempt.Before(time.Now().Add(-1 * time.Minute)) {', b'\t\treturn false', b'\t}', b'', b'\t// Over a month old?', b'\tif ka.LastAttempt.After(time.Now().Add(-1 * numMissingDays * time.Hour * 24)) {', b'\t\treturn true', b'\t}', b'', b'\t// Never succeeded?', b'\tif ka.LastSuccess.IsZero() && ka.Attempts >= numRetries {', b'\t\treturn true', b'\t}', b'', b"\t// Hasn't succeeded in too long?", b'\tif ka.LastSuccess.Before(time.Now().Add(-1*minBadDays*time.Hour*24)) &&', b'\t\tka.Attempts >= maxFailures {', b'\t\treturn true', b'\t}', b'', b'\treturn false', b'}']]
2017-10-15 12:11:01,200 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, [b'// Modified for Tendermint', b'// Originally Copyright (c) 2013-2014 Conformal Systems LLC.', b'// https://github.com/conformal/btcd/blob/master/LICENSE', b'', b'package p2p', b'', b'import (', b'\t"encoding/binary"', b'\t"encoding/json"', b'\t"math"', b'\t"math/rand"', b'\t"net"', b'\t"os"', b'\t"sync"', b'\t', b'\t"time"', b'', b'\tlog "github.com/sirupsen/logrus"', b'\tcrypto "github.com/tendermint/go-crypto"', b'\tcmn "github.com/tendermint/tmlibs/common"', b')', b'', b'const (', b'\t// addresses under which the address manager will claim to need more addresses.', b'\tneedAddressThreshold = 1000', b'', b'\t// interval used to dump the address cache to disk for future use.', b'\tdumpAddressInterval = time.Minute * 2', b'', b'\t// max addresses in each old address bucket.', b'\toldBucketSize = 64', b'', b'\t// buckets we split old addresses over.', b'\toldBucketCount = 64', b'', b'\t// max addresses in each new address bucket.', b'\tnewBucketSize = 64', b'', b'\t// buckets that we spread new addresses over.', b'\tnewBucketCount = 256', b'', b'\t// old buckets over which an address group will be spread.', b'\toldBucketsPerGroup = 4', b'', b'\t// new buckets over which an source address group will be spread.', b'\tnewBucketsPerGroup = 32', b'', b'\t// buckets a frequently seen new address may end up in.', b'\tmaxNewBucketsPerAddress = 4', b'', b'\t// days before which we assume an address has vanished', b'\t// if we have not seen it announced in that long.', b'\tnumMissingDays = 30', b'', b'\t// tries without a single success before we assume an address is bad.', b'\tnumRetries = 3', b'', b'\t// max failures we will accept without a success before considering an address bad.', b'\tmaxFailures = 10', b'', b'\t// days since the last success before we will consider evicting an address.', b'\tminBadDays = 7', b'', b'\t// % of total addresses known returned by GetSelection.', b'\tgetSelectionPercent = 23', b'', b'\t// min addresses that must be returned by GetSelection. Useful for bootstrapping.', b'\tminGetSelection = 32', b'', b'\t// max addresses returned by GetSelection', b'\t// NOTE: this must match "maxPexMessageSize"', b'\tmaxGetSelection = 250', b'', b'\t// current version of the on-disk format.', b'\tserializationVersion = 1', b')', b'', b'const (', b'\tbucketTypeNew = 0x01', b'\tbucketTypeOld = 0x02', b')', b'', b'// AddrBook - concurrency safe peer address manager.', b'type AddrBook struct {', b'\tcmn.BaseService', b'', b'\tmtx sync.Mutex', b'\tfilePath string', b'\troutabilityStrict bool', b'\trand *rand.Rand', b'\tkey string', b'\tourAddrs map[string]*NetAddress', b'\taddrLookup map[string]*knownAddress // new & old', b'\taddrNew []map[string]*knownAddress', b'\taddrOld []map[string]*knownAddress', b'\twg sync.WaitGroup', b'\tnOld int', b'\tnNew int', b'}', b'', b'// NewAddrBook creates a new address book.', b'// Use Start to begin processing asynchronous address updates.', b'func NewAddrBook(filePath string, routabilityStrict bool) *AddrBook {', b'\tam := &AddrBook{', b'\t\trand: rand.New(rand.NewSource(time.Now().UnixNano())),', b'\t\tourAddrs: make(map[string]*NetAddress),', b'\t\taddrLookup: make(map[string]*knownAddress),', b'\t\tfilePath: filePath,', b'\t\troutabilityStrict: routabilityStrict,', b'\t}', b'\tam.init()', b'\tam.BaseService = *cmn.NewBaseService(nil, "AddrBook", am)', b'\treturn am', b'}', b'', b"// When modifying this, don't forget to update loadFromFile()", b'func (a *AddrBook) init() {', b'\ta.key = crypto.CRandHex(24) // 24/2 * 8 = 96 bits', b'\t// New addr buckets', b'\ta.addrNew = make([]map[string]*knownAddress, newBucketCount)', b'\tfor i := range a.addrNew {', b'\t\ta.addrNew[i] = make(map[string]*knownAddress)', b'\t}', b'\t// Old addr buckets', b'\ta.addrOld = make([]map[string]*knownAddress, oldBucketCount)', b'\tfor i := range a.addrOld {', b'\t\ta.addrOld[i] = make(map[string]*knownAddress)', b'\t}', b'}', b'', b'// OnStart implements Service.', b'func (a *AddrBook) OnStart() error {', b'\ta.BaseService.OnStart()', b'\ta.loadFromFile(a.filePath)', b'\ta.wg.Add(1)', b'\tgo a.saveRoutine()', b'\treturn nil', b'}', b'', b'// OnStop implements Service.', b'func (a *AddrBook) OnStop() {', b'\ta.BaseService.OnStop()', b'}', b'', b'func (a *AddrBook) Wait() {', b'\ta.wg.Wait()', b'}', b'', b'func (a *AddrBook) AddOurAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithField("addr", addr).Info("Add our address to book")', b'', b'\ta.ourAddrs[addr.String()] = addr', b'}', b'', b'func (a *AddrBook) OurAddresses() []*NetAddress {', b'\taddrs := []*NetAddress{}', b'\tfor _, addr := range a.ourAddrs {', b'\t\taddrs = append(addrs, addr)', b'\t}', b'\treturn addrs', b'}', b'', b'// NOTE: addr must not be nil', b'func (a *AddrBook) AddAddress(addr *NetAddress, src *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithFields(log.Fields{', b'\t\t"addr": addr,', b'\t\t"src": src,', b'\t}).Info("Add address to book")', b'\ta.addAddress(addr, src)', b'}', b'', b'func (a *AddrBook) NeedMoreAddrs() bool {', b'\treturn a.Size() < needAddressThreshold', b'}', b'', b'func (a *AddrBook) Size() int {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\treturn a.size()', b'}', b'', b'func (a *AddrBook) size() int {', b'\treturn a.nNew + a.nOld', b'}', b'', b'// Pick an address to connect to with new/old bias.', b'func (a *AddrBook) PickAddress(newBias int) *NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'\tif newBias > 100 {', b'\t\tnewBias = 100', b'\t}', b'\tif newBias < 0 {', b'\t\tnewBias = 0', b'\t}', b'', b'\t// Bias between new and old addresses.', b'\toldCorrelation := math.Sqrt(float64(a.nOld)) * (100.0 - float64(newBias))', b'\tnewCorrelation := math.Sqrt(float64(a.nNew)) * float64(newBias)', b'', b'\tif (newCorrelation+oldCorrelation)*a.rand.Float64() < oldCorrelation {', b'\t\t// pick random Old bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrOld[a.rand.Intn(len(a.addrOld))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t} else {', b'\t\t// pick random New bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrNew[a.rand.Intn(len(a.addrNew))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t}', b'\treturn nil', b'}', b'', b'func (a *AddrBook) MarkGood(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markGood()', b'\tif ka.isNew() {', b'\t\ta.moveToOld(ka)', b'\t}', b'}', b'', b'func (a *AddrBook) MarkAttempt(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markAttempt()', b'}', b'', b'// MarkBad currently just ejects the address. In the future, consider', b'// blacklisting.', b'func (a *AddrBook) MarkBad(addr *NetAddress) {', b'\ta.RemoveAddress(addr)', b'}', b'', b'// RemoveAddress removes the address from the book.', b'func (a *AddrBook) RemoveAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tlog.WithField("addr", addr).Info("Remove address from book")', b'\ta.removeFromAllBuckets(ka)', b'}', b'', b'/* Peer exchange */', b'', b'// GetSelection randomly selects some addresses (old & new). Suitable for peer-exchange protocols.', b'func (a *AddrBook) GetSelection() []*NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'', b'\tallAddr := make([]*NetAddress, a.size())', b'\ti := 0', b'\tfor _, v := range a.addrLookup {', b'\t\tallAddr[i] = v.Addr', b'\t\ti++', b'\t}', b'', b'\tnumAddresses := cmn.MaxInt(', b'\t\tcmn.MinInt(minGetSelection, len(allAddr)),', b'\t\tlen(allAddr)*getSelectionPercent/100)', b'\tnumAddresses = cmn.MinInt(maxGetSelection, numAddresses)', b'', b'\t// Fisher-Yates shuffle the array. We only need to do the first', b"\t// `numAddresses' since we are throwing the rest.", b'\tfor i := 0; i < numAddresses; i++ {', b'\t\t// pick a number between current index and the end', b'\t\tj := rand.Intn(len(allAddr)-i) + i', b'\t\tallAddr[i], allAddr[j] = allAddr[j], allAddr[i]', b'\t}', b'', b'\t// slice off the limit we are willing to share.', b'\treturn allAddr[:numAddresses]', b'}', b'', b'/* Loading & Saving */', b'', b'type addrBookJSON struct {', b'\tKey string', b'\tAddrs []*knownAddress', b'}', b'', b'func (a *AddrBook) saveToFile(filePath string) {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\t// Compile Addrs', b'\taddrs := []*knownAddress{}', b'\tfor _, ka := range a.addrLookup {', b'\t\taddrs = append(addrs, ka)', b'\t}', b'', b'\taJSON := &addrBookJSON{', b'\t\tKey: a.key,', b'\t\tAddrs: addrs,', b'\t}', b'', b'\tjsonBytes, err := json.MarshalIndent(aJSON, "", "\\t")', b'\tif err != nil {', b'\t\tlog.WithField("err", err).Error("Failed to save AddrBook to file")', b'\t\treturn', b'\t}', b'\terr = cmn.WriteFileAtomic(filePath, jsonBytes, 0644)', b'\tif err != nil {', b'\t\tlog.WithFields(log.Fields{', b'\t\t\t"file": filePath,', b'\t\t\t"err": err,', b'\t\t}).Error("Failed to save AddrBook to file")', b'\t}', b'}', b'', b'// Returns false if file does not exist.', b'// cmn.Panics if file is corrupt.', b'func (a *AddrBook) loadFromFile(filePath string) bool {', b"\t// If doesn't exist, do nothing.", b'\t_, err := os.Stat(filePath)', b'\tif os.IsNotExist(err) {', b'\t\treturn false', b'\t}', b'', b'\t// Load addrBookJSON{}', b'\tr, err := os.Open(filePath)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error opening file %s: %v", filePath, err))', b'\t}', b'\tdefer r.Close()', b'\taJSON := &addrBookJSON{}', b'\tdec := json.NewDecoder(r)', b'\terr = dec.Decode(aJSON)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error reading file %s: %v", filePath, err))', b'\t}', b'', b'\t// Restore all the fields...', b'\t// Restore the key', b'\ta.key = aJSON.Key', b'\t// Restore .addrNew & .addrOld', b'\tfor _, ka := range aJSON.Addrs {', b'\t\tfor _, bucketIndex := range ka.Buckets {', b'\t\t\tbucket := a.getBucket(ka.BucketType, bucketIndex)', b'\t\t\tbucket[ka.Addr.String()] = ka', b'\t\t}', b'\t\ta.addrLookup[ka.Addr.String()] = ka', b'\t\tif ka.BucketType == bucketTypeNew {', b'\t\t\ta.nNew++', b'\t\t} else {', b'\t\t\ta.nOld++', b'\t\t}', b'\t}', b'\treturn true', b'}', b'', b'// Save saves the book.', b'func (a *AddrBook) Save() {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'\ta.saveToFile(a.filePath)', b'}', b'', b'/* Private methods */', b'', b'func (a *AddrBook) saveRoutine() {', b'\tdumpAddressTicker := time.NewTicker(dumpAddressInterval)', b'out:', b'\tfor {', b'\t\tselect {', b'\t\tcase <-dumpAddressTicker.C:', b'\t\t\ta.saveToFile(a.filePath)', b'\t\tcase <-a.Quit:', b'\t\t\tbreak out', b'\t\t}', b'\t}', b'\tdumpAddressTicker.Stop()', b'\ta.saveToFile(a.filePath)', b'\ta.wg.Done()', b'\tlog.Info("Address handler done")', b'}', b'', b'func (a *AddrBook) getBucket(bucketType byte, bucketIdx int) map[string]*knownAddress {', b'\tswitch bucketType {', b'\tcase bucketTypeNew:', b'\t\treturn a.addrNew[bucketIdx]', b'\tcase bucketTypeOld:', b'\t\treturn a.addrOld[bucketIdx]', b'\tdefault:', b'\t\tcmn.PanicSanity("Should not happen")', b'\t\treturn nil', b'\t}', b'}', b'', b"// Adds ka to new bucket. Returns false if it couldn't do it cuz buckets full.", b'// NOTE: currently it always returns true.', b'func (a *AddrBook) addToNewBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot add address already in old bucket to a new bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > newBucketSize {', b'\t\tlog.Info("new bucket is full, expiring old ")', b'\t\ta.expireNew(bucketIdx)', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nNew++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b"// Adds ka to old bucket. Returns false if it couldn't do it cuz buckets full.", b'func (a *AddrBook) addToOldBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isNew() {', b'\t\tlog.Error(cmn.Fmt("Cannot add new address to old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'\tif len(ka.Buckets) != 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot add already old address to another old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > oldBucketSize {', b'\t\treturn false', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nOld++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b'func (a *AddrBook) removeFromBucket(ka *knownAddress, bucketType byte, bucketIdx int) {', b'\tif ka.BucketType != bucketType {', b'\t\tlog.Error(cmn.Fmt("Bucket type mismatch: %v", ka))', b'\t\treturn', b'\t}', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tdelete(bucket, ka.Addr.String())', b'\tif ka.removeBucketRef(bucketIdx) == 0 {', b'\t\tif bucketType == bucketTypeNew {', b'\t\t\ta.nNew--', b'\t\t} else {', b'\t\t\ta.nOld--', b'\t\t}', b'\t\tdelete(a.addrLookup, ka.Addr.String())', b'\t}', b'}', b'', b'func (a *AddrBook) removeFromAllBuckets(ka *knownAddress) {', b'\tfor _, bucketIdx := range ka.Buckets {', b'\t\tbucket := a.getBucket(ka.BucketType, bucketIdx)', b'\t\tdelete(bucket, ka.Addr.String())', b'\t}', b'\tka.Buckets = nil', b'\tif ka.BucketType == bucketTypeNew {', b'\t\ta.nNew--', b'\t} else {', b'\t\ta.nOld--', b'\t}', b'\tdelete(a.addrLookup, ka.Addr.String())', b'}', b'', b'func (a *AddrBook) pickOldest(bucketType byte, bucketIdx int) *knownAddress {', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tvar oldest *knownAddress', b'\tfor _, ka := range bucket {', b'\t\tif oldest == nil || ka.LastAttempt.Before(oldest.LastAttempt) {', b'\t\t\toldest = ka', b'\t\t}', b'\t}', b'\treturn oldest', b'}', b'', b'func (a *AddrBook) addAddress(addr, src *NetAddress) {', b'\tif a.routabilityStrict && !addr.Routable() {', b'\t\tlog.Error(cmn.Fmt("Cannot add non-routable address %v", addr))', b'\t\treturn', b'\t}', b'\tif _, ok := a.ourAddrs[addr.String()]; ok {', b'\t\t// Ignore our own listener address.', b'\t\treturn', b'\t}', b'', b'\tka := a.addrLookup[addr.String()]', b'', b'\tif ka != nil {', b'\t\t// Already old.', b'\t\tif ka.isOld() {', b'\t\t\treturn', b'\t\t}', b'\t\t// Already in max new buckets.', b'\t\tif len(ka.Buckets) == maxNewBucketsPerAddress {', b'\t\t\treturn', b'\t\t}', b'\t\t// The more entries we have, the less likely we are to add more.', b'\t\tfactor := int32(2 * len(ka.Buckets))', b'\t\tif a.rand.Int31n(factor) != 0 {', b'\t\t\treturn', b'\t\t}', b'\t} else {', b'\t\tka = newKnownAddress(addr, src)', b'\t}', b'', b'\tbucket := a.calcNewBucket(addr, src)', b'\ta.addToNewBucket(ka, bucket)', b'', b'\tlog.Info("Added new address", "address", addr, "total", a.size())', b'}', b'', b'// Make space in the new buckets by expiring the really bad entries.', b'// If no bad entries are available we remove the oldest.', b'func (a *AddrBook) expireNew(bucketIdx int) {', b'\tfor addrStr, ka := range a.addrNew[bucketIdx] {', b'\t\t// If an entry is bad, throw it away', b'\t\tif ka.isBad() {', b'\t\t\tlog.Info(cmn.Fmt("expiring bad address %v", addrStr))', b'\t\t\ta.removeFromBucket(ka, bucketTypeNew, bucketIdx)', b'\t\t\treturn', b'\t\t}', b'\t}', b'', b"\t// If we haven't thrown out a bad entry, throw out the oldest entry", b'\toldest := a.pickOldest(bucketTypeNew, bucketIdx)', b'\ta.removeFromBucket(oldest, bucketTypeNew, bucketIdx)', b'}', b'', b'// Promotes an address from new to old.', b'// TODO: Move to old probabilistically.', b'// The better a node is, the less likely it should be evicted from an old bucket.', b'func (a *AddrBook) moveToOld(ka *knownAddress) {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that is already old %v", ka))', b'\t\treturn', b'\t}', b'\tif len(ka.Buckets) == 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that isn\'t in any new buckets %v", ka))', b'\t\treturn', b'\t}', b'', b'\t// Remember one of the buckets in which ka is in.', b'\tfreedBucket := ka.Buckets[0]', b'\t// Remove from all (new) buckets.', b'\ta.removeFromAllBuckets(ka)', b"\t// It's officially old now.", b'\tka.BucketType = bucketTypeOld', b'', b'\t// Try to add it to its oldBucket destination.', b'\toldBucketIdx := a.calcOldBucket(ka.Addr)', b'\tadded := a.addToOldBucket(ka, oldBucketIdx)', b'\tif !added {', b'\t\t// No room, must evict something', b'\t\toldest := a.pickOldest(bucketTypeOld, oldBucketIdx)', b'\t\ta.removeFromBucket(oldest, bucketTypeOld, oldBucketIdx)', b'\t\t// Find new bucket to put oldest in', b'\t\tnewBucketIdx := a.calcNewBucket(oldest.Addr, oldest.Src)', b'\t\tadded := a.addToNewBucket(oldest, newBucketIdx)', b'\t\t// No space in newBucket either, just put it in freedBucket from above.', b'\t\tif !added {', b'\t\t\tadded := a.addToNewBucket(oldest, freedBucket)', b'\t\t\tif !added {', b'\t\t\t\tlog.Error(cmn.Fmt("Could not migrate oldest %v to freedBucket %v", oldest, freedBucket))', b'\t\t\t}', b'\t\t}', b'\t\t// Finally, add to bucket again.', b'\t\tadded = a.addToOldBucket(ka, oldBucketIdx)', b'\t\tif !added {', b'\t\t\tlog.Error(cmn.Fmt("Could not re-add ka %v to oldBucketIdx %v", ka, oldBucketIdx))', b'\t\t}', b'\t}', b'}', b'', b'// doublesha256( key + sourcegroup +', b'// int64(doublesha256(key + group + sourcegroup))%bucket_per_group ) % num_new_buckets', b'func (a *AddrBook) calcNewBucket(addr, src *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(a.groupKey(addr))...)', b'\tdata1 = append(data1, []byte(a.groupKey(src))...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= newBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(src)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % newBucketCount)', b'}', b'', b'// doublesha256( key + group +', b'// int64(doublesha256(key + addr))%buckets_per_group ) % num_old_buckets', b'func (a *AddrBook) calcOldBucket(addr *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(addr.String())...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= oldBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(addr)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % oldBucketCount)', b'}', b'', b'// Return a string representing the network group of this address.', b'// This is the /16 for IPv6, the /32 (/36 for he.net) for IPv6, the string', b'// "local" for a local address and the string "unroutable for an unroutable', b'// address.', b'func (a *AddrBook) groupKey(na *NetAddress) string {', b'\tif a.routabilityStrict && na.Local() {', b'\t\treturn "local"', b'\t}', b'\tif a.routabilityStrict && !na.Routable() {', b'\t\treturn "unroutable"', b'\t}', b'', b'\tif ipv4 := na.IP.To4(); ipv4 != nil {', b'\t\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'\tif na.RFC6145() || na.RFC6052() {', b'\t\t// last four bytes are the ip address', b'\t\tip := net.IP(na.IP[12:16])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\tif na.RFC3964() {', b'\t\tip := net.IP(na.IP[2:7])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'', b'\t}', b'\tif na.RFC4380() {', b'\t\t// teredo tunnels have the last 4 bytes as the v4 address XOR', b'\t\t// 0xff.', b'\t\tip := net.IP(make([]byte, 4))', b'\t\tfor i, byte := range na.IP[12:16] {', b'\t\t\tip[i] = byte ^ 0xff', b'\t\t}', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\t// OK, so now we know ourselves to be a IPv6 address.', b"\t// bitcoind uses /32 for everything, except for Hurricane Electric's", b'\t// (he.net) IP range, which it uses /36 for.', b'\tbits := 32', b'\theNet := &net.IPNet{IP: net.ParseIP("2001:470::"),', b'\t\tMask: net.CIDRMask(32, 128)}', b'\tif heNet.Contains(na.IP) {', b'\t\tbits = 36', b'\t}', b'', b'\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(bits, 128)}).String()', b'}', b'', b'//-----------------------------------------------------------------------------', b'', b'/*', b' knownAddress', b'', b' tracks information about a known network address that is used', b' to determine how viable an address is.', b'*/', b'type knownAddress struct {', b'\tAddr *NetAddress', b'\tSrc *NetAddress', b'\tAttempts int32', b'\tLastAttempt time.Time', b'\tLastSuccess time.Time', b'\tBucketType byte', b'\tBuckets []int', b'}', b'', b'func newKnownAddress(addr *NetAddress, src *NetAddress) *knownAddress {', b'\treturn &knownAddress{', b'\t\tAddr: addr,', b'\t\tSrc: src,', b'\t\tAttempts: 0,', b'\t\tLastAttempt: time.Now(),', b'\t\tBucketType: bucketTypeNew,', b'\t\tBuckets: nil,', b'\t}', b'}', b'', b'func (ka *knownAddress) isOld() bool {', b'\treturn ka.BucketType == bucketTypeOld', b'}', b'', b'func (ka *knownAddress) isNew() bool {', b'\treturn ka.BucketType == bucketTypeNew', b'}', b'', b'func (ka *knownAddress) markAttempt() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts += 1', b'}', b'', b'func (ka *knownAddress) markGood() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts = 0', b'\tka.LastSuccess = now', b'}', b'', b'func (ka *knownAddress) addBucketRef(bucketIdx int) int {', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket == bucketIdx {', b'\t\t\t// TODO refactor to return error?', b'\t\t\t// log.Warn(Fmt("Bucket already exists in ka.Buckets: %v", ka))', b'\t\t\treturn -1', b'\t\t}', b'\t}', b'\tka.Buckets = append(ka.Buckets, bucketIdx)', b'\treturn len(ka.Buckets)', b'}', b'', b'func (ka *knownAddress) removeBucketRef(bucketIdx int) int {', b'\tbuckets := []int{}', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket != bucketIdx {', b'\t\t\tbuckets = append(buckets, bucket)', b'\t\t}', b'\t}', b'\tif len(buckets) != len(ka.Buckets)-1 {', b'\t\t// TODO refactor to return error?', b'\t\t// log.Warn(Fmt("bucketIdx not found in ka.Buckets: %v", ka))', b'\t\treturn -1', b'\t}', b'\tka.Buckets = buckets', b'\treturn len(ka.Buckets)', b'}', b'', b'/*', b' An address is bad if the address in question has not been tried in the last', b' minute and meets one of the following criteria:', b'', b' 1) It claims to be from the future', b" 2) It hasn't been seen in over a month", b' 3) It has failed at least three times and never succeeded', b' 4) It has failed ten times in the last week', b'', b' All addresses that meet these criteria are assumed to be worthless and not', b' worth keeping hold of.', b'*/', b'func (ka *knownAddress) isBad() bool {', b'\t// Has been attempted in the last minute --> good', b'\tif ka.LastAttempt.Before(time.Now().Add(-1 * time.Minute)) {', b'\t\treturn false', b'\t}', b'', b'\t// Over a month old?', b'\tif ka.LastAttempt.After(time.Now().Add(-1 * numMissingDays * time.Hour * 24)) {', b'\t\treturn true', b'\t}', b'', b'\t// Never succeeded?', b'\tif ka.LastSuccess.IsZero() && ka.Attempts >= numRetries {', b'\t\treturn true', b'\t}', b'', b"\t// Hasn't succeeded in too long?", b'\tif ka.LastSuccess.Before(time.Now().Add(-1*minBadDays*time.Hour*24)) &&', b'\t\tka.Attempts >= maxFailures {', b'\t\treturn true', b'\t}', b'', b'\treturn false', b'}']
2017-10-15 12:11:01,200 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x1036743d8>, switching back
2017-10-15 12:11:01,206 [INFO @ cm_bufkeyword.py:refresh_keyword:70] 30760 - keyword refresh complete, count: 613
2017-10-15 12:11:01,206 [DEBUG @ cm.py:on_notification:265] 30760 - channel method cm_event completed
2017-10-15 12:11:01,207 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x1036743d8> finished executing
2017-10-15 12:11:01,207 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x1036743d8> is now dying...
2017-10-15 12:11:01,207 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:01,207 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:02,005 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:02,005 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 3, b'changedtick': 5, b'curpos': [0, 15, 3, 0, 10], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]]
2017-10-15 12:11:02,005 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 3, b'changedtick': 5, b'curpos': [0, 15, 3, 0, 10], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:02,005 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x1036743d8> will handle it
2017-10-15 12:11:02,006 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_refresh, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, {'typed': '\t"', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 3, 'changedtick': 5, 'curpos': [0, 15, 3, 0, 10], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:02,007 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-css> for context scope <go>
2017-10-15 12:11:02,007 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-bufkeyword>, force[0] early_cache[0]
2017-10-15 12:11:02,007 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-gocode>, force[0] early_cache[1]
2017-10-15 12:11:02,007 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tmux>, force[0] early_cache[0]
2017-10-15 12:11:02,008 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-jedi> for context scope <go>
2017-10-15 12:11:02,008 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-filepath>, force[0] early_cache[0]
2017-10-15 12:11:02,008 [DEBUG @ cm_core.py:cm_refresh:326] 30760 - <cm-keyword-continue> is not auto_popup
2017-10-15 12:11:02,008 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tags>, force[0] early_cache[0]
2017-10-15 12:11:02,008 [INFO @ cm_core.py:cm_refresh:372] 30760 - not notifying any channels, _refresh_completions now
2017-10-15 12:11:02,008 [INFO @ cm_core.py:_refresh_completions:508] 30760 - _refresh_completions names: [], startcol: 3, matches: []
2017-10-15 12:11:02,009 [INFO @ cm_core.py:_complete:623] 30760 - matches==0, _last_matches==0, ignore
2017-10-15 12:11:02,009 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_refresh completed
2017-10-15 12:11:02,009 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x1036743d8> finished executing
2017-10-15 12:11:02,009 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x1036743d8> is now dying...
2017-10-15 12:11:02,009 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:02,009 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:02,858 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:02,859 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"s', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 4, b'changedtick': 6, b'curpos': [0, 15, 4, 0, 11], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]]
2017-10-15 12:11:02,859 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"s', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 4, b'changedtick': 6, b'curpos': [0, 15, 4, 0, 11], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:02,859 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x1036743d8> will handle it
2017-10-15 12:11:02,860 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_refresh, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, {'typed': '\t"s', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 4, 'changedtick': 6, 'curpos': [0, 15, 4, 0, 11], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:02,860 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-css> for context scope <go>
2017-10-15 12:11:02,860 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-bufkeyword>, force[0] early_cache[0]
2017-10-15 12:11:02,860 [DEBUG @ cm_core.py:cm_refresh:334] 30760 - <cm-gocode> early_caching
2017-10-15 12:11:02,860 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tmux>, force[0] early_cache[0]
2017-10-15 12:11:02,861 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-jedi> for context scope <go>
2017-10-15 12:11:02,861 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-filepath>, force[0] early_cache[0]
2017-10-15 12:11:02,861 [DEBUG @ cm_core.py:cm_refresh:326] 30760 - <cm-keyword-continue> is not auto_popup
2017-10-15 12:11:02,861 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tags>, force[0] early_cache[0]
2017-10-15 12:11:02,861 [INFO @ cm_core.py:cm_refresh:376] 30760 - notify_sources_to_refresh calls cnt [0], channels cnt [1]
2017-10-15 12:11:02,861 [DEBUG @ cm_core.py:cm_refresh:377] 30760 - cm#_notify_sources_to_refresh [[]] [['cm-gocode']] [{'force': 0, 'typed': '\t"s', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 4, 'changedtick': 6, 'curpos': [0, 15, 4, 0, 11], 'scope': 'go', 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:11:02,861 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#_notify_sources_to_refresh', [[], [{'id': 5, 'context': {'typed': '\t"s', 'early_cache': True, 'startcol': 3, 'scope': 'go', 'filetype': 'go', 'col': 4, 'base': 's', 'force': 0, 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope_match': 'go', 'curpos': [0, 15, 4, 0, 11], 'changedtick': 6, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 'name': 'cm-gocode'}], {'typed': '\t"s', 'bufnr': 1, 'lnum': 15, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go', 'filetype': 'go', 'col': 4, 'changedtick': 6, 'curpos': [0, 15, 4, 0, 11], 'scope': 'go', 'force': 0}])]
2017-10-15 12:11:02,861 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xbdcm#_notify_sources_to_refresh\x93\x90\x91\x83\xa2id\x05\xa7context\x8f\xa5typed\xa3\t"s\xabearly_cache\xc3\xa8startcol\x03\xa5scope\xa2go\xa8filetype\xa2go\xa3col\x04\xa4base\xa1s\xa5force\x00\xa5bufnr\x01\xa4lnum\x0f\xa9match_end\x02\xabscope_match\xa2go\xa6curpos\x95\x00\x0f\x04\x00\x0b\xabchangedtick\x06\xa8filepath\xda\x002/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go\xa4name\xa9cm-gocode\x8a\xa5typed\xa3\t"s\xa5bufnr\x01\xa4lnum\x0f\xa8filepath\xda\x002/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go\xa8filetype\xa2go\xa3col\x04\xabchangedtick\x06\xa6curpos\x95\x00\x0f\x04\x00\x0b\xa5scope\xa2go\xa5force\x00''
2017-10-15 12:11:02,862 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:02,862 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_refresh completed
2017-10-15 12:11:02,862 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, {b'typed': b'\t"s', b'early_cache': True, b'match_end': 2, b'scope': b'go', b'filetype': b'go', b'col': 4, b'base': b's', b'force': 0, b'bufnr': 1, b'lnum': 15, b'startcol': 3, b'changedtick': 6, b'curpos': [0, 15, 4, 0, 11], b'scope_match': b'go', b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]]
2017-10-15 12:11:02,862 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x1036743d8> finished executing
2017-10-15 12:11:02,862 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, {b'typed': b'\t"s', b'early_cache': True, b'match_end': 2, b'scope': b'go', b'filetype': b'go', b'col': 4, b'base': b's', b'force': 0, b'bufnr': 1, b'lnum': 15, b'startcol': 3, b'changedtick': 6, b'curpos': [0, 15, 4, 0, 11], b'scope_match': b'go', b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:11:02,862 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x1036743d8> is now dying...
2017-10-15 12:11:02,862 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:02,862 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:02,863 [DEBUG @ cm.py:on_notification:248] 30760 - channel method: cm_refresh, args: [{'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, {'typed': '\t"s', 'early_cache': True, 'startcol': 3, 'filetype': 'go', 'col': 4, 'base': 's', 'force': 0, 'scope_match': 'go', 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope': 'go', 'curpos': [0, 15, 4, 0, 11], 'changedtick': 6, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:11:02,863 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:02,863 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 4, 'nvim_call_function', ('cm#context_changed', [{'typed': '\t"s', 'early_cache': True, 'match_end': 2, 'filetype': 'go', 'col': 4, 'base': 's', 'force': 0, 'bufnr': 1, 'lnum': 15, 'startcol': 3, 'changedtick': 6, 'scope_match': 'go', 'curpos': [0, 15, 4, 0, 11], 'scope': 'go', 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}])]
2017-10-15 12:11:02,863 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x04\xb2nvim_call_function\x92\xb2cm#context_changed\x91\x8f\xa5typed\xa3\t"s\xabearly_cache\xc3\xa9match_end\x02\xa8filetype\xa2go\xa3col\x04\xa4base\xa1s\xa5force\x00\xa5bufnr\x01\xa4lnum\x0f\xa8startcol\x03\xabchangedtick\x06\xabscope_match\xa2go\xa6curpos\x95\x00\x0f\x04\x00\x0b\xa5scope\xa2go\xa8filepath\xda\x002/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go''
2017-10-15 12:11:02,863 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x103674638> to wait for response
2017-10-15 12:11:02,863 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:02,863 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:02,863 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:02,863 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 4, None, 0]
2017-10-15 12:11:02,863 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, 0
2017-10-15 12:11:02,864 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x103674638>, switching back
2017-10-15 12:11:02,864 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 5, 'nvim_list_bufs', ()]
2017-10-15 12:11:02,864 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x05\xaenvim_list_bufs\x90''
2017-10-15 12:11:02,864 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x103674638> to wait for response
2017-10-15 12:11:02,864 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:02,864 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:02,864 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:02,864 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 5, None, [ExtType(code=0, data=b'\x01')]]
2017-10-15 12:11:02,864 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, [ExtType(code=0, data=b'\x01')]
2017-10-15 12:11:02,864 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x103674638>, switching back
2017-10-15 12:11:02,864 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 6, 'nvim_buf_get_lines', (ExtType(code=0, data=b'\x01'), 0, -1, False)]
2017-10-15 12:11:02,864 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x06\xb2nvim_buf_get_lines\x94\xd4\x00\x01\x00\xff\xc2''
2017-10-15 12:11:02,864 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x103674638> to wait for response
2017-10-15 12:11:02,865 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:02,865 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:02,865 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:02,865 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:02,865 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:02,865 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:02,865 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:02,865 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 6, None, [b'// Modified for Tendermint', b'// Originally Copyright (c) 2013-2014 Conformal Systems LLC.', b'// https://github.com/conformal/btcd/blob/master/LICENSE', b'', b'package p2p', b'', b'import (', b'\t"encoding/binary"', b'\t"encoding/json"', b'\t"math"', b'\t"math/rand"', b'\t"net"', b'\t"os"', b'\t"sync"', b'\t"s', b'\t"time"', b'', b'\tlog "github.com/sirupsen/logrus"', b'\tcrypto "github.com/tendermint/go-crypto"', b'\tcmn "github.com/tendermint/tmlibs/common"', b')', b'', b'const (', b'\t// addresses under which the address manager will claim to need more addresses.', b'\tneedAddressThreshold = 1000', b'', b'\t// interval used to dump the address cache to disk for future use.', b'\tdumpAddressInterval = time.Minute * 2', b'', b'\t// max addresses in each old address bucket.', b'\toldBucketSize = 64', b'', b'\t// buckets we split old addresses over.', b'\toldBucketCount = 64', b'', b'\t// max addresses in each new address bucket.', b'\tnewBucketSize = 64', b'', b'\t// buckets that we spread new addresses over.', b'\tnewBucketCount = 256', b'', b'\t// old buckets over which an address group will be spread.', b'\toldBucketsPerGroup = 4', b'', b'\t// new buckets over which an source address group will be spread.', b'\tnewBucketsPerGroup = 32', b'', b'\t// buckets a frequently seen new address may end up in.', b'\tmaxNewBucketsPerAddress = 4', b'', b'\t// days before which we assume an address has vanished', b'\t// if we have not seen it announced in that long.', b'\tnumMissingDays = 30', b'', b'\t// tries without a single success before we assume an address is bad.', b'\tnumRetries = 3', b'', b'\t// max failures we will accept without a success before considering an address bad.', b'\tmaxFailures = 10', b'', b'\t// days since the last success before we will consider evicting an address.', b'\tminBadDays = 7', b'', b'\t// % of total addresses known returned by GetSelection.', b'\tgetSelectionPercent = 23', b'', b'\t// min addresses that must be returned by GetSelection. Useful for bootstrapping.', b'\tminGetSelection = 32', b'', b'\t// max addresses returned by GetSelection', b'\t// NOTE: this must match "maxPexMessageSize"', b'\tmaxGetSelection = 250', b'', b'\t// current version of the on-disk format.', b'\tserializationVersion = 1', b')', b'', b'const (', b'\tbucketTypeNew = 0x01', b'\tbucketTypeOld = 0x02', b')', b'', b'// AddrBook - concurrency safe peer address manager.', b'type AddrBook struct {', b'\tcmn.BaseService', b'', b'\tmtx sync.Mutex', b'\tfilePath string', b'\troutabilityStrict bool', b'\trand *rand.Rand', b'\tkey string', b'\tourAddrs map[string]*NetAddress', b'\taddrLookup map[string]*knownAddress // new & old', b'\taddrNew []map[string]*knownAddress', b'\taddrOld []map[string]*knownAddress', b'\twg sync.WaitGroup', b'\tnOld int', b'\tnNew int', b'}', b'', b'// NewAddrBook creates a new address book.', b'// Use Start to begin processing asynchronous address updates.', b'func NewAddrBook(filePath string, routabilityStrict bool) *AddrBook {', b'\tam := &AddrBook{', b'\t\trand: rand.New(rand.NewSource(time.Now().UnixNano())),', b'\t\tourAddrs: make(map[string]*NetAddress),', b'\t\taddrLookup: make(map[string]*knownAddress),', b'\t\tfilePath: filePath,', b'\t\troutabilityStrict: routabilityStrict,', b'\t}', b'\tam.init()', b'\tam.BaseService = *cmn.NewBaseService(nil, "AddrBook", am)', b'\treturn am', b'}', b'', b"// When modifying this, don't forget to update loadFromFile()", b'func (a *AddrBook) init() {', b'\ta.key = crypto.CRandHex(24) // 24/2 * 8 = 96 bits', b'\t// New addr buckets', b'\ta.addrNew = make([]map[string]*knownAddress, newBucketCount)', b'\tfor i := range a.addrNew {', b'\t\ta.addrNew[i] = make(map[string]*knownAddress)', b'\t}', b'\t// Old addr buckets', b'\ta.addrOld = make([]map[string]*knownAddress, oldBucketCount)', b'\tfor i := range a.addrOld {', b'\t\ta.addrOld[i] = make(map[string]*knownAddress)', b'\t}', b'}', b'', b'// OnStart implements Service.', b'func (a *AddrBook) OnStart() error {', b'\ta.BaseService.OnStart()', b'\ta.loadFromFile(a.filePath)', b'\ta.wg.Add(1)', b'\tgo a.saveRoutine()', b'\treturn nil', b'}', b'', b'// OnStop implements Service.', b'func (a *AddrBook) OnStop() {', b'\ta.BaseService.OnStop()', b'}', b'', b'func (a *AddrBook) Wait() {', b'\ta.wg.Wait()', b'}', b'', b'func (a *AddrBook) AddOurAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithField("addr", addr).Info("Add our address to book")', b'', b'\ta.ourAddrs[addr.String()] = addr', b'}', b'', b'func (a *AddrBook) OurAddresses() []*NetAddress {', b'\taddrs := []*NetAddress{}', b'\tfor _, addr := range a.ourAddrs {', b'\t\taddrs = append(addrs, addr)', b'\t}', b'\treturn addrs', b'}', b'', b'// NOTE: addr must not be nil', b'func (a *AddrBook) AddAddress(addr *NetAddress, src *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithFields(log.Fields{', b'\t\t"addr": addr,', b'\t\t"src": src,', b'\t}).Info("Add address to book")', b'\ta.addAddress(addr, src)', b'}', b'', b'func (a *AddrBook) NeedMoreAddrs() bool {', b'\treturn a.Size() < needAddressThreshold', b'}', b'', b'func (a *AddrBook) Size() int {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\treturn a.size()', b'}', b'', b'func (a *AddrBook) size() int {', b'\treturn a.nNew + a.nOld', b'}', b'', b'// Pick an address to connect to with new/old bias.', b'func (a *AddrBook) PickAddress(newBias int) *NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'\tif newBias > 100 {', b'\t\tnewBias = 100', b'\t}', b'\tif newBias < 0 {', b'\t\tnewBias = 0', b'\t}', b'', b'\t// Bias between new and old addresses.', b'\toldCorrelation := math.Sqrt(float64(a.nOld)) * (100.0 - float64(newBias))', b'\tnewCorrelation := math.Sqrt(float64(a.nNew)) * float64(newBias)', b'', b'\tif (newCorrelation+oldCorrelation)*a.rand.Float64() < oldCorrelation {', b'\t\t// pick random Old bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrOld[a.rand.Intn(len(a.addrOld))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t} else {', b'\t\t// pick random New bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrNew[a.rand.Intn(len(a.addrNew))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t}', b'\treturn nil', b'}', b'', b'func (a *AddrBook) MarkGood(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markGood()', b'\tif ka.isNew() {', b'\t\ta.moveToOld(ka)', b'\t}', b'}', b'', b'func (a *AddrBook) MarkAttempt(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markAttempt()', b'}', b'', b'// MarkBad currently just ejects the address. In the future, consider', b'// blacklisting.', b'func (a *AddrBook) MarkBad(addr *NetAddress) {', b'\ta.RemoveAddress(addr)', b'}', b'', b'// RemoveAddress removes the address from the book.', b'func (a *AddrBook) RemoveAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tlog.WithField("addr", addr).Info("Remove address from book")', b'\ta.removeFromAllBuckets(ka)', b'}', b'', b'/* Peer exchange */', b'', b'// GetSelection randomly selects some addresses (old & new). Suitable for peer-exchange protocols.', b'func (a *AddrBook) GetSelection() []*NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'', b'\tallAddr := make([]*NetAddress, a.size())', b'\ti := 0', b'\tfor _, v := range a.addrLookup {', b'\t\tallAddr[i] = v.Addr', b'\t\ti++', b'\t}', b'', b'\tnumAddresses := cmn.MaxInt(', b'\t\tcmn.MinInt(minGetSelection, len(allAddr)),', b'\t\tlen(allAddr)*getSelectionPercent/100)', b'\tnumAddresses = cmn.MinInt(maxGetSelection, numAddresses)', b'', b'\t// Fisher-Yates shuffle the array. We only need to do the first', b"\t// `numAddresses' since we are throwing the rest.", b'\tfor i := 0; i < numAddresses; i++ {', b'\t\t// pick a number between current index and the end', b'\t\tj := rand.Intn(len(allAddr)-i) + i', b'\t\tallAddr[i], allAddr[j] = allAddr[j], allAddr[i]', b'\t}', b'', b'\t// slice off the limit we are willing to share.', b'\treturn allAddr[:numAddresses]', b'}', b'', b'/* Loading & Saving */', b'', b'type addrBookJSON struct {', b'\tKey string', b'\tAddrs []*knownAddress', b'}', b'', b'func (a *AddrBook) saveToFile(filePath string) {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\t// Compile Addrs', b'\taddrs := []*knownAddress{}', b'\tfor _, ka := range a.addrLookup {', b'\t\taddrs = append(addrs, ka)', b'\t}', b'', b'\taJSON := &addrBookJSON{', b'\t\tKey: a.key,', b'\t\tAddrs: addrs,', b'\t}', b'', b'\tjsonBytes, err := json.MarshalIndent(aJSON, "", "\\t")', b'\tif err != nil {', b'\t\tlog.WithField("err", err).Error("Failed to save AddrBook to file")', b'\t\treturn', b'\t}', b'\terr = cmn.WriteFileAtomic(filePath, jsonBytes, 0644)', b'\tif err != nil {', b'\t\tlog.WithFields(log.Fields{', b'\t\t\t"file": filePath,', b'\t\t\t"err": err,', b'\t\t}).Error("Failed to save AddrBook to file")', b'\t}', b'}', b'', b'// Returns false if file does not exist.', b'// cmn.Panics if file is corrupt.', b'func (a *AddrBook) loadFromFile(filePath string) bool {', b"\t// If doesn't exist, do nothing.", b'\t_, err := os.Stat(filePath)', b'\tif os.IsNotExist(err) {', b'\t\treturn false', b'\t}', b'', b'\t// Load addrBookJSON{}', b'\tr, err := os.Open(filePath)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error opening file %s: %v", filePath, err))', b'\t}', b'\tdefer r.Close()', b'\taJSON := &addrBookJSON{}', b'\tdec := json.NewDecoder(r)', b'\terr = dec.Decode(aJSON)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error reading file %s: %v", filePath, err))', b'\t}', b'', b'\t// Restore all the fields...', b'\t// Restore the key', b'\ta.key = aJSON.Key', b'\t// Restore .addrNew & .addrOld', b'\tfor _, ka := range aJSON.Addrs {', b'\t\tfor _, bucketIndex := range ka.Buckets {', b'\t\t\tbucket := a.getBucket(ka.BucketType, bucketIndex)', b'\t\t\tbucket[ka.Addr.String()] = ka', b'\t\t}', b'\t\ta.addrLookup[ka.Addr.String()] = ka', b'\t\tif ka.BucketType == bucketTypeNew {', b'\t\t\ta.nNew++', b'\t\t} else {', b'\t\t\ta.nOld++', b'\t\t}', b'\t}', b'\treturn true', b'}', b'', b'// Save saves the book.', b'func (a *AddrBook) Save() {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'\ta.saveToFile(a.filePath)', b'}', b'', b'/* Private methods */', b'', b'func (a *AddrBook) saveRoutine() {', b'\tdumpAddressTicker := time.NewTicker(dumpAddressInterval)', b'out:', b'\tfor {', b'\t\tselect {', b'\t\tcase <-dumpAddressTicker.C:', b'\t\t\ta.saveToFile(a.filePath)', b'\t\tcase <-a.Quit:', b'\t\t\tbreak out', b'\t\t}', b'\t}', b'\tdumpAddressTicker.Stop()', b'\ta.saveToFile(a.filePath)', b'\ta.wg.Done()', b'\tlog.Info("Address handler done")', b'}', b'', b'func (a *AddrBook) getBucket(bucketType byte, bucketIdx int) map[string]*knownAddress {', b'\tswitch bucketType {', b'\tcase bucketTypeNew:', b'\t\treturn a.addrNew[bucketIdx]', b'\tcase bucketTypeOld:', b'\t\treturn a.addrOld[bucketIdx]', b'\tdefault:', b'\t\tcmn.PanicSanity("Should not happen")', b'\t\treturn nil', b'\t}', b'}', b'', b"// Adds ka to new bucket. Returns false if it couldn't do it cuz buckets full.", b'// NOTE: currently it always returns true.', b'func (a *AddrBook) addToNewBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot add address already in old bucket to a new bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > newBucketSize {', b'\t\tlog.Info("new bucket is full, expiring old ")', b'\t\ta.expireNew(bucketIdx)', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nNew++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b"// Adds ka to old bucket. Returns false if it couldn't do it cuz buckets full.", b'func (a *AddrBook) addToOldBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isNew() {', b'\t\tlog.Error(cmn.Fmt("Cannot add new address to old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'\tif len(ka.Buckets) != 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot add already old address to another old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > oldBucketSize {', b'\t\treturn false', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nOld++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b'func (a *AddrBook) removeFromBucket(ka *knownAddress, bucketType byte, bucketIdx int) {', b'\tif ka.BucketType != bucketType {', b'\t\tlog.Error(cmn.Fmt("Bucket type mismatch: %v", ka))', b'\t\treturn', b'\t}', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tdelete(bucket, ka.Addr.String())', b'\tif ka.removeBucketRef(bucketIdx) == 0 {', b'\t\tif bucketType == bucketTypeNew {', b'\t\t\ta.nNew--', b'\t\t} else {', b'\t\t\ta.nOld--', b'\t\t}', b'\t\tdelete(a.addrLookup, ka.Addr.String())', b'\t}', b'}', b'', b'func (a *AddrBook) removeFromAllBuckets(ka *knownAddress) {', b'\tfor _, bucketIdx := range ka.Buckets {', b'\t\tbucket := a.getBucket(ka.BucketType, bucketIdx)', b'\t\tdelete(bucket, ka.Addr.String())', b'\t}', b'\tka.Buckets = nil', b'\tif ka.BucketType == bucketTypeNew {', b'\t\ta.nNew--', b'\t} else {', b'\t\ta.nOld--', b'\t}', b'\tdelete(a.addrLookup, ka.Addr.String())', b'}', b'', b'func (a *AddrBook) pickOldest(bucketType byte, bucketIdx int) *knownAddress {', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tvar oldest *knownAddress', b'\tfor _, ka := range bucket {', b'\t\tif oldest == nil || ka.LastAttempt.Before(oldest.LastAttempt) {', b'\t\t\toldest = ka', b'\t\t}', b'\t}', b'\treturn oldest', b'}', b'', b'func (a *AddrBook) addAddress(addr, src *NetAddress) {', b'\tif a.routabilityStrict && !addr.Routable() {', b'\t\tlog.Error(cmn.Fmt("Cannot add non-routable address %v", addr))', b'\t\treturn', b'\t}', b'\tif _, ok := a.ourAddrs[addr.String()]; ok {', b'\t\t// Ignore our own listener address.', b'\t\treturn', b'\t}', b'', b'\tka := a.addrLookup[addr.String()]', b'', b'\tif ka != nil {', b'\t\t// Already old.', b'\t\tif ka.isOld() {', b'\t\t\treturn', b'\t\t}', b'\t\t// Already in max new buckets.', b'\t\tif len(ka.Buckets) == maxNewBucketsPerAddress {', b'\t\t\treturn', b'\t\t}', b'\t\t// The more entries we have, the less likely we are to add more.', b'\t\tfactor := int32(2 * len(ka.Buckets))', b'\t\tif a.rand.Int31n(factor) != 0 {', b'\t\t\treturn', b'\t\t}', b'\t} else {', b'\t\tka = newKnownAddress(addr, src)', b'\t}', b'', b'\tbucket := a.calcNewBucket(addr, src)', b'\ta.addToNewBucket(ka, bucket)', b'', b'\tlog.Info("Added new address", "address", addr, "total", a.size())', b'}', b'', b'// Make space in the new buckets by expiring the really bad entries.', b'// If no bad entries are available we remove the oldest.', b'func (a *AddrBook) expireNew(bucketIdx int) {', b'\tfor addrStr, ka := range a.addrNew[bucketIdx] {', b'\t\t// If an entry is bad, throw it away', b'\t\tif ka.isBad() {', b'\t\t\tlog.Info(cmn.Fmt("expiring bad address %v", addrStr))', b'\t\t\ta.removeFromBucket(ka, bucketTypeNew, bucketIdx)', b'\t\t\treturn', b'\t\t}', b'\t}', b'', b"\t// If we haven't thrown out a bad entry, throw out the oldest entry", b'\toldest := a.pickOldest(bucketTypeNew, bucketIdx)', b'\ta.removeFromBucket(oldest, bucketTypeNew, bucketIdx)', b'}', b'', b'// Promotes an address from new to old.', b'// TODO: Move to old probabilistically.', b'// The better a node is, the less likely it should be evicted from an old bucket.', b'func (a *AddrBook) moveToOld(ka *knownAddress) {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that is already old %v", ka))', b'\t\treturn', b'\t}', b'\tif len(ka.Buckets) == 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that isn\'t in any new buckets %v", ka))', b'\t\treturn', b'\t}', b'', b'\t// Remember one of the buckets in which ka is in.', b'\tfreedBucket := ka.Buckets[0]', b'\t// Remove from all (new) buckets.', b'\ta.removeFromAllBuckets(ka)', b"\t// It's officially old now.", b'\tka.BucketType = bucketTypeOld', b'', b'\t// Try to add it to its oldBucket destination.', b'\toldBucketIdx := a.calcOldBucket(ka.Addr)', b'\tadded := a.addToOldBucket(ka, oldBucketIdx)', b'\tif !added {', b'\t\t// No room, must evict something', b'\t\toldest := a.pickOldest(bucketTypeOld, oldBucketIdx)', b'\t\ta.removeFromBucket(oldest, bucketTypeOld, oldBucketIdx)', b'\t\t// Find new bucket to put oldest in', b'\t\tnewBucketIdx := a.calcNewBucket(oldest.Addr, oldest.Src)', b'\t\tadded := a.addToNewBucket(oldest, newBucketIdx)', b'\t\t// No space in newBucket either, just put it in freedBucket from above.', b'\t\tif !added {', b'\t\t\tadded := a.addToNewBucket(oldest, freedBucket)', b'\t\t\tif !added {', b'\t\t\t\tlog.Error(cmn.Fmt("Could not migrate oldest %v to freedBucket %v", oldest, freedBucket))', b'\t\t\t}', b'\t\t}', b'\t\t// Finally, add to bucket again.', b'\t\tadded = a.addToOldBucket(ka, oldBucketIdx)', b'\t\tif !added {', b'\t\t\tlog.Error(cmn.Fmt("Could not re-add ka %v to oldBucketIdx %v", ka, oldBucketIdx))', b'\t\t}', b'\t}', b'}', b'', b'// doublesha256( key + sourcegroup +', b'// int64(doublesha256(key + group + sourcegroup))%bucket_per_group ) % num_new_buckets', b'func (a *AddrBook) calcNewBucket(addr, src *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(a.groupKey(addr))...)', b'\tdata1 = append(data1, []byte(a.groupKey(src))...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= newBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(src)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % newBucketCount)', b'}', b'', b'// doublesha256( key + group +', b'// int64(doublesha256(key + addr))%buckets_per_group ) % num_old_buckets', b'func (a *AddrBook) calcOldBucket(addr *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(addr.String())...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= oldBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(addr)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % oldBucketCount)', b'}', b'', b'// Return a string representing the network group of this address.', b'// This is the /16 for IPv6, the /32 (/36 for he.net) for IPv6, the string', b'// "local" for a local address and the string "unroutable for an unroutable', b'// address.', b'func (a *AddrBook) groupKey(na *NetAddress) string {', b'\tif a.routabilityStrict && na.Local() {', b'\t\treturn "local"', b'\t}', b'\tif a.routabilityStrict && !na.Routable() {', b'\t\treturn "unroutable"', b'\t}', b'', b'\tif ipv4 := na.IP.To4(); ipv4 != nil {', b'\t\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'\tif na.RFC6145() || na.RFC6052() {', b'\t\t// last four bytes are the ip address', b'\t\tip := net.IP(na.IP[12:16])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\tif na.RFC3964() {', b'\t\tip := net.IP(na.IP[2:7])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'', b'\t}', b'\tif na.RFC4380() {', b'\t\t// teredo tunnels have the last 4 bytes as the v4 address XOR', b'\t\t// 0xff.', b'\t\tip := net.IP(make([]byte, 4))', b'\t\tfor i, byte := range na.IP[12:16] {', b'\t\t\tip[i] = byte ^ 0xff', b'\t\t}', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\t// OK, so now we know ourselves to be a IPv6 address.', b"\t// bitcoind uses /32 for everything, except for Hurricane Electric's", b'\t// (he.net) IP range, which it uses /36 for.', b'\tbits := 32', b'\theNet := &net.IPNet{IP: net.ParseIP("2001:470::"),', b'\t\tMask: net.CIDRMask(32, 128)}', b'\tif heNet.Contains(na.IP) {', b'\t\tbits = 36', b'\t}', b'', b'\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(bits, 128)}).String()', b'}', b'', b'//-----------------------------------------------------------------------------', b'', b'/*', b' knownAddress', b'', b' tracks information about a known network address that is used', b' to determine how viable an address is.', b'*/', b'type knownAddress struct {', b'\tAddr *NetAddress', b'\tSrc *NetAddress', b'\tAttempts int32', b'\tLastAttempt time.Time', b'\tLastSuccess time.Time', b'\tBucketType byte', b'\tBuckets []int', b'}', b'', b'func newKnownAddress(addr *NetAddress, src *NetAddress) *knownAddress {', b'\treturn &knownAddress{', b'\t\tAddr: addr,', b'\t\tSrc: src,', b'\t\tAttempts: 0,', b'\t\tLastAttempt: time.Now(),', b'\t\tBucketType: bucketTypeNew,', b'\t\tBuckets: nil,', b'\t}', b'}', b'', b'func (ka *knownAddress) isOld() bool {', b'\treturn ka.BucketType == bucketTypeOld', b'}', b'', b'func (ka *knownAddress) isNew() bool {', b'\treturn ka.BucketType == bucketTypeNew', b'}', b'', b'func (ka *knownAddress) markAttempt() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts += 1', b'}', b'', b'func (ka *knownAddress) markGood() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts = 0', b'\tka.LastSuccess = now', b'}', b'', b'func (ka *knownAddress) addBucketRef(bucketIdx int) int {', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket == bucketIdx {', b'\t\t\t// TODO refactor to return error?', b'\t\t\t// log.Warn(Fmt("Bucket already exists in ka.Buckets: %v", ka))', b'\t\t\treturn -1', b'\t\t}', b'\t}', b'\tka.Buckets = append(ka.Buckets, bucketIdx)', b'\treturn len(ka.Buckets)', b'}', b'', b'func (ka *knownAddress) removeBucketRef(bucketIdx int) int {', b'\tbuckets := []int{}', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket != bucketIdx {', b'\t\t\tbuckets = append(buckets, bucket)', b'\t\t}', b'\t}', b'\tif len(buckets) != len(ka.Buckets)-1 {', b'\t\t// TODO refactor to return error?', b'\t\t// log.Warn(Fmt("bucketIdx not found in ka.Buckets: %v", ka))', b'\t\treturn -1', b'\t}', b'\tka.Buckets = buckets', b'\treturn len(ka.Buckets)', b'}', b'', b'/*', b' An address is bad if the address in question has not been tried in the last', b' minute and meets one of the following criteria:', b'', b' 1) It claims to be from the future', b" 2) It hasn't been seen in over a month", b' 3) It has failed at least three times and never succeeded', b' 4) It has failed ten times in the last week', b'', b' All addresses that meet these criteria are assumed to be worthless and not', b' worth keeping hold of.', b'*/', b'func (ka *knownAddress) isBad() bool {', b'\t// Has been attempted in the last minute --> good', b'\tif ka.LastAttempt.Before(time.Now().Add(-1 * time.Minute)) {', b'\t\treturn false', b'\t}', b'', b'\t// Over a month old?', b'\tif ka.LastAttempt.After(time.Now().Add(-1 * numMissingDays * time.Hour * 24)) {', b'\t\treturn true', b'\t}', b'', b'\t// Never succeeded?', b'\tif ka.LastSuccess.IsZero() && ka.Attempts >= numRetries {', b'\t\treturn true', b'\t}', b'', b"\t// Hasn't succeeded in too long?", b'\tif ka.LastSuccess.Before(time.Now().Add(-1*minBadDays*time.Hour*24)) &&', b'\t\tka.Attempts >= maxFailures {', b'\t\treturn true', b'\t}', b'', b'\treturn false', b'}']]
2017-10-15 12:11:02,866 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, [b'// Modified for Tendermint', b'// Originally Copyright (c) 2013-2014 Conformal Systems LLC.', b'// https://github.com/conformal/btcd/blob/master/LICENSE', b'', b'package p2p', b'', b'import (', b'\t"encoding/binary"', b'\t"encoding/json"', b'\t"math"', b'\t"math/rand"', b'\t"net"', b'\t"os"', b'\t"sync"', b'\t"s', b'\t"time"', b'', b'\tlog "github.com/sirupsen/logrus"', b'\tcrypto "github.com/tendermint/go-crypto"', b'\tcmn "github.com/tendermint/tmlibs/common"', b')', b'', b'const (', b'\t// addresses under which the address manager will claim to need more addresses.', b'\tneedAddressThreshold = 1000', b'', b'\t// interval used to dump the address cache to disk for future use.', b'\tdumpAddressInterval = time.Minute * 2', b'', b'\t// max addresses in each old address bucket.', b'\toldBucketSize = 64', b'', b'\t// buckets we split old addresses over.', b'\toldBucketCount = 64', b'', b'\t// max addresses in each new address bucket.', b'\tnewBucketSize = 64', b'', b'\t// buckets that we spread new addresses over.', b'\tnewBucketCount = 256', b'', b'\t// old buckets over which an address group will be spread.', b'\toldBucketsPerGroup = 4', b'', b'\t// new buckets over which an source address group will be spread.', b'\tnewBucketsPerGroup = 32', b'', b'\t// buckets a frequently seen new address may end up in.', b'\tmaxNewBucketsPerAddress = 4', b'', b'\t// days before which we assume an address has vanished', b'\t// if we have not seen it announced in that long.', b'\tnumMissingDays = 30', b'', b'\t// tries without a single success before we assume an address is bad.', b'\tnumRetries = 3', b'', b'\t// max failures we will accept without a success before considering an address bad.', b'\tmaxFailures = 10', b'', b'\t// days since the last success before we will consider evicting an address.', b'\tminBadDays = 7', b'', b'\t// % of total addresses known returned by GetSelection.', b'\tgetSelectionPercent = 23', b'', b'\t// min addresses that must be returned by GetSelection. Useful for bootstrapping.', b'\tminGetSelection = 32', b'', b'\t// max addresses returned by GetSelection', b'\t// NOTE: this must match "maxPexMessageSize"', b'\tmaxGetSelection = 250', b'', b'\t// current version of the on-disk format.', b'\tserializationVersion = 1', b')', b'', b'const (', b'\tbucketTypeNew = 0x01', b'\tbucketTypeOld = 0x02', b')', b'', b'// AddrBook - concurrency safe peer address manager.', b'type AddrBook struct {', b'\tcmn.BaseService', b'', b'\tmtx sync.Mutex', b'\tfilePath string', b'\troutabilityStrict bool', b'\trand *rand.Rand', b'\tkey string', b'\tourAddrs map[string]*NetAddress', b'\taddrLookup map[string]*knownAddress // new & old', b'\taddrNew []map[string]*knownAddress', b'\taddrOld []map[string]*knownAddress', b'\twg sync.WaitGroup', b'\tnOld int', b'\tnNew int', b'}', b'', b'// NewAddrBook creates a new address book.', b'// Use Start to begin processing asynchronous address updates.', b'func NewAddrBook(filePath string, routabilityStrict bool) *AddrBook {', b'\tam := &AddrBook{', b'\t\trand: rand.New(rand.NewSource(time.Now().UnixNano())),', b'\t\tourAddrs: make(map[string]*NetAddress),', b'\t\taddrLookup: make(map[string]*knownAddress),', b'\t\tfilePath: filePath,', b'\t\troutabilityStrict: routabilityStrict,', b'\t}', b'\tam.init()', b'\tam.BaseService = *cmn.NewBaseService(nil, "AddrBook", am)', b'\treturn am', b'}', b'', b"// When modifying this, don't forget to update loadFromFile()", b'func (a *AddrBook) init() {', b'\ta.key = crypto.CRandHex(24) // 24/2 * 8 = 96 bits', b'\t// New addr buckets', b'\ta.addrNew = make([]map[string]*knownAddress, newBucketCount)', b'\tfor i := range a.addrNew {', b'\t\ta.addrNew[i] = make(map[string]*knownAddress)', b'\t}', b'\t// Old addr buckets', b'\ta.addrOld = make([]map[string]*knownAddress, oldBucketCount)', b'\tfor i := range a.addrOld {', b'\t\ta.addrOld[i] = make(map[string]*knownAddress)', b'\t}', b'}', b'', b'// OnStart implements Service.', b'func (a *AddrBook) OnStart() error {', b'\ta.BaseService.OnStart()', b'\ta.loadFromFile(a.filePath)', b'\ta.wg.Add(1)', b'\tgo a.saveRoutine()', b'\treturn nil', b'}', b'', b'// OnStop implements Service.', b'func (a *AddrBook) OnStop() {', b'\ta.BaseService.OnStop()', b'}', b'', b'func (a *AddrBook) Wait() {', b'\ta.wg.Wait()', b'}', b'', b'func (a *AddrBook) AddOurAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithField("addr", addr).Info("Add our address to book")', b'', b'\ta.ourAddrs[addr.String()] = addr', b'}', b'', b'func (a *AddrBook) OurAddresses() []*NetAddress {', b'\taddrs := []*NetAddress{}', b'\tfor _, addr := range a.ourAddrs {', b'\t\taddrs = append(addrs, addr)', b'\t}', b'\treturn addrs', b'}', b'', b'// NOTE: addr must not be nil', b'func (a *AddrBook) AddAddress(addr *NetAddress, src *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithFields(log.Fields{', b'\t\t"addr": addr,', b'\t\t"src": src,', b'\t}).Info("Add address to book")', b'\ta.addAddress(addr, src)', b'}', b'', b'func (a *AddrBook) NeedMoreAddrs() bool {', b'\treturn a.Size() < needAddressThreshold', b'}', b'', b'func (a *AddrBook) Size() int {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\treturn a.size()', b'}', b'', b'func (a *AddrBook) size() int {', b'\treturn a.nNew + a.nOld', b'}', b'', b'// Pick an address to connect to with new/old bias.', b'func (a *AddrBook) PickAddress(newBias int) *NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'\tif newBias > 100 {', b'\t\tnewBias = 100', b'\t}', b'\tif newBias < 0 {', b'\t\tnewBias = 0', b'\t}', b'', b'\t// Bias between new and old addresses.', b'\toldCorrelation := math.Sqrt(float64(a.nOld)) * (100.0 - float64(newBias))', b'\tnewCorrelation := math.Sqrt(float64(a.nNew)) * float64(newBias)', b'', b'\tif (newCorrelation+oldCorrelation)*a.rand.Float64() < oldCorrelation {', b'\t\t// pick random Old bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrOld[a.rand.Intn(len(a.addrOld))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t} else {', b'\t\t// pick random New bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrNew[a.rand.Intn(len(a.addrNew))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t}', b'\treturn nil', b'}', b'', b'func (a *AddrBook) MarkGood(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markGood()', b'\tif ka.isNew() {', b'\t\ta.moveToOld(ka)', b'\t}', b'}', b'', b'func (a *AddrBook) MarkAttempt(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markAttempt()', b'}', b'', b'// MarkBad currently just ejects the address. In the future, consider', b'// blacklisting.', b'func (a *AddrBook) MarkBad(addr *NetAddress) {', b'\ta.RemoveAddress(addr)', b'}', b'', b'// RemoveAddress removes the address from the book.', b'func (a *AddrBook) RemoveAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tlog.WithField("addr", addr).Info("Remove address from book")', b'\ta.removeFromAllBuckets(ka)', b'}', b'', b'/* Peer exchange */', b'', b'// GetSelection randomly selects some addresses (old & new). Suitable for peer-exchange protocols.', b'func (a *AddrBook) GetSelection() []*NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'', b'\tallAddr := make([]*NetAddress, a.size())', b'\ti := 0', b'\tfor _, v := range a.addrLookup {', b'\t\tallAddr[i] = v.Addr', b'\t\ti++', b'\t}', b'', b'\tnumAddresses := cmn.MaxInt(', b'\t\tcmn.MinInt(minGetSelection, len(allAddr)),', b'\t\tlen(allAddr)*getSelectionPercent/100)', b'\tnumAddresses = cmn.MinInt(maxGetSelection, numAddresses)', b'', b'\t// Fisher-Yates shuffle the array. We only need to do the first', b"\t// `numAddresses' since we are throwing the rest.", b'\tfor i := 0; i < numAddresses; i++ {', b'\t\t// pick a number between current index and the end', b'\t\tj := rand.Intn(len(allAddr)-i) + i', b'\t\tallAddr[i], allAddr[j] = allAddr[j], allAddr[i]', b'\t}', b'', b'\t// slice off the limit we are willing to share.', b'\treturn allAddr[:numAddresses]', b'}', b'', b'/* Loading & Saving */', b'', b'type addrBookJSON struct {', b'\tKey string', b'\tAddrs []*knownAddress', b'}', b'', b'func (a *AddrBook) saveToFile(filePath string) {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\t// Compile Addrs', b'\taddrs := []*knownAddress{}', b'\tfor _, ka := range a.addrLookup {', b'\t\taddrs = append(addrs, ka)', b'\t}', b'', b'\taJSON := &addrBookJSON{', b'\t\tKey: a.key,', b'\t\tAddrs: addrs,', b'\t}', b'', b'\tjsonBytes, err := json.MarshalIndent(aJSON, "", "\\t")', b'\tif err != nil {', b'\t\tlog.WithField("err", err).Error("Failed to save AddrBook to file")', b'\t\treturn', b'\t}', b'\terr = cmn.WriteFileAtomic(filePath, jsonBytes, 0644)', b'\tif err != nil {', b'\t\tlog.WithFields(log.Fields{', b'\t\t\t"file": filePath,', b'\t\t\t"err": err,', b'\t\t}).Error("Failed to save AddrBook to file")', b'\t}', b'}', b'', b'// Returns false if file does not exist.', b'// cmn.Panics if file is corrupt.', b'func (a *AddrBook) loadFromFile(filePath string) bool {', b"\t// If doesn't exist, do nothing.", b'\t_, err := os.Stat(filePath)', b'\tif os.IsNotExist(err) {', b'\t\treturn false', b'\t}', b'', b'\t// Load addrBookJSON{}', b'\tr, err := os.Open(filePath)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error opening file %s: %v", filePath, err))', b'\t}', b'\tdefer r.Close()', b'\taJSON := &addrBookJSON{}', b'\tdec := json.NewDecoder(r)', b'\terr = dec.Decode(aJSON)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error reading file %s: %v", filePath, err))', b'\t}', b'', b'\t// Restore all the fields...', b'\t// Restore the key', b'\ta.key = aJSON.Key', b'\t// Restore .addrNew & .addrOld', b'\tfor _, ka := range aJSON.Addrs {', b'\t\tfor _, bucketIndex := range ka.Buckets {', b'\t\t\tbucket := a.getBucket(ka.BucketType, bucketIndex)', b'\t\t\tbucket[ka.Addr.String()] = ka', b'\t\t}', b'\t\ta.addrLookup[ka.Addr.String()] = ka', b'\t\tif ka.BucketType == bucketTypeNew {', b'\t\t\ta.nNew++', b'\t\t} else {', b'\t\t\ta.nOld++', b'\t\t}', b'\t}', b'\treturn true', b'}', b'', b'// Save saves the book.', b'func (a *AddrBook) Save() {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'\ta.saveToFile(a.filePath)', b'}', b'', b'/* Private methods */', b'', b'func (a *AddrBook) saveRoutine() {', b'\tdumpAddressTicker := time.NewTicker(dumpAddressInterval)', b'out:', b'\tfor {', b'\t\tselect {', b'\t\tcase <-dumpAddressTicker.C:', b'\t\t\ta.saveToFile(a.filePath)', b'\t\tcase <-a.Quit:', b'\t\t\tbreak out', b'\t\t}', b'\t}', b'\tdumpAddressTicker.Stop()', b'\ta.saveToFile(a.filePath)', b'\ta.wg.Done()', b'\tlog.Info("Address handler done")', b'}', b'', b'func (a *AddrBook) getBucket(bucketType byte, bucketIdx int) map[string]*knownAddress {', b'\tswitch bucketType {', b'\tcase bucketTypeNew:', b'\t\treturn a.addrNew[bucketIdx]', b'\tcase bucketTypeOld:', b'\t\treturn a.addrOld[bucketIdx]', b'\tdefault:', b'\t\tcmn.PanicSanity("Should not happen")', b'\t\treturn nil', b'\t}', b'}', b'', b"// Adds ka to new bucket. Returns false if it couldn't do it cuz buckets full.", b'// NOTE: currently it always returns true.', b'func (a *AddrBook) addToNewBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot add address already in old bucket to a new bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > newBucketSize {', b'\t\tlog.Info("new bucket is full, expiring old ")', b'\t\ta.expireNew(bucketIdx)', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nNew++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b"// Adds ka to old bucket. Returns false if it couldn't do it cuz buckets full.", b'func (a *AddrBook) addToOldBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isNew() {', b'\t\tlog.Error(cmn.Fmt("Cannot add new address to old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'\tif len(ka.Buckets) != 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot add already old address to another old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > oldBucketSize {', b'\t\treturn false', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nOld++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b'func (a *AddrBook) removeFromBucket(ka *knownAddress, bucketType byte, bucketIdx int) {', b'\tif ka.BucketType != bucketType {', b'\t\tlog.Error(cmn.Fmt("Bucket type mismatch: %v", ka))', b'\t\treturn', b'\t}', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tdelete(bucket, ka.Addr.String())', b'\tif ka.removeBucketRef(bucketIdx) == 0 {', b'\t\tif bucketType == bucketTypeNew {', b'\t\t\ta.nNew--', b'\t\t} else {', b'\t\t\ta.nOld--', b'\t\t}', b'\t\tdelete(a.addrLookup, ka.Addr.String())', b'\t}', b'}', b'', b'func (a *AddrBook) removeFromAllBuckets(ka *knownAddress) {', b'\tfor _, bucketIdx := range ka.Buckets {', b'\t\tbucket := a.getBucket(ka.BucketType, bucketIdx)', b'\t\tdelete(bucket, ka.Addr.String())', b'\t}', b'\tka.Buckets = nil', b'\tif ka.BucketType == bucketTypeNew {', b'\t\ta.nNew--', b'\t} else {', b'\t\ta.nOld--', b'\t}', b'\tdelete(a.addrLookup, ka.Addr.String())', b'}', b'', b'func (a *AddrBook) pickOldest(bucketType byte, bucketIdx int) *knownAddress {', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tvar oldest *knownAddress', b'\tfor _, ka := range bucket {', b'\t\tif oldest == nil || ka.LastAttempt.Before(oldest.LastAttempt) {', b'\t\t\toldest = ka', b'\t\t}', b'\t}', b'\treturn oldest', b'}', b'', b'func (a *AddrBook) addAddress(addr, src *NetAddress) {', b'\tif a.routabilityStrict && !addr.Routable() {', b'\t\tlog.Error(cmn.Fmt("Cannot add non-routable address %v", addr))', b'\t\treturn', b'\t}', b'\tif _, ok := a.ourAddrs[addr.String()]; ok {', b'\t\t// Ignore our own listener address.', b'\t\treturn', b'\t}', b'', b'\tka := a.addrLookup[addr.String()]', b'', b'\tif ka != nil {', b'\t\t// Already old.', b'\t\tif ka.isOld() {', b'\t\t\treturn', b'\t\t}', b'\t\t// Already in max new buckets.', b'\t\tif len(ka.Buckets) == maxNewBucketsPerAddress {', b'\t\t\treturn', b'\t\t}', b'\t\t// The more entries we have, the less likely we are to add more.', b'\t\tfactor := int32(2 * len(ka.Buckets))', b'\t\tif a.rand.Int31n(factor) != 0 {', b'\t\t\treturn', b'\t\t}', b'\t} else {', b'\t\tka = newKnownAddress(addr, src)', b'\t}', b'', b'\tbucket := a.calcNewBucket(addr, src)', b'\ta.addToNewBucket(ka, bucket)', b'', b'\tlog.Info("Added new address", "address", addr, "total", a.size())', b'}', b'', b'// Make space in the new buckets by expiring the really bad entries.', b'// If no bad entries are available we remove the oldest.', b'func (a *AddrBook) expireNew(bucketIdx int) {', b'\tfor addrStr, ka := range a.addrNew[bucketIdx] {', b'\t\t// If an entry is bad, throw it away', b'\t\tif ka.isBad() {', b'\t\t\tlog.Info(cmn.Fmt("expiring bad address %v", addrStr))', b'\t\t\ta.removeFromBucket(ka, bucketTypeNew, bucketIdx)', b'\t\t\treturn', b'\t\t}', b'\t}', b'', b"\t// If we haven't thrown out a bad entry, throw out the oldest entry", b'\toldest := a.pickOldest(bucketTypeNew, bucketIdx)', b'\ta.removeFromBucket(oldest, bucketTypeNew, bucketIdx)', b'}', b'', b'// Promotes an address from new to old.', b'// TODO: Move to old probabilistically.', b'// The better a node is, the less likely it should be evicted from an old bucket.', b'func (a *AddrBook) moveToOld(ka *knownAddress) {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that is already old %v", ka))', b'\t\treturn', b'\t}', b'\tif len(ka.Buckets) == 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that isn\'t in any new buckets %v", ka))', b'\t\treturn', b'\t}', b'', b'\t// Remember one of the buckets in which ka is in.', b'\tfreedBucket := ka.Buckets[0]', b'\t// Remove from all (new) buckets.', b'\ta.removeFromAllBuckets(ka)', b"\t// It's officially old now.", b'\tka.BucketType = bucketTypeOld', b'', b'\t// Try to add it to its oldBucket destination.', b'\toldBucketIdx := a.calcOldBucket(ka.Addr)', b'\tadded := a.addToOldBucket(ka, oldBucketIdx)', b'\tif !added {', b'\t\t// No room, must evict something', b'\t\toldest := a.pickOldest(bucketTypeOld, oldBucketIdx)', b'\t\ta.removeFromBucket(oldest, bucketTypeOld, oldBucketIdx)', b'\t\t// Find new bucket to put oldest in', b'\t\tnewBucketIdx := a.calcNewBucket(oldest.Addr, oldest.Src)', b'\t\tadded := a.addToNewBucket(oldest, newBucketIdx)', b'\t\t// No space in newBucket either, just put it in freedBucket from above.', b'\t\tif !added {', b'\t\t\tadded := a.addToNewBucket(oldest, freedBucket)', b'\t\t\tif !added {', b'\t\t\t\tlog.Error(cmn.Fmt("Could not migrate oldest %v to freedBucket %v", oldest, freedBucket))', b'\t\t\t}', b'\t\t}', b'\t\t// Finally, add to bucket again.', b'\t\tadded = a.addToOldBucket(ka, oldBucketIdx)', b'\t\tif !added {', b'\t\t\tlog.Error(cmn.Fmt("Could not re-add ka %v to oldBucketIdx %v", ka, oldBucketIdx))', b'\t\t}', b'\t}', b'}', b'', b'// doublesha256( key + sourcegroup +', b'// int64(doublesha256(key + group + sourcegroup))%bucket_per_group ) % num_new_buckets', b'func (a *AddrBook) calcNewBucket(addr, src *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(a.groupKey(addr))...)', b'\tdata1 = append(data1, []byte(a.groupKey(src))...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= newBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(src)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % newBucketCount)', b'}', b'', b'// doublesha256( key + group +', b'// int64(doublesha256(key + addr))%buckets_per_group ) % num_old_buckets', b'func (a *AddrBook) calcOldBucket(addr *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(addr.String())...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= oldBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(addr)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % oldBucketCount)', b'}', b'', b'// Return a string representing the network group of this address.', b'// This is the /16 for IPv6, the /32 (/36 for he.net) for IPv6, the string', b'// "local" for a local address and the string "unroutable for an unroutable', b'// address.', b'func (a *AddrBook) groupKey(na *NetAddress) string {', b'\tif a.routabilityStrict && na.Local() {', b'\t\treturn "local"', b'\t}', b'\tif a.routabilityStrict && !na.Routable() {', b'\t\treturn "unroutable"', b'\t}', b'', b'\tif ipv4 := na.IP.To4(); ipv4 != nil {', b'\t\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'\tif na.RFC6145() || na.RFC6052() {', b'\t\t// last four bytes are the ip address', b'\t\tip := net.IP(na.IP[12:16])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\tif na.RFC3964() {', b'\t\tip := net.IP(na.IP[2:7])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'', b'\t}', b'\tif na.RFC4380() {', b'\t\t// teredo tunnels have the last 4 bytes as the v4 address XOR', b'\t\t// 0xff.', b'\t\tip := net.IP(make([]byte, 4))', b'\t\tfor i, byte := range na.IP[12:16] {', b'\t\t\tip[i] = byte ^ 0xff', b'\t\t}', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\t// OK, so now we know ourselves to be a IPv6 address.', b"\t// bitcoind uses /32 for everything, except for Hurricane Electric's", b'\t// (he.net) IP range, which it uses /36 for.', b'\tbits := 32', b'\theNet := &net.IPNet{IP: net.ParseIP("2001:470::"),', b'\t\tMask: net.CIDRMask(32, 128)}', b'\tif heNet.Contains(na.IP) {', b'\t\tbits = 36', b'\t}', b'', b'\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(bits, 128)}).String()', b'}', b'', b'//-----------------------------------------------------------------------------', b'', b'/*', b' knownAddress', b'', b' tracks information about a known network address that is used', b' to determine how viable an address is.', b'*/', b'type knownAddress struct {', b'\tAddr *NetAddress', b'\tSrc *NetAddress', b'\tAttempts int32', b'\tLastAttempt time.Time', b'\tLastSuccess time.Time', b'\tBucketType byte', b'\tBuckets []int', b'}', b'', b'func newKnownAddress(addr *NetAddress, src *NetAddress) *knownAddress {', b'\treturn &knownAddress{', b'\t\tAddr: addr,', b'\t\tSrc: src,', b'\t\tAttempts: 0,', b'\t\tLastAttempt: time.Now(),', b'\t\tBucketType: bucketTypeNew,', b'\t\tBuckets: nil,', b'\t}', b'}', b'', b'func (ka *knownAddress) isOld() bool {', b'\treturn ka.BucketType == bucketTypeOld', b'}', b'', b'func (ka *knownAddress) isNew() bool {', b'\treturn ka.BucketType == bucketTypeNew', b'}', b'', b'func (ka *knownAddress) markAttempt() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts += 1', b'}', b'', b'func (ka *knownAddress) markGood() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts = 0', b'\tka.LastSuccess = now', b'}', b'', b'func (ka *knownAddress) addBucketRef(bucketIdx int) int {', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket == bucketIdx {', b'\t\t\t// TODO refactor to return error?', b'\t\t\t// log.Warn(Fmt("Bucket already exists in ka.Buckets: %v", ka))', b'\t\t\treturn -1', b'\t\t}', b'\t}', b'\tka.Buckets = append(ka.Buckets, bucketIdx)', b'\treturn len(ka.Buckets)', b'}', b'', b'func (ka *knownAddress) removeBucketRef(bucketIdx int) int {', b'\tbuckets := []int{}', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket != bucketIdx {', b'\t\t\tbuckets = append(buckets, bucket)', b'\t\t}', b'\t}', b'\tif len(buckets) != len(ka.Buckets)-1 {', b'\t\t// TODO refactor to return error?', b'\t\t// log.Warn(Fmt("bucketIdx not found in ka.Buckets: %v", ka))', b'\t\treturn -1', b'\t}', b'\tka.Buckets = buckets', b'\treturn len(ka.Buckets)', b'}', b'', b'/*', b' An address is bad if the address in question has not been tried in the last', b' minute and meets one of the following criteria:', b'', b' 1) It claims to be from the future', b" 2) It hasn't been seen in over a month", b' 3) It has failed at least three times and never succeeded', b' 4) It has failed ten times in the last week', b'', b' All addresses that meet these criteria are assumed to be worthless and not', b' worth keeping hold of.', b'*/', b'func (ka *knownAddress) isBad() bool {', b'\t// Has been attempted in the last minute --> good', b'\tif ka.LastAttempt.Before(time.Now().Add(-1 * time.Minute)) {', b'\t\treturn false', b'\t}', b'', b'\t// Over a month old?', b'\tif ka.LastAttempt.After(time.Now().Add(-1 * numMissingDays * time.Hour * 24)) {', b'\t\treturn true', b'\t}', b'', b'\t// Never succeeded?', b'\tif ka.LastSuccess.IsZero() && ka.Attempts >= numRetries {', b'\t\treturn true', b'\t}', b'', b"\t// Hasn't succeeded in too long?", b'\tif ka.LastSuccess.Before(time.Now().Add(-1*minBadDays*time.Hour*24)) &&', b'\t\tka.Attempts >= maxFailures {', b'\t\treturn true', b'\t}', b'', b'\treturn false', b'}']
2017-10-15 12:11:02,866 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x103674638>, switching back
2017-10-15 12:11:02,915 [INFO @ cm_core.py:_refresh_completions:508] 30760 - _refresh_completions names: [], startcol: 4, matches: []
2017-10-15 12:11:02,915 [INFO @ cm_core.py:_complete:623] 30760 - matches==0, _last_matches==0, ignore
2017-10-15 12:11:03,009 [INFO @ cm_gocode.py:cm_refresh:74] 30760 - result [1, [{'class': 'import', 'package': '', 'type': '', 'name': 'sort'}, {'class': 'import', 'package': '', 'type': '', 'name': 'strconv'}, {'class': 'import', 'package': '', 'type': '', 'name': 'strings'}, {'class': 'import', 'package': '', 'type': '', 'name': 'sync'}, {'class': 'import', 'package': '', 'type': '', 'name': 'sync/atomic'}, {'class': 'import', 'package': '', 'type': '', 'name': 'syscall'}]]
2017-10-15 12:11:03,009 [INFO @ cm_gocode.py:cm_refresh:137] 30760 - startcol 3, matches [{'word': 'sort', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'strconv', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'strings', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'syscall', 'icase': 1, 'menu': '', 'dup': 1}]
2017-10-15 12:11:03,010 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#complete', ['cm-gocode', {'typed': '\t"s', 'early_cache': True, 'match_end': 2, 'filetype': 'go', 'col': 4, 'base': 's', 'force': 0, 'bufnr': 1, 'lnum': 15, 'startcol': 3, 'changedtick': 6, 'scope_match': 'go', 'curpos': [0, 15, 4, 0, 11], 'scope': 'go', 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 3, [{'word': 'sort', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'strconv', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'strings', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'syscall', 'icase': 1, 'menu': '', 'dup': 1}], False])]
2017-10-15 12:11:03,010 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xabcm#complete\x95\xa9cm-gocode\x8f\xa5typed\xa3\t"s\xabearly_cache\xc3\xa9match_end\x02\xa8filetype\xa2go\xa3col\x04\xa4base\xa1s\xa5force\x00\xa5bufnr\x01\xa4lnum\x0f\xa8startcol\x03\xabchangedtick\x06\xabscope_match\xa2go\xa6curpos\x95\x00\x0f\x04\x00\x0b\xa5scope\xa2go\xa8filepath\xda\x002/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go\x03\x96\x84\xa4word\xa4sort\xa5icase\x01\xa4menu\xa0\xa3dup\x01\x84\xa4word\xa7strconv\xa5icase\x01\xa4menu\xa0\xa3dup\x01\x84\xa4word\xa7strings\xa5icase\x01\xa4menu\xa0\xa3dup\x01\x84\xa4word\xa4sync\xa5icase\x01\xa4menu\xa0\xa3dup\x01\x84\xa4word\xabsync/atomic\xa5icase\x01\xa4menu\xa0\xa3dup\x01\x84\xa4word\xa7syscall\xa5icase\x01\xa4menu\xa0\xa3dup\x01\xc2''
2017-10-15 12:11:03,010 [DEBUG @ cm.py:on_notification:265] 30760 - channel method cm_refresh completed
2017-10-15 12:11:03,010 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674638> finished executing
2017-10-15 12:11:03,010 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674638> is now dying...
2017-10-15 12:11:03,010 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:03,011 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:03,013 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:03,013 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_complete', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, b'cm-gocode', {b'typed': b'\t"s', b'early_cache': True, b'match_end': 2, b'scope': b'go', b'filetype': b'go', b'col': 4, b'base': b's', b'force': 0, b'bufnr': 1, b'lnum': 15, b'startcol': 3, b'changedtick': 6, b'curpos': [0, 15, 4, 0, 11], b'scope_match': b'go', b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 3, [{b'word': b'sort', b'icase': 1, b'menu': b'', b'dup': 1}, {b'word': b'strconv', b'icase': 1, b'menu': b'', b'dup': 1}, {b'word': b'strings', b'icase': 1, b'menu': b'', b'dup': 1}, {b'word': b'sync', b'icase': 1, b'menu': b'', b'dup': 1}, {b'word': b'sync/atomic', b'icase': 1, b'menu': b'', b'dup': 1}, {b'word': b'syscall', b'icase': 1, b'menu': b'', b'dup': 1}], False, 0, b'']]
2017-10-15 12:11:03,013 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_complete', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, b'cm-gocode', {b'typed': b'\t"s', b'early_cache': True, b'match_end': 2, b'scope': b'go', b'filetype': b'go', b'col': 4, b'base': b's', b'force': 0, b'bufnr': 1, b'lnum': 15, b'startcol': 3, b'changedtick': 6, b'curpos': [0, 15, 4, 0, 11], b'scope_match': b'go', b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 3, [{b'word': b'sort', b'icase': 1, b'menu': b'', b'dup': 1}, {b'word': b'strconv', b'icase': 1, b'menu': b'', b'dup': 1}, {b'word': b'strings', b'icase': 1, b'menu': b'', b'dup': 1}, {b'word': b'sync', b'icase': 1, b'menu': b'', b'dup': 1}, {b'word': b'sync/atomic', b'icase': 1, b'menu': b'', b'dup': 1}, {b'word': b'syscall', b'icase': 1, b'menu': b'', b'dup': 1}], False, 0, b'']
2017-10-15 12:11:03,013 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:03,014 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_complete, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, 'cm-gocode', {'typed': '\t"s', 'early_cache': True, 'startcol': 3, 'filetype': 'go', 'col': 4, 'base': 's', 'force': 0, 'scope_match': 'go', 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope': 'go', 'curpos': [0, 15, 4, 0, 11], 'changedtick': 6, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 3, [{'word': 'sort', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'strconv', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'strings', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'syscall', 'icase': 1, 'menu': '', 'dup': 1}], False, 0, '']
2017-10-15 12:11:03,014 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 18, 'nvim_eval', ('g:cm_matcher',)]
2017-10-15 12:11:03,014 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x12\xa9nvim_eval\x91\xacg:cm_matcher''
2017-10-15 12:11:03,014 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x103674638> to wait for response
2017-10-15 12:11:03,014 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:03,014 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:03,015 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:03,015 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 18, None, {b'module': b'cm_matchers.prefix_matcher', b'case': b'smartcase'}]
2017-10-15 12:11:03,015 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, {b'module': b'cm_matchers.prefix_matcher', b'case': b'smartcase'}
2017-10-15 12:11:03,015 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x103674638>, switching back
2017-10-15 12:11:03,016 [DEBUG @ cm_core.py:cm_complete:213] 30760 - <cm-gocode> preprocessing result startcol: 3 matches: [{'word': 'sort', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'strconv', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'strings', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'syscall', 'icase': 1, 'menu': '', 'dup': 1}]
2017-10-15 12:11:03,016 [INFO @ cm_core.py:cm_complete:244] 30760 - update popup for [cm-gocode]
2017-10-15 12:11:03,017 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 19, 'nvim_call_function', ('cm#context', [])]
2017-10-15 12:11:03,017 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x13\xb2nvim_call_function\x92\xaacm#context\x90''
2017-10-15 12:11:03,017 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x103674638> to wait for response
2017-10-15 12:11:03,017 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:03,017 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:03,017 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:03,017 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 19, None, {b'typed': b'\t"s', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 4, b'changedtick': 6, b'curpos': [0, 15, 4, 0, 11], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:11:03,017 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, {b'typed': b'\t"s', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 4, b'changedtick': 6, b'curpos': [0, 15, 4, 0, 11], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}
2017-10-15 12:11:03,017 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x103674638>, switching back
2017-10-15 12:11:03,017 [DEBUG @ cm_core.py:_refresh_completions:524] 30760 - <cm-gocode> ignore by disabled
2017-10-15 12:11:03,017 [INFO @ cm_core.py:_refresh_completions:577] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 3, matches cnt: 0
2017-10-15 12:11:03,017 [DEBUG @ cm_core.py:_refresh_completions:578] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 3, matches: [], source matches: {'cm-gocode': {'startcol': 3, 'matches': [{'word': 'sort', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'strconv', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'strings', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'syscall', 'icase': 1, 'menu': '', 'dup': 1}], 'last_matches': [], 'enable': False, 'refresh': False, 'context': {'typed': '\t"s', 'early_cache': True, 'startcol': 3, 'filetype': 'go', 'col': 4, 'base': 's', 'force': 0, 'scope_match': 'go', 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope': 'go', 'curpos': [0, 15, 4, 0, 11], 'changedtick': 6, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}}}
2017-10-15 12:11:03,017 [INFO @ cm_core.py:_complete:623] 30760 - matches==0, _last_matches==0, ignore
2017-10-15 12:11:03,017 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_complete completed
2017-10-15 12:11:03,017 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674638> finished executing
2017-10-15 12:11:03,017 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674638> is now dying...
2017-10-15 12:11:03,018 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:03,018 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:03,051 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:03,051 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"sy', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 5, b'changedtick': 7, b'curpos': [0, 15, 5, 0, 12], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]]
2017-10-15 12:11:03,051 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"sy', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 5, b'changedtick': 7, b'curpos': [0, 15, 5, 0, 12], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:03,052 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:03,052 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_refresh, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, {'typed': '\t"sy', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 5, 'changedtick': 7, 'curpos': [0, 15, 5, 0, 12], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:03,053 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-css> for context scope <go>
2017-10-15 12:11:03,053 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-bufkeyword>, force[0] early_cache[0]
2017-10-15 12:11:03,053 [DEBUG @ cm_core.py:cm_refresh:334] 30760 - <cm-gocode> early_caching
2017-10-15 12:11:03,053 [DEBUG @ cm_core.py:cm_refresh:352] 30760 - <cm-gocode> has been cached, <6> candidates
2017-10-15 12:11:03,053 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tmux>, force[0] early_cache[0]
2017-10-15 12:11:03,053 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-jedi> for context scope <go>
2017-10-15 12:11:03,053 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-filepath>, force[0] early_cache[0]
2017-10-15 12:11:03,054 [DEBUG @ cm_core.py:cm_refresh:326] 30760 - <cm-keyword-continue> is not auto_popup
2017-10-15 12:11:03,054 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tags>, force[0] early_cache[0]
2017-10-15 12:11:03,054 [INFO @ cm_core.py:cm_refresh:372] 30760 - not notifying any channels, _refresh_completions now
2017-10-15 12:11:03,054 [DEBUG @ cm_core.py:_refresh_completions:524] 30760 - <cm-gocode> ignore by disabled
2017-10-15 12:11:03,054 [INFO @ cm_core.py:_refresh_completions:577] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 4, matches cnt: 0
2017-10-15 12:11:03,054 [DEBUG @ cm_core.py:_refresh_completions:578] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 4, matches: [], source matches: {'cm-gocode': {'startcol': 3, 'matches': [{'word': 'sort', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'strconv', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'strings', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'syscall', 'icase': 1, 'menu': '', 'dup': 1}], 'last_matches': [], 'enable': False, 'refresh': False, 'context': {'typed': '\t"s', 'early_cache': True, 'startcol': 3, 'filetype': 'go', 'col': 4, 'base': 's', 'force': 0, 'scope_match': 'go', 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope': 'go', 'curpos': [0, 15, 4, 0, 11], 'changedtick': 6, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}}}
2017-10-15 12:11:03,054 [INFO @ cm_core.py:_complete:623] 30760 - matches==0, _last_matches==0, ignore
2017-10-15 12:11:03,054 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_refresh completed
2017-10-15 12:11:03,054 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674638> finished executing
2017-10-15 12:11:03,054 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674638> is now dying...
2017-10-15 12:11:03,054 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:03,054 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:03,290 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:03,291 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"syn', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 6, b'changedtick': 8, b'curpos': [0, 15, 6, 0, 13], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]]
2017-10-15 12:11:03,291 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"syn', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 6, b'changedtick': 8, b'curpos': [0, 15, 6, 0, 13], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:03,291 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:03,292 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_refresh, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, {'typed': '\t"syn', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 6, 'changedtick': 8, 'curpos': [0, 15, 6, 0, 13], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:03,292 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-css> for context scope <go>
2017-10-15 12:11:03,292 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-bufkeyword>, force[0] early_cache[0]
2017-10-15 12:11:03,292 [DEBUG @ cm_core.py:cm_refresh:352] 30760 - <cm-gocode> has been cached, <6> candidates
2017-10-15 12:11:03,293 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tmux>, force[0] early_cache[0]
2017-10-15 12:11:03,293 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-jedi> for context scope <go>
2017-10-15 12:11:03,293 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-filepath>, force[0] early_cache[0]
2017-10-15 12:11:03,293 [DEBUG @ cm_core.py:cm_refresh:326] 30760 - <cm-keyword-continue> is not auto_popup
2017-10-15 12:11:03,293 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tags>, force[0] early_cache[0]
2017-10-15 12:11:03,293 [INFO @ cm_core.py:cm_refresh:372] 30760 - not notifying any channels, _refresh_completions now
2017-10-15 12:11:03,293 [INFO @ cm_core.py:_refresh_completions:577] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 3, matches cnt: 2
2017-10-15 12:11:03,293 [DEBUG @ cm_core.py:_refresh_completions:578] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 3, matches: [{'word': 'sync', 'icase': 1, 'dup': 1, 'snippet_word': 'sync', 'menu': '', 'padding': '', 'abbr': 'sync'}, {'word': 'sync/atomic', 'icase': 1, 'dup': 1, 'snippet_word': 'sync/atomic', 'menu': '', 'padding': '', 'abbr': 'sync/atomic'}], source matches: {'cm-gocode': {'startcol': 3, 'matches': [{'word': 'sort', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'strconv', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'strings', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'syscall', 'icase': 1, 'menu': '', 'dup': 1}], 'last_matches': [{'word': 'sync', 'icase': 1, 'dup': 1, 'snippet_word': 'sync', 'menu': '', 'padding': '', 'abbr': 'sync'}, {'word': 'sync/atomic', 'icase': 1, 'dup': 1, 'snippet_word': 'sync/atomic', 'menu': '', 'padding': '', 'abbr': 'sync/atomic'}], 'enable': True, 'refresh': False, 'context': {'typed': '\t"s', 'early_cache': True, 'startcol': 3, 'filetype': 'go', 'col': 4, 'base': 's', 'force': 0, 'scope_match': 'go', 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope': 'go', 'curpos': [0, 15, 4, 0, 11], 'changedtick': 6, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}}}
2017-10-15 12:11:03,293 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 20, 'nvim_call_function', ('cm#_core_complete', [{'typed': '\t"syn', 'bufnr': 1, 'lnum': 15, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go', 'filetype': 'go', 'col': 6, 'changedtick': 8, 'curpos': [0, 15, 6, 0, 13], 'scope': 'go', 'force': 0}, 3, [{'word': 'sync', 'icase': 1, 'dup': 1, 'menu': '', 'abbr': 'sync', 'snippet_word': 'sync', 'padding': ''}, {'word': 'sync/atomic', 'icase': 1, 'dup': 1, 'menu': '', 'abbr': 'sync/atomic', 'snippet_word': 'sync/atomic', 'padding': ''}], 0, []])]
2017-10-15 12:11:03,294 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x14\xb2nvim_call_function\x92\xb1cm#_core_complete\x95\x8a\xa5typed\xa5\t"syn\xa5bufnr\x01\xa4lnum\x0f\xa8filepath\xda\x002/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go\xa8filetype\xa2go\xa3col\x06\xabchangedtick\x08\xa6curpos\x95\x00\x0f\x06\x00\r\xa5scope\xa2go\xa5force\x00\x03\x92\x87\xa4word\xa4sync\xa5icase\x01\xa3dup\x01\xa4menu\xa0\xa4abbr\xa4sync\xacsnippet_word\xa4sync\xa7padding\xa0\x87\xa4word\xabsync/atomic\xa5icase\x01\xa3dup\x01\xa4menu\xa0\xa4abbr\xabsync/atomic\xacsnippet_word\xabsync/atomic\xa7padding\xa0\x00\x90''
2017-10-15 12:11:03,294 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x103674638> to wait for response
2017-10-15 12:11:03,294 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:03,294 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:03,294 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:03,294 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 20, None, 0]
2017-10-15 12:11:03,294 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, 0
2017-10-15 12:11:03,294 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x103674638>, switching back
2017-10-15 12:11:03,294 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_refresh completed
2017-10-15 12:11:03,295 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674638> finished executing
2017-10-15 12:11:03,295 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674638> is now dying...
2017-10-15 12:11:03,295 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:03,295 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:05,452 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:05,452 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"syn\t', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 7, b'changedtick': 9, b'curpos': [0, 15, 7, 0, 17], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]]
2017-10-15 12:11:05,452 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"syn\t', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 7, b'changedtick': 9, b'curpos': [0, 15, 7, 0, 17], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:05,452 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:05,453 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_refresh, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, {'typed': '\t"syn\t', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 7, 'changedtick': 9, 'curpos': [0, 15, 7, 0, 17], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:05,453 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-css> for context scope <go>
2017-10-15 12:11:05,454 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-bufkeyword>, force[0] early_cache[0]
2017-10-15 12:11:05,454 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-gocode>, force[0] early_cache[1]
2017-10-15 12:11:05,454 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tmux>, force[0] early_cache[0]
2017-10-15 12:11:05,454 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-jedi> for context scope <go>
2017-10-15 12:11:05,454 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-filepath>, force[0] early_cache[0]
2017-10-15 12:11:05,454 [DEBUG @ cm_core.py:cm_refresh:326] 30760 - <cm-keyword-continue> is not auto_popup
2017-10-15 12:11:05,454 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tags>, force[0] early_cache[0]
2017-10-15 12:11:05,454 [INFO @ cm_core.py:cm_refresh:372] 30760 - not notifying any channels, _refresh_completions now
2017-10-15 12:11:05,454 [INFO @ cm_core.py:_refresh_completions:508] 30760 - _refresh_completions names: [], startcol: 7, matches: []
2017-10-15 12:11:05,454 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 21, 'nvim_call_function', ('cm#_core_complete', [{'typed': '\t"syn\t', 'bufnr': 1, 'lnum': 15, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go', 'filetype': 'go', 'col': 7, 'changedtick': 9, 'curpos': [0, 15, 7, 0, 17], 'scope': 'go', 'force': 0}, 7, [], 0, []])]
2017-10-15 12:11:05,455 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x15\xb2nvim_call_function\x92\xb1cm#_core_complete\x95\x8a\xa5typed\xa6\t"syn\t\xa5bufnr\x01\xa4lnum\x0f\xa8filepath\xda\x002/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go\xa8filetype\xa2go\xa3col\x07\xabchangedtick\t\xa6curpos\x95\x00\x0f\x07\x00\x11\xa5scope\xa2go\xa5force\x00\x07\x90\x00\x90''
2017-10-15 12:11:05,455 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x103674638> to wait for response
2017-10-15 12:11:05,455 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:05,455 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:05,455 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:05,455 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 21, None, 0]
2017-10-15 12:11:05,455 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, 0
2017-10-15 12:11:05,455 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x103674638>, switching back
2017-10-15 12:11:05,455 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_refresh completed
2017-10-15 12:11:05,455 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674638> finished executing
2017-10-15 12:11:05,455 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674638> is now dying...
2017-10-15 12:11:05,455 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:05,455 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:05,699 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:05,699 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"syn\t\t', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 8, b'changedtick': 10, b'curpos': [0, 15, 8, 0, 25], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]]
2017-10-15 12:11:05,699 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"syn\t\t', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 8, b'changedtick': 10, b'curpos': [0, 15, 8, 0, 25], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:05,699 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:05,700 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_refresh, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, {'typed': '\t"syn\t\t', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 8, 'changedtick': 10, 'curpos': [0, 15, 8, 0, 25], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:05,700 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-css> for context scope <go>
2017-10-15 12:11:05,701 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-bufkeyword>, force[0] early_cache[0]
2017-10-15 12:11:05,701 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-gocode>, force[0] early_cache[1]
2017-10-15 12:11:05,701 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tmux>, force[0] early_cache[0]
2017-10-15 12:11:05,701 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-jedi> for context scope <go>
2017-10-15 12:11:05,701 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-filepath>, force[0] early_cache[0]
2017-10-15 12:11:05,701 [DEBUG @ cm_core.py:cm_refresh:326] 30760 - <cm-keyword-continue> is not auto_popup
2017-10-15 12:11:05,701 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tags>, force[0] early_cache[0]
2017-10-15 12:11:05,701 [INFO @ cm_core.py:cm_refresh:372] 30760 - not notifying any channels, _refresh_completions now
2017-10-15 12:11:05,701 [INFO @ cm_core.py:_refresh_completions:508] 30760 - _refresh_completions names: [], startcol: 8, matches: []
2017-10-15 12:11:05,701 [INFO @ cm_core.py:_complete:623] 30760 - matches==0, _last_matches==0, ignore
2017-10-15 12:11:05,701 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_refresh completed
2017-10-15 12:11:05,701 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674638> finished executing
2017-10-15 12:11:05,702 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674638> is now dying...
2017-10-15 12:11:05,702 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:05,702 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:06,308 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,308 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"syn\t', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 7, b'changedtick': 11, b'curpos': [0, 15, 7, 0, 17], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]]
2017-10-15 12:11:06,308 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"syn\t', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 7, b'changedtick': 11, b'curpos': [0, 15, 7, 0, 17], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:06,308 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:06,309 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_refresh, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, {'typed': '\t"syn\t', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 7, 'changedtick': 11, 'curpos': [0, 15, 7, 0, 17], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:06,309 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-css> for context scope <go>
2017-10-15 12:11:06,309 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-bufkeyword>, force[0] early_cache[0]
2017-10-15 12:11:06,309 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-gocode>, force[0] early_cache[1]
2017-10-15 12:11:06,310 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tmux>, force[0] early_cache[0]
2017-10-15 12:11:06,310 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-jedi> for context scope <go>
2017-10-15 12:11:06,310 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-filepath>, force[0] early_cache[0]
2017-10-15 12:11:06,310 [DEBUG @ cm_core.py:cm_refresh:326] 30760 - <cm-keyword-continue> is not auto_popup
2017-10-15 12:11:06,310 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tags>, force[0] early_cache[0]
2017-10-15 12:11:06,310 [INFO @ cm_core.py:cm_refresh:372] 30760 - not notifying any channels, _refresh_completions now
2017-10-15 12:11:06,310 [INFO @ cm_core.py:_refresh_completions:508] 30760 - _refresh_completions names: [], startcol: 7, matches: []
2017-10-15 12:11:06,310 [INFO @ cm_core.py:_complete:623] 30760 - matches==0, _last_matches==0, ignore
2017-10-15 12:11:06,310 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_refresh completed
2017-10-15 12:11:06,310 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674638> finished executing
2017-10-15 12:11:06,310 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674638> is now dying...
2017-10-15 12:11:06,310 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,310 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:06,476 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,476 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"syn', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 6, b'changedtick': 12, b'curpos': [0, 15, 6, 0, 13], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]]
2017-10-15 12:11:06,476 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"syn', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 6, b'changedtick': 12, b'curpos': [0, 15, 6, 0, 13], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:06,476 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:06,477 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_refresh, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, {'typed': '\t"syn', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 6, 'changedtick': 12, 'curpos': [0, 15, 6, 0, 13], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:06,477 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-css> for context scope <go>
2017-10-15 12:11:06,478 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-bufkeyword>, force[0] early_cache[0]
2017-10-15 12:11:06,478 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tmux>, force[0] early_cache[0]
2017-10-15 12:11:06,478 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-jedi> for context scope <go>
2017-10-15 12:11:06,478 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-filepath>, force[0] early_cache[0]
2017-10-15 12:11:06,478 [DEBUG @ cm_core.py:cm_refresh:326] 30760 - <cm-keyword-continue> is not auto_popup
2017-10-15 12:11:06,478 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tags>, force[0] early_cache[0]
2017-10-15 12:11:06,478 [INFO @ cm_core.py:cm_refresh:376] 30760 - notify_sources_to_refresh calls cnt [0], channels cnt [1]
2017-10-15 12:11:06,478 [DEBUG @ cm_core.py:cm_refresh:377] 30760 - cm#_notify_sources_to_refresh [[]] [['cm-gocode']] [{'force': 0, 'typed': '\t"syn', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 6, 'changedtick': 12, 'curpos': [0, 15, 6, 0, 13], 'scope': 'go', 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:11:06,478 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#_notify_sources_to_refresh', [[], [{'id': 5, 'context': {'typed': '\t"syn', 'early_cache': False, 'startcol': 3, 'scope': 'go', 'filetype': 'go', 'col': 6, 'base': 'syn', 'force': 0, 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope_match': 'go', 'curpos': [0, 15, 6, 0, 13], 'changedtick': 12, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 'name': 'cm-gocode'}], {'typed': '\t"syn', 'bufnr': 1, 'lnum': 15, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go', 'filetype': 'go', 'col': 6, 'changedtick': 12, 'curpos': [0, 15, 6, 0, 13], 'scope': 'go', 'force': 0}])]
2017-10-15 12:11:06,479 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xbdcm#_notify_sources_to_refresh\x93\x90\x91\x83\xa2id\x05\xa7context\x8f\xa5typed\xa5\t"syn\xabearly_cache\xc2\xa8startcol\x03\xa5scope\xa2go\xa8filetype\xa2go\xa3col\x06\xa4base\xa3syn\xa5force\x00\xa5bufnr\x01\xa4lnum\x0f\xa9match_end\x02\xabscope_match\xa2go\xa6curpos\x95\x00\x0f\x06\x00\r\xabchangedtick\x0c\xa8filepath\xda\x002/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go\xa4name\xa9cm-gocode\x8a\xa5typed\xa5\t"syn\xa5bufnr\x01\xa4lnum\x0f\xa8filepath\xda\x002/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go\xa8filetype\xa2go\xa3col\x06\xabchangedtick\x0c\xa6curpos\x95\x00\x0f\x06\x00\r\xa5scope\xa2go\xa5force\x00''
2017-10-15 12:11:06,479 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_refresh completed
2017-10-15 12:11:06,479 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,479 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674638> finished executing
2017-10-15 12:11:06,479 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, {b'typed': b'\t"syn', b'early_cache': False, b'match_end': 2, b'scope': b'go', b'filetype': b'go', b'col': 6, b'base': b'syn', b'force': 0, b'bufnr': 1, b'lnum': 15, b'startcol': 3, b'changedtick': 12, b'curpos': [0, 15, 6, 0, 13], b'scope_match': b'go', b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]]
2017-10-15 12:11:06,479 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674638> is now dying...
2017-10-15 12:11:06,479 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, {b'typed': b'\t"syn', b'early_cache': False, b'match_end': 2, b'scope': b'go', b'filetype': b'go', b'col': 6, b'base': b'syn', b'force': 0, b'bufnr': 1, b'lnum': 15, b'startcol': 3, b'changedtick': 12, b'curpos': [0, 15, 6, 0, 13], b'scope_match': b'go', b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:11:06,479 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,480 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:06,480 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:06,480 [DEBUG @ cm.py:on_notification:248] 30760 - channel method: cm_refresh, args: [{'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, {'typed': '\t"syn', 'early_cache': False, 'startcol': 3, 'filetype': 'go', 'col': 6, 'base': 'syn', 'force': 0, 'scope_match': 'go', 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope': 'go', 'curpos': [0, 15, 6, 0, 13], 'changedtick': 12, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}]
2017-10-15 12:11:06,480 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 7, 'nvim_call_function', ('cm#context_changed', [{'typed': '\t"syn', 'early_cache': False, 'match_end': 2, 'filetype': 'go', 'col': 6, 'base': 'syn', 'force': 0, 'bufnr': 1, 'lnum': 15, 'startcol': 3, 'changedtick': 12, 'scope_match': 'go', 'curpos': [0, 15, 6, 0, 13], 'scope': 'go', 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}])]
2017-10-15 12:11:06,480 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x07\xb2nvim_call_function\x92\xb2cm#context_changed\x91\x8f\xa5typed\xa5\t"syn\xabearly_cache\xc2\xa9match_end\x02\xa8filetype\xa2go\xa3col\x06\xa4base\xa3syn\xa5force\x00\xa5bufnr\x01\xa4lnum\x0f\xa8startcol\x03\xabchangedtick\x0c\xabscope_match\xa2go\xa6curpos\x95\x00\x0f\x06\x00\r\xa5scope\xa2go\xa8filepath\xda\x002/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go''
2017-10-15 12:11:06,480 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x103674638> to wait for response
2017-10-15 12:11:06,480 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,481 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:06,481 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,481 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 7, None, 0]
2017-10-15 12:11:06,481 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, 0
2017-10-15 12:11:06,481 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x103674638>, switching back
2017-10-15 12:11:06,481 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 8, 'nvim_list_bufs', ()]
2017-10-15 12:11:06,481 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x08\xaenvim_list_bufs\x90''
2017-10-15 12:11:06,481 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x103674638> to wait for response
2017-10-15 12:11:06,481 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,481 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:06,481 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,481 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 8, None, [ExtType(code=0, data=b'\x01')]]
2017-10-15 12:11:06,481 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, [ExtType(code=0, data=b'\x01')]
2017-10-15 12:11:06,481 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x103674638>, switching back
2017-10-15 12:11:06,481 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 9, 'nvim_buf_get_lines', (ExtType(code=0, data=b'\x01'), 0, -1, False)]
2017-10-15 12:11:06,482 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\t\xb2nvim_buf_get_lines\x94\xd4\x00\x01\x00\xff\xc2''
2017-10-15 12:11:06,482 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x103674638> to wait for response
2017-10-15 12:11:06,482 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,482 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:06,482 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,482 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:06,482 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,482 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:06,482 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,482 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 9, None, [b'// Modified for Tendermint', b'// Originally Copyright (c) 2013-2014 Conformal Systems LLC.', b'// https://github.com/conformal/btcd/blob/master/LICENSE', b'', b'package p2p', b'', b'import (', b'\t"encoding/binary"', b'\t"encoding/json"', b'\t"math"', b'\t"math/rand"', b'\t"net"', b'\t"os"', b'\t"sync"', b'\t"syn', b'\t"time"', b'', b'\tlog "github.com/sirupsen/logrus"', b'\tcrypto "github.com/tendermint/go-crypto"', b'\tcmn "github.com/tendermint/tmlibs/common"', b')', b'', b'const (', b'\t// addresses under which the address manager will claim to need more addresses.', b'\tneedAddressThreshold = 1000', b'', b'\t// interval used to dump the address cache to disk for future use.', b'\tdumpAddressInterval = time.Minute * 2', b'', b'\t// max addresses in each old address bucket.', b'\toldBucketSize = 64', b'', b'\t// buckets we split old addresses over.', b'\toldBucketCount = 64', b'', b'\t// max addresses in each new address bucket.', b'\tnewBucketSize = 64', b'', b'\t// buckets that we spread new addresses over.', b'\tnewBucketCount = 256', b'', b'\t// old buckets over which an address group will be spread.', b'\toldBucketsPerGroup = 4', b'', b'\t// new buckets over which an source address group will be spread.', b'\tnewBucketsPerGroup = 32', b'', b'\t// buckets a frequently seen new address may end up in.', b'\tmaxNewBucketsPerAddress = 4', b'', b'\t// days before which we assume an address has vanished', b'\t// if we have not seen it announced in that long.', b'\tnumMissingDays = 30', b'', b'\t// tries without a single success before we assume an address is bad.', b'\tnumRetries = 3', b'', b'\t// max failures we will accept without a success before considering an address bad.', b'\tmaxFailures = 10', b'', b'\t// days since the last success before we will consider evicting an address.', b'\tminBadDays = 7', b'', b'\t// % of total addresses known returned by GetSelection.', b'\tgetSelectionPercent = 23', b'', b'\t// min addresses that must be returned by GetSelection. Useful for bootstrapping.', b'\tminGetSelection = 32', b'', b'\t// max addresses returned by GetSelection', b'\t// NOTE: this must match "maxPexMessageSize"', b'\tmaxGetSelection = 250', b'', b'\t// current version of the on-disk format.', b'\tserializationVersion = 1', b')', b'', b'const (', b'\tbucketTypeNew = 0x01', b'\tbucketTypeOld = 0x02', b')', b'', b'// AddrBook - concurrency safe peer address manager.', b'type AddrBook struct {', b'\tcmn.BaseService', b'', b'\tmtx sync.Mutex', b'\tfilePath string', b'\troutabilityStrict bool', b'\trand *rand.Rand', b'\tkey string', b'\tourAddrs map[string]*NetAddress', b'\taddrLookup map[string]*knownAddress // new & old', b'\taddrNew []map[string]*knownAddress', b'\taddrOld []map[string]*knownAddress', b'\twg sync.WaitGroup', b'\tnOld int', b'\tnNew int', b'}', b'', b'// NewAddrBook creates a new address book.', b'// Use Start to begin processing asynchronous address updates.', b'func NewAddrBook(filePath string, routabilityStrict bool) *AddrBook {', b'\tam := &AddrBook{', b'\t\trand: rand.New(rand.NewSource(time.Now().UnixNano())),', b'\t\tourAddrs: make(map[string]*NetAddress),', b'\t\taddrLookup: make(map[string]*knownAddress),', b'\t\tfilePath: filePath,', b'\t\troutabilityStrict: routabilityStrict,', b'\t}', b'\tam.init()', b'\tam.BaseService = *cmn.NewBaseService(nil, "AddrBook", am)', b'\treturn am', b'}', b'', b"// When modifying this, don't forget to update loadFromFile()", b'func (a *AddrBook) init() {', b'\ta.key = crypto.CRandHex(24) // 24/2 * 8 = 96 bits', b'\t// New addr buckets', b'\ta.addrNew = make([]map[string]*knownAddress, newBucketCount)', b'\tfor i := range a.addrNew {', b'\t\ta.addrNew[i] = make(map[string]*knownAddress)', b'\t}', b'\t// Old addr buckets', b'\ta.addrOld = make([]map[string]*knownAddress, oldBucketCount)', b'\tfor i := range a.addrOld {', b'\t\ta.addrOld[i] = make(map[string]*knownAddress)', b'\t}', b'}', b'', b'// OnStart implements Service.', b'func (a *AddrBook) OnStart() error {', b'\ta.BaseService.OnStart()', b'\ta.loadFromFile(a.filePath)', b'\ta.wg.Add(1)', b'\tgo a.saveRoutine()', b'\treturn nil', b'}', b'', b'// OnStop implements Service.', b'func (a *AddrBook) OnStop() {', b'\ta.BaseService.OnStop()', b'}', b'', b'func (a *AddrBook) Wait() {', b'\ta.wg.Wait()', b'}', b'', b'func (a *AddrBook) AddOurAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithField("addr", addr).Info("Add our address to book")', b'', b'\ta.ourAddrs[addr.String()] = addr', b'}', b'', b'func (a *AddrBook) OurAddresses() []*NetAddress {', b'\taddrs := []*NetAddress{}', b'\tfor _, addr := range a.ourAddrs {', b'\t\taddrs = append(addrs, addr)', b'\t}', b'\treturn addrs', b'}', b'', b'// NOTE: addr must not be nil', b'func (a *AddrBook) AddAddress(addr *NetAddress, src *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithFields(log.Fields{', b'\t\t"addr": addr,', b'\t\t"src": src,', b'\t}).Info("Add address to book")', b'\ta.addAddress(addr, src)', b'}', b'', b'func (a *AddrBook) NeedMoreAddrs() bool {', b'\treturn a.Size() < needAddressThreshold', b'}', b'', b'func (a *AddrBook) Size() int {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\treturn a.size()', b'}', b'', b'func (a *AddrBook) size() int {', b'\treturn a.nNew + a.nOld', b'}', b'', b'// Pick an address to connect to with new/old bias.', b'func (a *AddrBook) PickAddress(newBias int) *NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'\tif newBias > 100 {', b'\t\tnewBias = 100', b'\t}', b'\tif newBias < 0 {', b'\t\tnewBias = 0', b'\t}', b'', b'\t// Bias between new and old addresses.', b'\toldCorrelation := math.Sqrt(float64(a.nOld)) * (100.0 - float64(newBias))', b'\tnewCorrelation := math.Sqrt(float64(a.nNew)) * float64(newBias)', b'', b'\tif (newCorrelation+oldCorrelation)*a.rand.Float64() < oldCorrelation {', b'\t\t// pick random Old bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrOld[a.rand.Intn(len(a.addrOld))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t} else {', b'\t\t// pick random New bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrNew[a.rand.Intn(len(a.addrNew))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t}', b'\treturn nil', b'}', b'', b'func (a *AddrBook) MarkGood(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markGood()', b'\tif ka.isNew() {', b'\t\ta.moveToOld(ka)', b'\t}', b'}', b'', b'func (a *AddrBook) MarkAttempt(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markAttempt()', b'}', b'', b'// MarkBad currently just ejects the address. In the future, consider', b'// blacklisting.', b'func (a *AddrBook) MarkBad(addr *NetAddress) {', b'\ta.RemoveAddress(addr)', b'}', b'', b'// RemoveAddress removes the address from the book.', b'func (a *AddrBook) RemoveAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tlog.WithField("addr", addr).Info("Remove address from book")', b'\ta.removeFromAllBuckets(ka)', b'}', b'', b'/* Peer exchange */', b'', b'// GetSelection randomly selects some addresses (old & new). Suitable for peer-exchange protocols.', b'func (a *AddrBook) GetSelection() []*NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'', b'\tallAddr := make([]*NetAddress, a.size())', b'\ti := 0', b'\tfor _, v := range a.addrLookup {', b'\t\tallAddr[i] = v.Addr', b'\t\ti++', b'\t}', b'', b'\tnumAddresses := cmn.MaxInt(', b'\t\tcmn.MinInt(minGetSelection, len(allAddr)),', b'\t\tlen(allAddr)*getSelectionPercent/100)', b'\tnumAddresses = cmn.MinInt(maxGetSelection, numAddresses)', b'', b'\t// Fisher-Yates shuffle the array. We only need to do the first', b"\t// `numAddresses' since we are throwing the rest.", b'\tfor i := 0; i < numAddresses; i++ {', b'\t\t// pick a number between current index and the end', b'\t\tj := rand.Intn(len(allAddr)-i) + i', b'\t\tallAddr[i], allAddr[j] = allAddr[j], allAddr[i]', b'\t}', b'', b'\t// slice off the limit we are willing to share.', b'\treturn allAddr[:numAddresses]', b'}', b'', b'/* Loading & Saving */', b'', b'type addrBookJSON struct {', b'\tKey string', b'\tAddrs []*knownAddress', b'}', b'', b'func (a *AddrBook) saveToFile(filePath string) {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\t// Compile Addrs', b'\taddrs := []*knownAddress{}', b'\tfor _, ka := range a.addrLookup {', b'\t\taddrs = append(addrs, ka)', b'\t}', b'', b'\taJSON := &addrBookJSON{', b'\t\tKey: a.key,', b'\t\tAddrs: addrs,', b'\t}', b'', b'\tjsonBytes, err := json.MarshalIndent(aJSON, "", "\\t")', b'\tif err != nil {', b'\t\tlog.WithField("err", err).Error("Failed to save AddrBook to file")', b'\t\treturn', b'\t}', b'\terr = cmn.WriteFileAtomic(filePath, jsonBytes, 0644)', b'\tif err != nil {', b'\t\tlog.WithFields(log.Fields{', b'\t\t\t"file": filePath,', b'\t\t\t"err": err,', b'\t\t}).Error("Failed to save AddrBook to file")', b'\t}', b'}', b'', b'// Returns false if file does not exist.', b'// cmn.Panics if file is corrupt.', b'func (a *AddrBook) loadFromFile(filePath string) bool {', b"\t// If doesn't exist, do nothing.", b'\t_, err := os.Stat(filePath)', b'\tif os.IsNotExist(err) {', b'\t\treturn false', b'\t}', b'', b'\t// Load addrBookJSON{}', b'\tr, err := os.Open(filePath)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error opening file %s: %v", filePath, err))', b'\t}', b'\tdefer r.Close()', b'\taJSON := &addrBookJSON{}', b'\tdec := json.NewDecoder(r)', b'\terr = dec.Decode(aJSON)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error reading file %s: %v", filePath, err))', b'\t}', b'', b'\t// Restore all the fields...', b'\t// Restore the key', b'\ta.key = aJSON.Key', b'\t// Restore .addrNew & .addrOld', b'\tfor _, ka := range aJSON.Addrs {', b'\t\tfor _, bucketIndex := range ka.Buckets {', b'\t\t\tbucket := a.getBucket(ka.BucketType, bucketIndex)', b'\t\t\tbucket[ka.Addr.String()] = ka', b'\t\t}', b'\t\ta.addrLookup[ka.Addr.String()] = ka', b'\t\tif ka.BucketType == bucketTypeNew {', b'\t\t\ta.nNew++', b'\t\t} else {', b'\t\t\ta.nOld++', b'\t\t}', b'\t}', b'\treturn true', b'}', b'', b'// Save saves the book.', b'func (a *AddrBook) Save() {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'\ta.saveToFile(a.filePath)', b'}', b'', b'/* Private methods */', b'', b'func (a *AddrBook) saveRoutine() {', b'\tdumpAddressTicker := time.NewTicker(dumpAddressInterval)', b'out:', b'\tfor {', b'\t\tselect {', b'\t\tcase <-dumpAddressTicker.C:', b'\t\t\ta.saveToFile(a.filePath)', b'\t\tcase <-a.Quit:', b'\t\t\tbreak out', b'\t\t}', b'\t}', b'\tdumpAddressTicker.Stop()', b'\ta.saveToFile(a.filePath)', b'\ta.wg.Done()', b'\tlog.Info("Address handler done")', b'}', b'', b'func (a *AddrBook) getBucket(bucketType byte, bucketIdx int) map[string]*knownAddress {', b'\tswitch bucketType {', b'\tcase bucketTypeNew:', b'\t\treturn a.addrNew[bucketIdx]', b'\tcase bucketTypeOld:', b'\t\treturn a.addrOld[bucketIdx]', b'\tdefault:', b'\t\tcmn.PanicSanity("Should not happen")', b'\t\treturn nil', b'\t}', b'}', b'', b"// Adds ka to new bucket. Returns false if it couldn't do it cuz buckets full.", b'// NOTE: currently it always returns true.', b'func (a *AddrBook) addToNewBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot add address already in old bucket to a new bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > newBucketSize {', b'\t\tlog.Info("new bucket is full, expiring old ")', b'\t\ta.expireNew(bucketIdx)', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nNew++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b"// Adds ka to old bucket. Returns false if it couldn't do it cuz buckets full.", b'func (a *AddrBook) addToOldBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isNew() {', b'\t\tlog.Error(cmn.Fmt("Cannot add new address to old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'\tif len(ka.Buckets) != 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot add already old address to another old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > oldBucketSize {', b'\t\treturn false', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nOld++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b'func (a *AddrBook) removeFromBucket(ka *knownAddress, bucketType byte, bucketIdx int) {', b'\tif ka.BucketType != bucketType {', b'\t\tlog.Error(cmn.Fmt("Bucket type mismatch: %v", ka))', b'\t\treturn', b'\t}', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tdelete(bucket, ka.Addr.String())', b'\tif ka.removeBucketRef(bucketIdx) == 0 {', b'\t\tif bucketType == bucketTypeNew {', b'\t\t\ta.nNew--', b'\t\t} else {', b'\t\t\ta.nOld--', b'\t\t}', b'\t\tdelete(a.addrLookup, ka.Addr.String())', b'\t}', b'}', b'', b'func (a *AddrBook) removeFromAllBuckets(ka *knownAddress) {', b'\tfor _, bucketIdx := range ka.Buckets {', b'\t\tbucket := a.getBucket(ka.BucketType, bucketIdx)', b'\t\tdelete(bucket, ka.Addr.String())', b'\t}', b'\tka.Buckets = nil', b'\tif ka.BucketType == bucketTypeNew {', b'\t\ta.nNew--', b'\t} else {', b'\t\ta.nOld--', b'\t}', b'\tdelete(a.addrLookup, ka.Addr.String())', b'}', b'', b'func (a *AddrBook) pickOldest(bucketType byte, bucketIdx int) *knownAddress {', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tvar oldest *knownAddress', b'\tfor _, ka := range bucket {', b'\t\tif oldest == nil || ka.LastAttempt.Before(oldest.LastAttempt) {', b'\t\t\toldest = ka', b'\t\t}', b'\t}', b'\treturn oldest', b'}', b'', b'func (a *AddrBook) addAddress(addr, src *NetAddress) {', b'\tif a.routabilityStrict && !addr.Routable() {', b'\t\tlog.Error(cmn.Fmt("Cannot add non-routable address %v", addr))', b'\t\treturn', b'\t}', b'\tif _, ok := a.ourAddrs[addr.String()]; ok {', b'\t\t// Ignore our own listener address.', b'\t\treturn', b'\t}', b'', b'\tka := a.addrLookup[addr.String()]', b'', b'\tif ka != nil {', b'\t\t// Already old.', b'\t\tif ka.isOld() {', b'\t\t\treturn', b'\t\t}', b'\t\t// Already in max new buckets.', b'\t\tif len(ka.Buckets) == maxNewBucketsPerAddress {', b'\t\t\treturn', b'\t\t}', b'\t\t// The more entries we have, the less likely we are to add more.', b'\t\tfactor := int32(2 * len(ka.Buckets))', b'\t\tif a.rand.Int31n(factor) != 0 {', b'\t\t\treturn', b'\t\t}', b'\t} else {', b'\t\tka = newKnownAddress(addr, src)', b'\t}', b'', b'\tbucket := a.calcNewBucket(addr, src)', b'\ta.addToNewBucket(ka, bucket)', b'', b'\tlog.Info("Added new address", "address", addr, "total", a.size())', b'}', b'', b'// Make space in the new buckets by expiring the really bad entries.', b'// If no bad entries are available we remove the oldest.', b'func (a *AddrBook) expireNew(bucketIdx int) {', b'\tfor addrStr, ka := range a.addrNew[bucketIdx] {', b'\t\t// If an entry is bad, throw it away', b'\t\tif ka.isBad() {', b'\t\t\tlog.Info(cmn.Fmt("expiring bad address %v", addrStr))', b'\t\t\ta.removeFromBucket(ka, bucketTypeNew, bucketIdx)', b'\t\t\treturn', b'\t\t}', b'\t}', b'', b"\t// If we haven't thrown out a bad entry, throw out the oldest entry", b'\toldest := a.pickOldest(bucketTypeNew, bucketIdx)', b'\ta.removeFromBucket(oldest, bucketTypeNew, bucketIdx)', b'}', b'', b'// Promotes an address from new to old.', b'// TODO: Move to old probabilistically.', b'// The better a node is, the less likely it should be evicted from an old bucket.', b'func (a *AddrBook) moveToOld(ka *knownAddress) {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that is already old %v", ka))', b'\t\treturn', b'\t}', b'\tif len(ka.Buckets) == 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that isn\'t in any new buckets %v", ka))', b'\t\treturn', b'\t}', b'', b'\t// Remember one of the buckets in which ka is in.', b'\tfreedBucket := ka.Buckets[0]', b'\t// Remove from all (new) buckets.', b'\ta.removeFromAllBuckets(ka)', b"\t// It's officially old now.", b'\tka.BucketType = bucketTypeOld', b'', b'\t// Try to add it to its oldBucket destination.', b'\toldBucketIdx := a.calcOldBucket(ka.Addr)', b'\tadded := a.addToOldBucket(ka, oldBucketIdx)', b'\tif !added {', b'\t\t// No room, must evict something', b'\t\toldest := a.pickOldest(bucketTypeOld, oldBucketIdx)', b'\t\ta.removeFromBucket(oldest, bucketTypeOld, oldBucketIdx)', b'\t\t// Find new bucket to put oldest in', b'\t\tnewBucketIdx := a.calcNewBucket(oldest.Addr, oldest.Src)', b'\t\tadded := a.addToNewBucket(oldest, newBucketIdx)', b'\t\t// No space in newBucket either, just put it in freedBucket from above.', b'\t\tif !added {', b'\t\t\tadded := a.addToNewBucket(oldest, freedBucket)', b'\t\t\tif !added {', b'\t\t\t\tlog.Error(cmn.Fmt("Could not migrate oldest %v to freedBucket %v", oldest, freedBucket))', b'\t\t\t}', b'\t\t}', b'\t\t// Finally, add to bucket again.', b'\t\tadded = a.addToOldBucket(ka, oldBucketIdx)', b'\t\tif !added {', b'\t\t\tlog.Error(cmn.Fmt("Could not re-add ka %v to oldBucketIdx %v", ka, oldBucketIdx))', b'\t\t}', b'\t}', b'}', b'', b'// doublesha256( key + sourcegroup +', b'// int64(doublesha256(key + group + sourcegroup))%bucket_per_group ) % num_new_buckets', b'func (a *AddrBook) calcNewBucket(addr, src *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(a.groupKey(addr))...)', b'\tdata1 = append(data1, []byte(a.groupKey(src))...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= newBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(src)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % newBucketCount)', b'}', b'', b'// doublesha256( key + group +', b'// int64(doublesha256(key + addr))%buckets_per_group ) % num_old_buckets', b'func (a *AddrBook) calcOldBucket(addr *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(addr.String())...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= oldBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(addr)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % oldBucketCount)', b'}', b'', b'// Return a string representing the network group of this address.', b'// This is the /16 for IPv6, the /32 (/36 for he.net) for IPv6, the string', b'// "local" for a local address and the string "unroutable for an unroutable', b'// address.', b'func (a *AddrBook) groupKey(na *NetAddress) string {', b'\tif a.routabilityStrict && na.Local() {', b'\t\treturn "local"', b'\t}', b'\tif a.routabilityStrict && !na.Routable() {', b'\t\treturn "unroutable"', b'\t}', b'', b'\tif ipv4 := na.IP.To4(); ipv4 != nil {', b'\t\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'\tif na.RFC6145() || na.RFC6052() {', b'\t\t// last four bytes are the ip address', b'\t\tip := net.IP(na.IP[12:16])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\tif na.RFC3964() {', b'\t\tip := net.IP(na.IP[2:7])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'', b'\t}', b'\tif na.RFC4380() {', b'\t\t// teredo tunnels have the last 4 bytes as the v4 address XOR', b'\t\t// 0xff.', b'\t\tip := net.IP(make([]byte, 4))', b'\t\tfor i, byte := range na.IP[12:16] {', b'\t\t\tip[i] = byte ^ 0xff', b'\t\t}', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\t// OK, so now we know ourselves to be a IPv6 address.', b"\t// bitcoind uses /32 for everything, except for Hurricane Electric's", b'\t// (he.net) IP range, which it uses /36 for.', b'\tbits := 32', b'\theNet := &net.IPNet{IP: net.ParseIP("2001:470::"),', b'\t\tMask: net.CIDRMask(32, 128)}', b'\tif heNet.Contains(na.IP) {', b'\t\tbits = 36', b'\t}', b'', b'\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(bits, 128)}).String()', b'}', b'', b'//-----------------------------------------------------------------------------', b'', b'/*', b' knownAddress', b'', b' tracks information about a known network address that is used', b' to determine how viable an address is.', b'*/', b'type knownAddress struct {', b'\tAddr *NetAddress', b'\tSrc *NetAddress', b'\tAttempts int32', b'\tLastAttempt time.Time', b'\tLastSuccess time.Time', b'\tBucketType byte', b'\tBuckets []int', b'}', b'', b'func newKnownAddress(addr *NetAddress, src *NetAddress) *knownAddress {', b'\treturn &knownAddress{', b'\t\tAddr: addr,', b'\t\tSrc: src,', b'\t\tAttempts: 0,', b'\t\tLastAttempt: time.Now(),', b'\t\tBucketType: bucketTypeNew,', b'\t\tBuckets: nil,', b'\t}', b'}', b'', b'func (ka *knownAddress) isOld() bool {', b'\treturn ka.BucketType == bucketTypeOld', b'}', b'', b'func (ka *knownAddress) isNew() bool {', b'\treturn ka.BucketType == bucketTypeNew', b'}', b'', b'func (ka *knownAddress) markAttempt() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts += 1', b'}', b'', b'func (ka *knownAddress) markGood() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts = 0', b'\tka.LastSuccess = now', b'}', b'', b'func (ka *knownAddress) addBucketRef(bucketIdx int) int {', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket == bucketIdx {', b'\t\t\t// TODO refactor to return error?', b'\t\t\t// log.Warn(Fmt("Bucket already exists in ka.Buckets: %v", ka))', b'\t\t\treturn -1', b'\t\t}', b'\t}', b'\tka.Buckets = append(ka.Buckets, bucketIdx)', b'\treturn len(ka.Buckets)', b'}', b'', b'func (ka *knownAddress) removeBucketRef(bucketIdx int) int {', b'\tbuckets := []int{}', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket != bucketIdx {', b'\t\t\tbuckets = append(buckets, bucket)', b'\t\t}', b'\t}', b'\tif len(buckets) != len(ka.Buckets)-1 {', b'\t\t// TODO refactor to return error?', b'\t\t// log.Warn(Fmt("bucketIdx not found in ka.Buckets: %v", ka))', b'\t\treturn -1', b'\t}', b'\tka.Buckets = buckets', b'\treturn len(ka.Buckets)', b'}', b'', b'/*', b' An address is bad if the address in question has not been tried in the last', b' minute and meets one of the following criteria:', b'', b' 1) It claims to be from the future', b" 2) It hasn't been seen in over a month", b' 3) It has failed at least three times and never succeeded', b' 4) It has failed ten times in the last week', b'', b' All addresses that meet these criteria are assumed to be worthless and not', b' worth keeping hold of.', b'*/', b'func (ka *knownAddress) isBad() bool {', b'\t// Has been attempted in the last minute --> good', b'\tif ka.LastAttempt.Before(time.Now().Add(-1 * time.Minute)) {', b'\t\treturn false', b'\t}', b'', b'\t// Over a month old?', b'\tif ka.LastAttempt.After(time.Now().Add(-1 * numMissingDays * time.Hour * 24)) {', b'\t\treturn true', b'\t}', b'', b'\t// Never succeeded?', b'\tif ka.LastSuccess.IsZero() && ka.Attempts >= numRetries {', b'\t\treturn true', b'\t}', b'', b"\t// Hasn't succeeded in too long?", b'\tif ka.LastSuccess.Before(time.Now().Add(-1*minBadDays*time.Hour*24)) &&', b'\t\tka.Attempts >= maxFailures {', b'\t\treturn true', b'\t}', b'', b'\treturn false', b'}']]
2017-10-15 12:11:06,483 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, [b'// Modified for Tendermint', b'// Originally Copyright (c) 2013-2014 Conformal Systems LLC.', b'// https://github.com/conformal/btcd/blob/master/LICENSE', b'', b'package p2p', b'', b'import (', b'\t"encoding/binary"', b'\t"encoding/json"', b'\t"math"', b'\t"math/rand"', b'\t"net"', b'\t"os"', b'\t"sync"', b'\t"syn', b'\t"time"', b'', b'\tlog "github.com/sirupsen/logrus"', b'\tcrypto "github.com/tendermint/go-crypto"', b'\tcmn "github.com/tendermint/tmlibs/common"', b')', b'', b'const (', b'\t// addresses under which the address manager will claim to need more addresses.', b'\tneedAddressThreshold = 1000', b'', b'\t// interval used to dump the address cache to disk for future use.', b'\tdumpAddressInterval = time.Minute * 2', b'', b'\t// max addresses in each old address bucket.', b'\toldBucketSize = 64', b'', b'\t// buckets we split old addresses over.', b'\toldBucketCount = 64', b'', b'\t// max addresses in each new address bucket.', b'\tnewBucketSize = 64', b'', b'\t// buckets that we spread new addresses over.', b'\tnewBucketCount = 256', b'', b'\t// old buckets over which an address group will be spread.', b'\toldBucketsPerGroup = 4', b'', b'\t// new buckets over which an source address group will be spread.', b'\tnewBucketsPerGroup = 32', b'', b'\t// buckets a frequently seen new address may end up in.', b'\tmaxNewBucketsPerAddress = 4', b'', b'\t// days before which we assume an address has vanished', b'\t// if we have not seen it announced in that long.', b'\tnumMissingDays = 30', b'', b'\t// tries without a single success before we assume an address is bad.', b'\tnumRetries = 3', b'', b'\t// max failures we will accept without a success before considering an address bad.', b'\tmaxFailures = 10', b'', b'\t// days since the last success before we will consider evicting an address.', b'\tminBadDays = 7', b'', b'\t// % of total addresses known returned by GetSelection.', b'\tgetSelectionPercent = 23', b'', b'\t// min addresses that must be returned by GetSelection. Useful for bootstrapping.', b'\tminGetSelection = 32', b'', b'\t// max addresses returned by GetSelection', b'\t// NOTE: this must match "maxPexMessageSize"', b'\tmaxGetSelection = 250', b'', b'\t// current version of the on-disk format.', b'\tserializationVersion = 1', b')', b'', b'const (', b'\tbucketTypeNew = 0x01', b'\tbucketTypeOld = 0x02', b')', b'', b'// AddrBook - concurrency safe peer address manager.', b'type AddrBook struct {', b'\tcmn.BaseService', b'', b'\tmtx sync.Mutex', b'\tfilePath string', b'\troutabilityStrict bool', b'\trand *rand.Rand', b'\tkey string', b'\tourAddrs map[string]*NetAddress', b'\taddrLookup map[string]*knownAddress // new & old', b'\taddrNew []map[string]*knownAddress', b'\taddrOld []map[string]*knownAddress', b'\twg sync.WaitGroup', b'\tnOld int', b'\tnNew int', b'}', b'', b'// NewAddrBook creates a new address book.', b'// Use Start to begin processing asynchronous address updates.', b'func NewAddrBook(filePath string, routabilityStrict bool) *AddrBook {', b'\tam := &AddrBook{', b'\t\trand: rand.New(rand.NewSource(time.Now().UnixNano())),', b'\t\tourAddrs: make(map[string]*NetAddress),', b'\t\taddrLookup: make(map[string]*knownAddress),', b'\t\tfilePath: filePath,', b'\t\troutabilityStrict: routabilityStrict,', b'\t}', b'\tam.init()', b'\tam.BaseService = *cmn.NewBaseService(nil, "AddrBook", am)', b'\treturn am', b'}', b'', b"// When modifying this, don't forget to update loadFromFile()", b'func (a *AddrBook) init() {', b'\ta.key = crypto.CRandHex(24) // 24/2 * 8 = 96 bits', b'\t// New addr buckets', b'\ta.addrNew = make([]map[string]*knownAddress, newBucketCount)', b'\tfor i := range a.addrNew {', b'\t\ta.addrNew[i] = make(map[string]*knownAddress)', b'\t}', b'\t// Old addr buckets', b'\ta.addrOld = make([]map[string]*knownAddress, oldBucketCount)', b'\tfor i := range a.addrOld {', b'\t\ta.addrOld[i] = make(map[string]*knownAddress)', b'\t}', b'}', b'', b'// OnStart implements Service.', b'func (a *AddrBook) OnStart() error {', b'\ta.BaseService.OnStart()', b'\ta.loadFromFile(a.filePath)', b'\ta.wg.Add(1)', b'\tgo a.saveRoutine()', b'\treturn nil', b'}', b'', b'// OnStop implements Service.', b'func (a *AddrBook) OnStop() {', b'\ta.BaseService.OnStop()', b'}', b'', b'func (a *AddrBook) Wait() {', b'\ta.wg.Wait()', b'}', b'', b'func (a *AddrBook) AddOurAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithField("addr", addr).Info("Add our address to book")', b'', b'\ta.ourAddrs[addr.String()] = addr', b'}', b'', b'func (a *AddrBook) OurAddresses() []*NetAddress {', b'\taddrs := []*NetAddress{}', b'\tfor _, addr := range a.ourAddrs {', b'\t\taddrs = append(addrs, addr)', b'\t}', b'\treturn addrs', b'}', b'', b'// NOTE: addr must not be nil', b'func (a *AddrBook) AddAddress(addr *NetAddress, src *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tlog.WithFields(log.Fields{', b'\t\t"addr": addr,', b'\t\t"src": src,', b'\t}).Info("Add address to book")', b'\ta.addAddress(addr, src)', b'}', b'', b'func (a *AddrBook) NeedMoreAddrs() bool {', b'\treturn a.Size() < needAddressThreshold', b'}', b'', b'func (a *AddrBook) Size() int {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\treturn a.size()', b'}', b'', b'func (a *AddrBook) size() int {', b'\treturn a.nNew + a.nOld', b'}', b'', b'// Pick an address to connect to with new/old bias.', b'func (a *AddrBook) PickAddress(newBias int) *NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'\tif newBias > 100 {', b'\t\tnewBias = 100', b'\t}', b'\tif newBias < 0 {', b'\t\tnewBias = 0', b'\t}', b'', b'\t// Bias between new and old addresses.', b'\toldCorrelation := math.Sqrt(float64(a.nOld)) * (100.0 - float64(newBias))', b'\tnewCorrelation := math.Sqrt(float64(a.nNew)) * float64(newBias)', b'', b'\tif (newCorrelation+oldCorrelation)*a.rand.Float64() < oldCorrelation {', b'\t\t// pick random Old bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrOld[a.rand.Intn(len(a.addrOld))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t} else {', b'\t\t// pick random New bucket.', b'\t\tvar bucket map[string]*knownAddress = nil', b'\t\tfor len(bucket) == 0 {', b'\t\t\tbucket = a.addrNew[a.rand.Intn(len(a.addrNew))]', b'\t\t}', b'\t\t// pick a random ka from bucket.', b'\t\trandIndex := a.rand.Intn(len(bucket))', b'\t\tfor _, ka := range bucket {', b'\t\t\tif randIndex == 0 {', b'\t\t\t\treturn ka.Addr', b'\t\t\t}', b'\t\t\trandIndex--', b'\t\t}', b'\t\tcmn.PanicSanity("Should not happen")', b'\t}', b'\treturn nil', b'}', b'', b'func (a *AddrBook) MarkGood(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markGood()', b'\tif ka.isNew() {', b'\t\ta.moveToOld(ka)', b'\t}', b'}', b'', b'func (a *AddrBook) MarkAttempt(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tka.markAttempt()', b'}', b'', b'// MarkBad currently just ejects the address. In the future, consider', b'// blacklisting.', b'func (a *AddrBook) MarkBad(addr *NetAddress) {', b'\ta.RemoveAddress(addr)', b'}', b'', b'// RemoveAddress removes the address from the book.', b'func (a *AddrBook) RemoveAddress(addr *NetAddress) {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\tka := a.addrLookup[addr.String()]', b'\tif ka == nil {', b'\t\treturn', b'\t}', b'\tlog.WithField("addr", addr).Info("Remove address from book")', b'\ta.removeFromAllBuckets(ka)', b'}', b'', b'/* Peer exchange */', b'', b'// GetSelection randomly selects some addresses (old & new). Suitable for peer-exchange protocols.', b'func (a *AddrBook) GetSelection() []*NetAddress {', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'', b'\tif a.size() == 0 {', b'\t\treturn nil', b'\t}', b'', b'\tallAddr := make([]*NetAddress, a.size())', b'\ti := 0', b'\tfor _, v := range a.addrLookup {', b'\t\tallAddr[i] = v.Addr', b'\t\ti++', b'\t}', b'', b'\tnumAddresses := cmn.MaxInt(', b'\t\tcmn.MinInt(minGetSelection, len(allAddr)),', b'\t\tlen(allAddr)*getSelectionPercent/100)', b'\tnumAddresses = cmn.MinInt(maxGetSelection, numAddresses)', b'', b'\t// Fisher-Yates shuffle the array. We only need to do the first', b"\t// `numAddresses' since we are throwing the rest.", b'\tfor i := 0; i < numAddresses; i++ {', b'\t\t// pick a number between current index and the end', b'\t\tj := rand.Intn(len(allAddr)-i) + i', b'\t\tallAddr[i], allAddr[j] = allAddr[j], allAddr[i]', b'\t}', b'', b'\t// slice off the limit we are willing to share.', b'\treturn allAddr[:numAddresses]', b'}', b'', b'/* Loading & Saving */', b'', b'type addrBookJSON struct {', b'\tKey string', b'\tAddrs []*knownAddress', b'}', b'', b'func (a *AddrBook) saveToFile(filePath string) {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'', b'\ta.mtx.Lock()', b'\tdefer a.mtx.Unlock()', b'\t// Compile Addrs', b'\taddrs := []*knownAddress{}', b'\tfor _, ka := range a.addrLookup {', b'\t\taddrs = append(addrs, ka)', b'\t}', b'', b'\taJSON := &addrBookJSON{', b'\t\tKey: a.key,', b'\t\tAddrs: addrs,', b'\t}', b'', b'\tjsonBytes, err := json.MarshalIndent(aJSON, "", "\\t")', b'\tif err != nil {', b'\t\tlog.WithField("err", err).Error("Failed to save AddrBook to file")', b'\t\treturn', b'\t}', b'\terr = cmn.WriteFileAtomic(filePath, jsonBytes, 0644)', b'\tif err != nil {', b'\t\tlog.WithFields(log.Fields{', b'\t\t\t"file": filePath,', b'\t\t\t"err": err,', b'\t\t}).Error("Failed to save AddrBook to file")', b'\t}', b'}', b'', b'// Returns false if file does not exist.', b'// cmn.Panics if file is corrupt.', b'func (a *AddrBook) loadFromFile(filePath string) bool {', b"\t// If doesn't exist, do nothing.", b'\t_, err := os.Stat(filePath)', b'\tif os.IsNotExist(err) {', b'\t\treturn false', b'\t}', b'', b'\t// Load addrBookJSON{}', b'\tr, err := os.Open(filePath)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error opening file %s: %v", filePath, err))', b'\t}', b'\tdefer r.Close()', b'\taJSON := &addrBookJSON{}', b'\tdec := json.NewDecoder(r)', b'\terr = dec.Decode(aJSON)', b'\tif err != nil {', b'\t\tcmn.PanicCrisis(cmn.Fmt("Error reading file %s: %v", filePath, err))', b'\t}', b'', b'\t// Restore all the fields...', b'\t// Restore the key', b'\ta.key = aJSON.Key', b'\t// Restore .addrNew & .addrOld', b'\tfor _, ka := range aJSON.Addrs {', b'\t\tfor _, bucketIndex := range ka.Buckets {', b'\t\t\tbucket := a.getBucket(ka.BucketType, bucketIndex)', b'\t\t\tbucket[ka.Addr.String()] = ka', b'\t\t}', b'\t\ta.addrLookup[ka.Addr.String()] = ka', b'\t\tif ka.BucketType == bucketTypeNew {', b'\t\t\ta.nNew++', b'\t\t} else {', b'\t\t\ta.nOld++', b'\t\t}', b'\t}', b'\treturn true', b'}', b'', b'// Save saves the book.', b'func (a *AddrBook) Save() {', b'\tlog.WithField("size", a.Size()).Info("Saving AddrBook to file")', b'\ta.saveToFile(a.filePath)', b'}', b'', b'/* Private methods */', b'', b'func (a *AddrBook) saveRoutine() {', b'\tdumpAddressTicker := time.NewTicker(dumpAddressInterval)', b'out:', b'\tfor {', b'\t\tselect {', b'\t\tcase <-dumpAddressTicker.C:', b'\t\t\ta.saveToFile(a.filePath)', b'\t\tcase <-a.Quit:', b'\t\t\tbreak out', b'\t\t}', b'\t}', b'\tdumpAddressTicker.Stop()', b'\ta.saveToFile(a.filePath)', b'\ta.wg.Done()', b'\tlog.Info("Address handler done")', b'}', b'', b'func (a *AddrBook) getBucket(bucketType byte, bucketIdx int) map[string]*knownAddress {', b'\tswitch bucketType {', b'\tcase bucketTypeNew:', b'\t\treturn a.addrNew[bucketIdx]', b'\tcase bucketTypeOld:', b'\t\treturn a.addrOld[bucketIdx]', b'\tdefault:', b'\t\tcmn.PanicSanity("Should not happen")', b'\t\treturn nil', b'\t}', b'}', b'', b"// Adds ka to new bucket. Returns false if it couldn't do it cuz buckets full.", b'// NOTE: currently it always returns true.', b'func (a *AddrBook) addToNewBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot add address already in old bucket to a new bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > newBucketSize {', b'\t\tlog.Info("new bucket is full, expiring old ")', b'\t\ta.expireNew(bucketIdx)', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nNew++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b"// Adds ka to old bucket. Returns false if it couldn't do it cuz buckets full.", b'func (a *AddrBook) addToOldBucket(ka *knownAddress, bucketIdx int) bool {', b'\t// Sanity check', b'\tif ka.isNew() {', b'\t\tlog.Error(cmn.Fmt("Cannot add new address to old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'\tif len(ka.Buckets) != 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot add already old address to another old bucket: %v", ka))', b'\t\treturn false', b'\t}', b'', b'\taddrStr := ka.Addr.String()', b'\tbucket := a.getBucket(bucketTypeNew, bucketIdx)', b'', b'\t// Already exists?', b'\tif _, ok := bucket[addrStr]; ok {', b'\t\treturn true', b'\t}', b'', b'\t// Enforce max addresses.', b'\tif len(bucket) > oldBucketSize {', b'\t\treturn false', b'\t}', b'', b'\t// Add to bucket.', b'\tbucket[addrStr] = ka', b'\tif ka.addBucketRef(bucketIdx) == 1 {', b'\t\ta.nOld++', b'\t}', b'', b'\t// Ensure in addrLookup', b'\ta.addrLookup[addrStr] = ka', b'', b'\treturn true', b'}', b'', b'func (a *AddrBook) removeFromBucket(ka *knownAddress, bucketType byte, bucketIdx int) {', b'\tif ka.BucketType != bucketType {', b'\t\tlog.Error(cmn.Fmt("Bucket type mismatch: %v", ka))', b'\t\treturn', b'\t}', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tdelete(bucket, ka.Addr.String())', b'\tif ka.removeBucketRef(bucketIdx) == 0 {', b'\t\tif bucketType == bucketTypeNew {', b'\t\t\ta.nNew--', b'\t\t} else {', b'\t\t\ta.nOld--', b'\t\t}', b'\t\tdelete(a.addrLookup, ka.Addr.String())', b'\t}', b'}', b'', b'func (a *AddrBook) removeFromAllBuckets(ka *knownAddress) {', b'\tfor _, bucketIdx := range ka.Buckets {', b'\t\tbucket := a.getBucket(ka.BucketType, bucketIdx)', b'\t\tdelete(bucket, ka.Addr.String())', b'\t}', b'\tka.Buckets = nil', b'\tif ka.BucketType == bucketTypeNew {', b'\t\ta.nNew--', b'\t} else {', b'\t\ta.nOld--', b'\t}', b'\tdelete(a.addrLookup, ka.Addr.String())', b'}', b'', b'func (a *AddrBook) pickOldest(bucketType byte, bucketIdx int) *knownAddress {', b'\tbucket := a.getBucket(bucketType, bucketIdx)', b'\tvar oldest *knownAddress', b'\tfor _, ka := range bucket {', b'\t\tif oldest == nil || ka.LastAttempt.Before(oldest.LastAttempt) {', b'\t\t\toldest = ka', b'\t\t}', b'\t}', b'\treturn oldest', b'}', b'', b'func (a *AddrBook) addAddress(addr, src *NetAddress) {', b'\tif a.routabilityStrict && !addr.Routable() {', b'\t\tlog.Error(cmn.Fmt("Cannot add non-routable address %v", addr))', b'\t\treturn', b'\t}', b'\tif _, ok := a.ourAddrs[addr.String()]; ok {', b'\t\t// Ignore our own listener address.', b'\t\treturn', b'\t}', b'', b'\tka := a.addrLookup[addr.String()]', b'', b'\tif ka != nil {', b'\t\t// Already old.', b'\t\tif ka.isOld() {', b'\t\t\treturn', b'\t\t}', b'\t\t// Already in max new buckets.', b'\t\tif len(ka.Buckets) == maxNewBucketsPerAddress {', b'\t\t\treturn', b'\t\t}', b'\t\t// The more entries we have, the less likely we are to add more.', b'\t\tfactor := int32(2 * len(ka.Buckets))', b'\t\tif a.rand.Int31n(factor) != 0 {', b'\t\t\treturn', b'\t\t}', b'\t} else {', b'\t\tka = newKnownAddress(addr, src)', b'\t}', b'', b'\tbucket := a.calcNewBucket(addr, src)', b'\ta.addToNewBucket(ka, bucket)', b'', b'\tlog.Info("Added new address", "address", addr, "total", a.size())', b'}', b'', b'// Make space in the new buckets by expiring the really bad entries.', b'// If no bad entries are available we remove the oldest.', b'func (a *AddrBook) expireNew(bucketIdx int) {', b'\tfor addrStr, ka := range a.addrNew[bucketIdx] {', b'\t\t// If an entry is bad, throw it away', b'\t\tif ka.isBad() {', b'\t\t\tlog.Info(cmn.Fmt("expiring bad address %v", addrStr))', b'\t\t\ta.removeFromBucket(ka, bucketTypeNew, bucketIdx)', b'\t\t\treturn', b'\t\t}', b'\t}', b'', b"\t// If we haven't thrown out a bad entry, throw out the oldest entry", b'\toldest := a.pickOldest(bucketTypeNew, bucketIdx)', b'\ta.removeFromBucket(oldest, bucketTypeNew, bucketIdx)', b'}', b'', b'// Promotes an address from new to old.', b'// TODO: Move to old probabilistically.', b'// The better a node is, the less likely it should be evicted from an old bucket.', b'func (a *AddrBook) moveToOld(ka *knownAddress) {', b'\t// Sanity check', b'\tif ka.isOld() {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that is already old %v", ka))', b'\t\treturn', b'\t}', b'\tif len(ka.Buckets) == 0 {', b'\t\tlog.Error(cmn.Fmt("Cannot promote address that isn\'t in any new buckets %v", ka))', b'\t\treturn', b'\t}', b'', b'\t// Remember one of the buckets in which ka is in.', b'\tfreedBucket := ka.Buckets[0]', b'\t// Remove from all (new) buckets.', b'\ta.removeFromAllBuckets(ka)', b"\t// It's officially old now.", b'\tka.BucketType = bucketTypeOld', b'', b'\t// Try to add it to its oldBucket destination.', b'\toldBucketIdx := a.calcOldBucket(ka.Addr)', b'\tadded := a.addToOldBucket(ka, oldBucketIdx)', b'\tif !added {', b'\t\t// No room, must evict something', b'\t\toldest := a.pickOldest(bucketTypeOld, oldBucketIdx)', b'\t\ta.removeFromBucket(oldest, bucketTypeOld, oldBucketIdx)', b'\t\t// Find new bucket to put oldest in', b'\t\tnewBucketIdx := a.calcNewBucket(oldest.Addr, oldest.Src)', b'\t\tadded := a.addToNewBucket(oldest, newBucketIdx)', b'\t\t// No space in newBucket either, just put it in freedBucket from above.', b'\t\tif !added {', b'\t\t\tadded := a.addToNewBucket(oldest, freedBucket)', b'\t\t\tif !added {', b'\t\t\t\tlog.Error(cmn.Fmt("Could not migrate oldest %v to freedBucket %v", oldest, freedBucket))', b'\t\t\t}', b'\t\t}', b'\t\t// Finally, add to bucket again.', b'\t\tadded = a.addToOldBucket(ka, oldBucketIdx)', b'\t\tif !added {', b'\t\t\tlog.Error(cmn.Fmt("Could not re-add ka %v to oldBucketIdx %v", ka, oldBucketIdx))', b'\t\t}', b'\t}', b'}', b'', b'// doublesha256( key + sourcegroup +', b'// int64(doublesha256(key + group + sourcegroup))%bucket_per_group ) % num_new_buckets', b'func (a *AddrBook) calcNewBucket(addr, src *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(a.groupKey(addr))...)', b'\tdata1 = append(data1, []byte(a.groupKey(src))...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= newBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(src)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % newBucketCount)', b'}', b'', b'// doublesha256( key + group +', b'// int64(doublesha256(key + addr))%buckets_per_group ) % num_old_buckets', b'func (a *AddrBook) calcOldBucket(addr *NetAddress) int {', b'\tdata1 := []byte{}', b'\tdata1 = append(data1, []byte(a.key)...)', b'\tdata1 = append(data1, []byte(addr.String())...)', b'\thash1 := doubleSha256(data1)', b'\thash64 := binary.BigEndian.Uint64(hash1)', b'\thash64 %= oldBucketsPerGroup', b'\tvar hashbuf [8]byte', b'\tbinary.BigEndian.PutUint64(hashbuf[:], hash64)', b'\tdata2 := []byte{}', b'\tdata2 = append(data2, []byte(a.key)...)', b'\tdata2 = append(data2, a.groupKey(addr)...)', b'\tdata2 = append(data2, hashbuf[:]...)', b'', b'\thash2 := doubleSha256(data2)', b'\treturn int(binary.BigEndian.Uint64(hash2) % oldBucketCount)', b'}', b'', b'// Return a string representing the network group of this address.', b'// This is the /16 for IPv6, the /32 (/36 for he.net) for IPv6, the string', b'// "local" for a local address and the string "unroutable for an unroutable', b'// address.', b'func (a *AddrBook) groupKey(na *NetAddress) string {', b'\tif a.routabilityStrict && na.Local() {', b'\t\treturn "local"', b'\t}', b'\tif a.routabilityStrict && !na.Routable() {', b'\t\treturn "unroutable"', b'\t}', b'', b'\tif ipv4 := na.IP.To4(); ipv4 != nil {', b'\t\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'\tif na.RFC6145() || na.RFC6052() {', b'\t\t// last four bytes are the ip address', b'\t\tip := net.IP(na.IP[12:16])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\tif na.RFC3964() {', b'\t\tip := net.IP(na.IP[2:7])', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'', b'\t}', b'\tif na.RFC4380() {', b'\t\t// teredo tunnels have the last 4 bytes as the v4 address XOR', b'\t\t// 0xff.', b'\t\tip := net.IP(make([]byte, 4))', b'\t\tfor i, byte := range na.IP[12:16] {', b'\t\t\tip[i] = byte ^ 0xff', b'\t\t}', b'\t\treturn (&net.IPNet{IP: ip, Mask: net.CIDRMask(16, 32)}).String()', b'\t}', b'', b'\t// OK, so now we know ourselves to be a IPv6 address.', b"\t// bitcoind uses /32 for everything, except for Hurricane Electric's", b'\t// (he.net) IP range, which it uses /36 for.', b'\tbits := 32', b'\theNet := &net.IPNet{IP: net.ParseIP("2001:470::"),', b'\t\tMask: net.CIDRMask(32, 128)}', b'\tif heNet.Contains(na.IP) {', b'\t\tbits = 36', b'\t}', b'', b'\treturn (&net.IPNet{IP: na.IP, Mask: net.CIDRMask(bits, 128)}).String()', b'}', b'', b'//-----------------------------------------------------------------------------', b'', b'/*', b' knownAddress', b'', b' tracks information about a known network address that is used', b' to determine how viable an address is.', b'*/', b'type knownAddress struct {', b'\tAddr *NetAddress', b'\tSrc *NetAddress', b'\tAttempts int32', b'\tLastAttempt time.Time', b'\tLastSuccess time.Time', b'\tBucketType byte', b'\tBuckets []int', b'}', b'', b'func newKnownAddress(addr *NetAddress, src *NetAddress) *knownAddress {', b'\treturn &knownAddress{', b'\t\tAddr: addr,', b'\t\tSrc: src,', b'\t\tAttempts: 0,', b'\t\tLastAttempt: time.Now(),', b'\t\tBucketType: bucketTypeNew,', b'\t\tBuckets: nil,', b'\t}', b'}', b'', b'func (ka *knownAddress) isOld() bool {', b'\treturn ka.BucketType == bucketTypeOld', b'}', b'', b'func (ka *knownAddress) isNew() bool {', b'\treturn ka.BucketType == bucketTypeNew', b'}', b'', b'func (ka *knownAddress) markAttempt() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts += 1', b'}', b'', b'func (ka *knownAddress) markGood() {', b'\tnow := time.Now()', b'\tka.LastAttempt = now', b'\tka.Attempts = 0', b'\tka.LastSuccess = now', b'}', b'', b'func (ka *knownAddress) addBucketRef(bucketIdx int) int {', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket == bucketIdx {', b'\t\t\t// TODO refactor to return error?', b'\t\t\t// log.Warn(Fmt("Bucket already exists in ka.Buckets: %v", ka))', b'\t\t\treturn -1', b'\t\t}', b'\t}', b'\tka.Buckets = append(ka.Buckets, bucketIdx)', b'\treturn len(ka.Buckets)', b'}', b'', b'func (ka *knownAddress) removeBucketRef(bucketIdx int) int {', b'\tbuckets := []int{}', b'\tfor _, bucket := range ka.Buckets {', b'\t\tif bucket != bucketIdx {', b'\t\t\tbuckets = append(buckets, bucket)', b'\t\t}', b'\t}', b'\tif len(buckets) != len(ka.Buckets)-1 {', b'\t\t// TODO refactor to return error?', b'\t\t// log.Warn(Fmt("bucketIdx not found in ka.Buckets: %v", ka))', b'\t\treturn -1', b'\t}', b'\tka.Buckets = buckets', b'\treturn len(ka.Buckets)', b'}', b'', b'/*', b' An address is bad if the address in question has not been tried in the last', b' minute and meets one of the following criteria:', b'', b' 1) It claims to be from the future', b" 2) It hasn't been seen in over a month", b' 3) It has failed at least three times and never succeeded', b' 4) It has failed ten times in the last week', b'', b' All addresses that meet these criteria are assumed to be worthless and not', b' worth keeping hold of.', b'*/', b'func (ka *knownAddress) isBad() bool {', b'\t// Has been attempted in the last minute --> good', b'\tif ka.LastAttempt.Before(time.Now().Add(-1 * time.Minute)) {', b'\t\treturn false', b'\t}', b'', b'\t// Over a month old?', b'\tif ka.LastAttempt.After(time.Now().Add(-1 * numMissingDays * time.Hour * 24)) {', b'\t\treturn true', b'\t}', b'', b'\t// Never succeeded?', b'\tif ka.LastSuccess.IsZero() && ka.Attempts >= numRetries {', b'\t\treturn true', b'\t}', b'', b"\t// Hasn't succeeded in too long?", b'\tif ka.LastSuccess.Before(time.Now().Add(-1*minBadDays*time.Hour*24)) &&', b'\t\tka.Attempts >= maxFailures {', b'\t\treturn true', b'\t}', b'', b'\treturn false', b'}']
2017-10-15 12:11:06,483 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x103674638>, switching back
2017-10-15 12:11:06,509 [INFO @ cm_gocode.py:cm_refresh:74] 30760 - result [3, [{'class': 'import', 'package': '', 'type': '', 'name': 'sync'}, {'class': 'import', 'package': '', 'type': '', 'name': 'sync/atomic'}]]
2017-10-15 12:11:06,509 [INFO @ cm_gocode.py:cm_refresh:137] 30760 - startcol 3, matches [{'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}]
2017-10-15 12:11:06,510 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [2, 'nvim_call_function', ('cm#complete', ['cm-gocode', {'typed': '\t"syn', 'early_cache': False, 'match_end': 2, 'filetype': 'go', 'col': 6, 'base': 'syn', 'force': 0, 'bufnr': 1, 'lnum': 15, 'startcol': 3, 'changedtick': 12, 'scope_match': 'go', 'curpos': [0, 15, 6, 0, 13], 'scope': 'go', 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 3, [{'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}], False])]
2017-10-15 12:11:06,510 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x93\x02\xb2nvim_call_function\x92\xabcm#complete\x95\xa9cm-gocode\x8f\xa5typed\xa5\t"syn\xabearly_cache\xc2\xa9match_end\x02\xa8filetype\xa2go\xa3col\x06\xa4base\xa3syn\xa5force\x00\xa5bufnr\x01\xa4lnum\x0f\xa8startcol\x03\xabchangedtick\x0c\xabscope_match\xa2go\xa6curpos\x95\x00\x0f\x06\x00\r\xa5scope\xa2go\xa8filepath\xda\x002/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go\x03\x92\x84\xa4word\xa4sync\xa5icase\x01\xa4menu\xa0\xa3dup\x01\x84\xa4word\xabsync/atomic\xa5icase\x01\xa4menu\xa0\xa3dup\x01\xc2''
2017-10-15 12:11:06,510 [DEBUG @ cm.py:on_notification:265] 30760 - channel method cm_refresh completed
2017-10-15 12:11:06,510 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674638> finished executing
2017-10-15 12:11:06,510 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674638> is now dying...
2017-10-15 12:11:06,510 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,510 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:06,512 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,512 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_complete', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, b'cm-gocode', {b'typed': b'\t"syn', b'early_cache': False, b'match_end': 2, b'scope': b'go', b'filetype': b'go', b'col': 6, b'base': b'syn', b'force': 0, b'bufnr': 1, b'lnum': 15, b'startcol': 3, b'changedtick': 12, b'curpos': [0, 15, 6, 0, 13], b'scope_match': b'go', b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 3, [{b'word': b'sync', b'icase': 1, b'menu': b'', b'dup': 1}, {b'word': b'sync/atomic', b'icase': 1, b'menu': b'', b'dup': 1}], False, 0, b'']]
2017-10-15 12:11:06,512 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_complete', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, b'cm-gocode', {b'typed': b'\t"syn', b'early_cache': False, b'match_end': 2, b'scope': b'go', b'filetype': b'go', b'col': 6, b'base': b'syn', b'force': 0, b'bufnr': 1, b'lnum': 15, b'startcol': 3, b'changedtick': 12, b'curpos': [0, 15, 6, 0, 13], b'scope_match': b'go', b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 3, [{b'word': b'sync', b'icase': 1, b'menu': b'', b'dup': 1}, {b'word': b'sync/atomic', b'icase': 1, b'menu': b'', b'dup': 1}], False, 0, b'']
2017-10-15 12:11:06,512 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:06,513 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_complete, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, 'cm-gocode', {'typed': '\t"syn', 'early_cache': False, 'startcol': 3, 'filetype': 'go', 'col': 6, 'base': 'syn', 'force': 0, 'scope_match': 'go', 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope': 'go', 'curpos': [0, 15, 6, 0, 13], 'changedtick': 12, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 3, [{'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}], False, 0, '']
2017-10-15 12:11:06,513 [DEBUG @ cm_core.py:cm_complete:213] 30760 - <cm-gocode> preprocessing result startcol: 3 matches: [{'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}]
2017-10-15 12:11:06,514 [DEBUG @ cm_core.py:cm_complete:249] 30760 - delay popup for [cm-gocode]
2017-10-15 12:11:06,514 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_complete completed
2017-10-15 12:11:06,514 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674638> finished executing
2017-10-15 12:11:06,514 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674638> is now dying...
2017-10-15 12:11:06,514 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,514 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:06,535 [INFO @ cm_core.py:_refresh_completions:577] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 3, matches cnt: 2
2017-10-15 12:11:06,535 [DEBUG @ cm_core.py:_refresh_completions:578] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 3, matches: [{'word': 'sync', 'icase': 1, 'dup': 1, 'snippet_word': 'sync', 'menu': '', 'padding': '', 'abbr': 'sync'}, {'word': 'sync/atomic', 'icase': 1, 'dup': 1, 'snippet_word': 'sync/atomic', 'menu': '', 'padding': '', 'abbr': 'sync/atomic'}], source matches: {'cm-gocode': {'startcol': 3, 'matches': [{'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}], 'last_matches': [{'word': 'sync', 'icase': 1, 'dup': 1, 'snippet_word': 'sync', 'menu': '', 'padding': '', 'abbr': 'sync'}, {'word': 'sync/atomic', 'icase': 1, 'dup': 1, 'snippet_word': 'sync/atomic', 'menu': '', 'padding': '', 'abbr': 'sync/atomic'}], 'enable': True, 'refresh': False, 'context': {'typed': '\t"syn', 'early_cache': False, 'startcol': 3, 'filetype': 'go', 'col': 6, 'base': 'syn', 'force': 0, 'scope_match': 'go', 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope': 'go', 'curpos': [0, 15, 6, 0, 13], 'changedtick': 12, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}}}
2017-10-15 12:11:06,535 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 22, 'nvim_call_function', ('cm#_core_complete', [{'typed': '\t"syn', 'bufnr': 1, 'lnum': 15, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go', 'filetype': 'go', 'col': 6, 'changedtick': 12, 'curpos': [0, 15, 6, 0, 13], 'scope': 'go', 'force': 0}, 3, [{'word': 'sync', 'icase': 1, 'dup': 1, 'menu': '', 'abbr': 'sync', 'snippet_word': 'sync', 'padding': ''}, {'word': 'sync/atomic', 'icase': 1, 'dup': 1, 'menu': '', 'abbr': 'sync/atomic', 'snippet_word': 'sync/atomic', 'padding': ''}], 0, []])]
2017-10-15 12:11:06,535 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x16\xb2nvim_call_function\x92\xb1cm#_core_complete\x95\x8a\xa5typed\xa5\t"syn\xa5bufnr\x01\xa4lnum\x0f\xa8filepath\xda\x002/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go\xa8filetype\xa2go\xa3col\x06\xabchangedtick\x0c\xa6curpos\x95\x00\x0f\x06\x00\r\xa5scope\xa2go\xa5force\x00\x03\x92\x87\xa4word\xa4sync\xa5icase\x01\xa3dup\x01\xa4menu\xa0\xa4abbr\xa4sync\xacsnippet_word\xa4sync\xa7padding\xa0\x87\xa4word\xabsync/atomic\xa5icase\x01\xa3dup\x01\xa4menu\xa0\xa4abbr\xabsync/atomic\xacsnippet_word\xabsync/atomic\xa7padding\xa0\x00\x90''
2017-10-15 12:11:06,536 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x103674638> to wait for response
2017-10-15 12:11:06,536 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,536 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 22, None, 0]
2017-10-15 12:11:06,536 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, 0
2017-10-15 12:11:06,536 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x103674638>, switching back
2017-10-15 12:11:06,536 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,536 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:06,650 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,650 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"sy', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 5, b'changedtick': 13, b'curpos': [0, 15, 5, 0, 12], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]]
2017-10-15 12:11:06,651 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"sy', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 5, b'changedtick': 13, b'curpos': [0, 15, 5, 0, 12], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:06,651 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:06,653 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_refresh, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, {'typed': '\t"sy', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 5, 'changedtick': 13, 'curpos': [0, 15, 5, 0, 12], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:06,655 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-css> for context scope <go>
2017-10-15 12:11:06,655 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-bufkeyword>, force[0] early_cache[0]
2017-10-15 12:11:06,655 [DEBUG @ cm_core.py:cm_refresh:334] 30760 - <cm-gocode> early_caching
2017-10-15 12:11:06,655 [DEBUG @ cm_core.py:cm_refresh:352] 30760 - <cm-gocode> has been cached, <2> candidates
2017-10-15 12:11:06,656 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tmux>, force[0] early_cache[0]
2017-10-15 12:11:06,656 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-jedi> for context scope <go>
2017-10-15 12:11:06,656 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-filepath>, force[0] early_cache[0]
2017-10-15 12:11:06,656 [DEBUG @ cm_core.py:cm_refresh:326] 30760 - <cm-keyword-continue> is not auto_popup
2017-10-15 12:11:06,658 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tags>, force[0] early_cache[0]
2017-10-15 12:11:06,658 [INFO @ cm_core.py:cm_refresh:372] 30760 - not notifying any channels, _refresh_completions now
2017-10-15 12:11:06,658 [INFO @ cm_core.py:_refresh_completions:577] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 3, matches cnt: 2
2017-10-15 12:11:06,658 [DEBUG @ cm_core.py:_refresh_completions:578] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 3, matches: [{'word': 'sync', 'icase': 1, 'dup': 1, 'snippet_word': 'sync', 'menu': '', 'padding': '', 'abbr': 'sync'}, {'word': 'sync/atomic', 'icase': 1, 'dup': 1, 'snippet_word': 'sync/atomic', 'menu': '', 'padding': '', 'abbr': 'sync/atomic'}], source matches: {'cm-gocode': {'startcol': 3, 'matches': [{'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}], 'last_matches': [{'word': 'sync', 'icase': 1, 'dup': 1, 'snippet_word': 'sync', 'menu': '', 'padding': '', 'abbr': 'sync'}, {'word': 'sync/atomic', 'icase': 1, 'dup': 1, 'snippet_word': 'sync/atomic', 'menu': '', 'padding': '', 'abbr': 'sync/atomic'}], 'enable': True, 'refresh': False, 'context': {'typed': '\t"syn', 'early_cache': False, 'startcol': 3, 'filetype': 'go', 'col': 6, 'base': 'syn', 'force': 0, 'scope_match': 'go', 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope': 'go', 'curpos': [0, 15, 6, 0, 13], 'changedtick': 12, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}}}
2017-10-15 12:11:06,658 [INFO @ cm_core.py:_complete:628] 30760 - ignore _complete call: self._last_startcol==startcol and self._last_matches==matches
2017-10-15 12:11:06,659 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 23, 'nvim_call_function', ('cm#_core_complete', [{'typed': '\t"sy', 'bufnr': 1, 'lnum': 15, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go', 'filetype': 'go', 'col': 5, 'changedtick': 13, 'curpos': [0, 15, 5, 0, 12], 'scope': 'go', 'force': 0}, 3, [{'word': 'sync', 'icase': 1, 'dup': 1, 'menu': '', 'abbr': 'sync', 'snippet_word': 'sync', 'padding': ''}, {'word': 'sync/atomic', 'icase': 1, 'dup': 1, 'menu': '', 'abbr': 'sync/atomic', 'snippet_word': 'sync/atomic', 'padding': ''}], 1, []])]
2017-10-15 12:11:06,659 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x17\xb2nvim_call_function\x92\xb1cm#_core_complete\x95\x8a\xa5typed\xa4\t"sy\xa5bufnr\x01\xa4lnum\x0f\xa8filepath\xda\x002/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go\xa8filetype\xa2go\xa3col\x05\xabchangedtick\r\xa6curpos\x95\x00\x0f\x05\x00\x0c\xa5scope\xa2go\xa5force\x00\x03\x92\x87\xa4word\xa4sync\xa5icase\x01\xa3dup\x01\xa4menu\xa0\xa4abbr\xa4sync\xacsnippet_word\xa4sync\xa7padding\xa0\x87\xa4word\xabsync/atomic\xa5icase\x01\xa3dup\x01\xa4menu\xa0\xa4abbr\xabsync/atomic\xacsnippet_word\xabsync/atomic\xa7padding\xa0\x01\x90''
2017-10-15 12:11:06,659 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x103674638> to wait for response
2017-10-15 12:11:06,659 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,659 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:06,660 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,660 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 23, None, 0]
2017-10-15 12:11:06,660 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, 0
2017-10-15 12:11:06,660 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x103674638>, switching back
2017-10-15 12:11:06,660 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_refresh completed
2017-10-15 12:11:06,660 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674638> finished executing
2017-10-15 12:11:06,660 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674638> is now dying...
2017-10-15 12:11:06,661 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,661 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:06,804 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,804 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"s', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 4, b'changedtick': 14, b'curpos': [0, 15, 4, 0, 11], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]]
2017-10-15 12:11:06,804 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"s', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 4, b'changedtick': 14, b'curpos': [0, 15, 4, 0, 11], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:06,804 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:06,805 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_refresh, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, {'typed': '\t"s', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 4, 'changedtick': 14, 'curpos': [0, 15, 4, 0, 11], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:06,805 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-css> for context scope <go>
2017-10-15 12:11:06,805 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-bufkeyword>, force[0] early_cache[0]
2017-10-15 12:11:06,805 [DEBUG @ cm_core.py:cm_refresh:334] 30760 - <cm-gocode> early_caching
2017-10-15 12:11:06,805 [DEBUG @ cm_core.py:cm_refresh:352] 30760 - <cm-gocode> has been cached, <2> candidates
2017-10-15 12:11:06,806 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tmux>, force[0] early_cache[0]
2017-10-15 12:11:06,806 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-jedi> for context scope <go>
2017-10-15 12:11:06,806 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-filepath>, force[0] early_cache[0]
2017-10-15 12:11:06,806 [DEBUG @ cm_core.py:cm_refresh:326] 30760 - <cm-keyword-continue> is not auto_popup
2017-10-15 12:11:06,806 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tags>, force[0] early_cache[0]
2017-10-15 12:11:06,806 [INFO @ cm_core.py:cm_refresh:372] 30760 - not notifying any channels, _refresh_completions now
2017-10-15 12:11:06,806 [INFO @ cm_core.py:_refresh_completions:577] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 3, matches cnt: 2
2017-10-15 12:11:06,806 [DEBUG @ cm_core.py:_refresh_completions:578] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 3, matches: [{'word': 'sync', 'icase': 1, 'dup': 1, 'snippet_word': 'sync', 'menu': '', 'padding': '', 'abbr': 'sync'}, {'word': 'sync/atomic', 'icase': 1, 'dup': 1, 'snippet_word': 'sync/atomic', 'menu': '', 'padding': '', 'abbr': 'sync/atomic'}], source matches: {'cm-gocode': {'startcol': 3, 'matches': [{'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}], 'last_matches': [{'word': 'sync', 'icase': 1, 'dup': 1, 'snippet_word': 'sync', 'menu': '', 'padding': '', 'abbr': 'sync'}, {'word': 'sync/atomic', 'icase': 1, 'dup': 1, 'snippet_word': 'sync/atomic', 'menu': '', 'padding': '', 'abbr': 'sync/atomic'}], 'enable': True, 'refresh': False, 'context': {'typed': '\t"syn', 'early_cache': False, 'startcol': 3, 'filetype': 'go', 'col': 6, 'base': 'syn', 'force': 0, 'scope_match': 'go', 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope': 'go', 'curpos': [0, 15, 6, 0, 13], 'changedtick': 12, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}}}
2017-10-15 12:11:06,806 [INFO @ cm_core.py:_complete:628] 30760 - ignore _complete call: self._last_startcol==startcol and self._last_matches==matches
2017-10-15 12:11:06,806 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 24, 'nvim_call_function', ('cm#_core_complete', [{'typed': '\t"s', 'bufnr': 1, 'lnum': 15, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go', 'filetype': 'go', 'col': 4, 'changedtick': 14, 'curpos': [0, 15, 4, 0, 11], 'scope': 'go', 'force': 0}, 3, [{'word': 'sync', 'icase': 1, 'dup': 1, 'menu': '', 'abbr': 'sync', 'snippet_word': 'sync', 'padding': ''}, {'word': 'sync/atomic', 'icase': 1, 'dup': 1, 'menu': '', 'abbr': 'sync/atomic', 'snippet_word': 'sync/atomic', 'padding': ''}], 1, []])]
2017-10-15 12:11:06,807 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x18\xb2nvim_call_function\x92\xb1cm#_core_complete\x95\x8a\xa5typed\xa3\t"s\xa5bufnr\x01\xa4lnum\x0f\xa8filepath\xda\x002/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go\xa8filetype\xa2go\xa3col\x04\xabchangedtick\x0e\xa6curpos\x95\x00\x0f\x04\x00\x0b\xa5scope\xa2go\xa5force\x00\x03\x92\x87\xa4word\xa4sync\xa5icase\x01\xa3dup\x01\xa4menu\xa0\xa4abbr\xa4sync\xacsnippet_word\xa4sync\xa7padding\xa0\x87\xa4word\xabsync/atomic\xa5icase\x01\xa3dup\x01\xa4menu\xa0\xa4abbr\xabsync/atomic\xacsnippet_word\xabsync/atomic\xa7padding\xa0\x01\x90''
2017-10-15 12:11:06,807 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x103674638> to wait for response
2017-10-15 12:11:06,807 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,807 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:06,807 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,807 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 24, None, 0]
2017-10-15 12:11:06,807 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, 0
2017-10-15 12:11:06,807 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x103674638>, switching back
2017-10-15 12:11:06,807 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_refresh completed
2017-10-15 12:11:06,807 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674638> finished executing
2017-10-15 12:11:06,807 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674638> is now dying...
2017-10-15 12:11:06,808 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:06,808 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:09,363 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:09,363 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 3, b'changedtick': 17, b'curpos': [0, 15, 3, 0, 10], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]]
2017-10-15 12:11:09,364 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 3, b'changedtick': 17, b'curpos': [0, 15, 3, 0, 10], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:09,364 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:09,365 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_refresh, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, {'typed': '\t"', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 3, 'changedtick': 17, 'curpos': [0, 15, 3, 0, 10], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:09,365 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-css> for context scope <go>
2017-10-15 12:11:09,365 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-bufkeyword>, force[0] early_cache[0]
2017-10-15 12:11:09,365 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-gocode>, force[0] early_cache[1]
2017-10-15 12:11:09,365 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tmux>, force[0] early_cache[0]
2017-10-15 12:11:09,365 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-jedi> for context scope <go>
2017-10-15 12:11:09,365 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-filepath>, force[0] early_cache[0]
2017-10-15 12:11:09,366 [DEBUG @ cm_core.py:cm_refresh:326] 30760 - <cm-keyword-continue> is not auto_popup
2017-10-15 12:11:09,366 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tags>, force[0] early_cache[0]
2017-10-15 12:11:09,366 [INFO @ cm_core.py:cm_refresh:372] 30760 - not notifying any channels, _refresh_completions now
2017-10-15 12:11:09,366 [DEBUG @ cm_core.py:_refresh_completions:524] 30760 - <cm-gocode> ignore by disabled
2017-10-15 12:11:09,366 [INFO @ cm_core.py:_refresh_completions:577] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 2, matches cnt: 0
2017-10-15 12:11:09,366 [DEBUG @ cm_core.py:_refresh_completions:578] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 2, matches: [], source matches: {'cm-gocode': {'startcol': 3, 'matches': [{'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}], 'last_matches': [], 'enable': False, 'refresh': False, 'context': {'typed': '\t"syn', 'early_cache': False, 'startcol': 3, 'filetype': 'go', 'col': 6, 'base': 'syn', 'force': 0, 'scope_match': 'go', 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope': 'go', 'curpos': [0, 15, 6, 0, 13], 'changedtick': 12, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}}}
2017-10-15 12:11:09,366 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 25, 'nvim_call_function', ('cm#_core_complete', [{'typed': '\t"', 'bufnr': 1, 'lnum': 15, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go', 'filetype': 'go', 'col': 3, 'changedtick': 17, 'curpos': [0, 15, 3, 0, 10], 'scope': 'go', 'force': 0}, 2, [], 0, []])]
2017-10-15 12:11:09,366 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x19\xb2nvim_call_function\x92\xb1cm#_core_complete\x95\x8a\xa5typed\xa2\t"\xa5bufnr\x01\xa4lnum\x0f\xa8filepath\xda\x002/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go\xa8filetype\xa2go\xa3col\x03\xabchangedtick\x11\xa6curpos\x95\x00\x0f\x03\x00\n\xa5scope\xa2go\xa5force\x00\x02\x90\x00\x90''
2017-10-15 12:11:09,366 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x103674638> to wait for response
2017-10-15 12:11:09,366 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:09,366 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:09,367 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:09,367 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [1, 25, None, 0]
2017-10-15 12:11:09,367 [DEBUG @ async_session.py:_on_response:95] 30760 - received response: None, 0
2017-10-15 12:11:09,367 [DEBUG @ session.py:response_cb:149] 30760 - response is available for greenlet <greenlet.greenlet object at 0x103674638>, switching back
2017-10-15 12:11:09,367 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_refresh completed
2017-10-15 12:11:09,367 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674638> finished executing
2017-10-15 12:11:09,367 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674638> is now dying...
2017-10-15 12:11:09,367 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:09,367 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:09,771 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:09,771 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"s', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 4, b'changedtick': 18, b'curpos': [0, 15, 4, 0, 11], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]]
2017-10-15 12:11:09,771 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"s', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 4, b'changedtick': 18, b'curpos': [0, 15, 4, 0, 11], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:09,771 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:09,772 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_refresh, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, {'typed': '\t"s', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 4, 'changedtick': 18, 'curpos': [0, 15, 4, 0, 11], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:09,773 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-css> for context scope <go>
2017-10-15 12:11:09,773 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-bufkeyword>, force[0] early_cache[0]
2017-10-15 12:11:09,773 [DEBUG @ cm_core.py:cm_refresh:334] 30760 - <cm-gocode> early_caching
2017-10-15 12:11:09,773 [DEBUG @ cm_core.py:cm_refresh:352] 30760 - <cm-gocode> has been cached, <2> candidates
2017-10-15 12:11:09,773 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tmux>, force[0] early_cache[0]
2017-10-15 12:11:09,773 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-jedi> for context scope <go>
2017-10-15 12:11:09,773 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-filepath>, force[0] early_cache[0]
2017-10-15 12:11:09,773 [DEBUG @ cm_core.py:cm_refresh:326] 30760 - <cm-keyword-continue> is not auto_popup
2017-10-15 12:11:09,773 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tags>, force[0] early_cache[0]
2017-10-15 12:11:09,773 [INFO @ cm_core.py:cm_refresh:372] 30760 - not notifying any channels, _refresh_completions now
2017-10-15 12:11:09,773 [DEBUG @ cm_core.py:_refresh_completions:524] 30760 - <cm-gocode> ignore by disabled
2017-10-15 12:11:09,773 [INFO @ cm_core.py:_refresh_completions:577] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 3, matches cnt: 0
2017-10-15 12:11:09,774 [DEBUG @ cm_core.py:_refresh_completions:578] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 3, matches: [], source matches: {'cm-gocode': {'startcol': 3, 'matches': [{'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}], 'last_matches': [], 'enable': False, 'refresh': False, 'context': {'typed': '\t"syn', 'early_cache': False, 'startcol': 3, 'filetype': 'go', 'col': 6, 'base': 'syn', 'force': 0, 'scope_match': 'go', 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope': 'go', 'curpos': [0, 15, 6, 0, 13], 'changedtick': 12, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}}}
2017-10-15 12:11:09,774 [INFO @ cm_core.py:_complete:623] 30760 - matches==0, _last_matches==0, ignore
2017-10-15 12:11:09,774 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_refresh completed
2017-10-15 12:11:09,774 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674638> finished executing
2017-10-15 12:11:09,774 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674638> is now dying...
2017-10-15 12:11:09,774 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:09,774 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:09,979 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:09,979 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"sy', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 5, b'changedtick': 19, b'curpos': [0, 15, 5, 0, 12], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]]
2017-10-15 12:11:09,979 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"sy', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 5, b'changedtick': 19, b'curpos': [0, 15, 5, 0, 12], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:09,979 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:09,980 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_refresh, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, {'typed': '\t"sy', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 5, 'changedtick': 19, 'curpos': [0, 15, 5, 0, 12], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:09,980 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-css> for context scope <go>
2017-10-15 12:11:09,980 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-bufkeyword>, force[0] early_cache[0]
2017-10-15 12:11:09,981 [DEBUG @ cm_core.py:cm_refresh:334] 30760 - <cm-gocode> early_caching
2017-10-15 12:11:09,981 [DEBUG @ cm_core.py:cm_refresh:352] 30760 - <cm-gocode> has been cached, <2> candidates
2017-10-15 12:11:09,981 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tmux>, force[0] early_cache[0]
2017-10-15 12:11:09,981 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-jedi> for context scope <go>
2017-10-15 12:11:09,981 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-filepath>, force[0] early_cache[0]
2017-10-15 12:11:09,981 [DEBUG @ cm_core.py:cm_refresh:326] 30760 - <cm-keyword-continue> is not auto_popup
2017-10-15 12:11:09,981 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tags>, force[0] early_cache[0]
2017-10-15 12:11:09,981 [INFO @ cm_core.py:cm_refresh:372] 30760 - not notifying any channels, _refresh_completions now
2017-10-15 12:11:09,981 [DEBUG @ cm_core.py:_refresh_completions:524] 30760 - <cm-gocode> ignore by disabled
2017-10-15 12:11:09,981 [INFO @ cm_core.py:_refresh_completions:577] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 4, matches cnt: 0
2017-10-15 12:11:09,981 [DEBUG @ cm_core.py:_refresh_completions:578] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 4, matches: [], source matches: {'cm-gocode': {'startcol': 3, 'matches': [{'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}], 'last_matches': [], 'enable': False, 'refresh': False, 'context': {'typed': '\t"syn', 'early_cache': False, 'startcol': 3, 'filetype': 'go', 'col': 6, 'base': 'syn', 'force': 0, 'scope_match': 'go', 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope': 'go', 'curpos': [0, 15, 6, 0, 13], 'changedtick': 12, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}}}
2017-10-15 12:11:09,981 [INFO @ cm_core.py:_complete:623] 30760 - matches==0, _last_matches==0, ignore
2017-10-15 12:11:09,981 [DEBUG @ cm.py:on_notification:265] 30760 - core method cm_refresh completed
2017-10-15 12:11:09,981 [DEBUG @ session.py:handler:208] 30760 - greenlet <greenlet.greenlet object at 0x103674638> finished executing
2017-10-15 12:11:09,982 [DEBUG @ session.py:handler:213] 30760 - greenlet <greenlet.greenlet object at 0x103674638> is now dying...
2017-10-15 12:11:09,982 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:09,982 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:10,243 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:10,243 [DEBUG @ msgpack_stream.py:_on_data:56] 30760 - received message: [2, b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"syn', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 6, b'changedtick': 20, b'curpos': [0, 15, 6, 0, 13], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]]
2017-10-15 12:11:10,243 [DEBUG @ async_session.py:_on_notification:102] 30760 - received notification: b'cm_refresh', [{b'cm-css': {b'priority': 9, b'early_cache': 0, b'abbreviation': b'css', b'cm_refresh': {b'omnifunc': b'csscomplete#CompleteCSS'}, b'enable': 1, b'word_pattern': b'[\\w\\-]+', b'scoping': 1, b'name': b'cm-css', b'cm_refresh_length': 3, b'auto_popup': 1, b'scopes': [b'css', b'scss'], b'sort': 1, b'cm_refresh_patterns': [b'[\\w\\-]+\\s*:\\s+']}, b'cm-filepath': {b'early_cache': 0, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_filepath', b'events': [], b'type': b'python3', b'id': 4}, b'word_pattern': b'([^\\W]|[-.~%$])+', b'priority': 6, b'name': b'cm-filepath', b'abbreviation': b'path', b'auto_popup': 1, b'cm_refresh_patterns': [b'(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', b'([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], b'sort': 0, b'options': {b'path_pattern': b'(([^\\W]|[-.~%$]|[/\\\\])+)'}}, b'cm-gocode': {b'early_cache': 1, b'abbreviation': b'Go', b'enable': True, b'channel': {b'module': b'cm_sources.cm_gocode', b'events': [], b'type': b'python3', b'id': 5}, b'word_pattern': b'[\\w/]+', b'priority': 9, b'name': b'cm-gocode', b'cm_refresh_length': 3, b'scoping': True, b'scopes': [b'go'], b'sort': 1, b'cm_refresh_patterns': [b'\\.'], b'auto_popup': 1}, b'cm-tmux': {b'early_cache': 0, b'priority': 4, b'name': b'cm-tmux', b'sort': 1, b'abbreviation': b'Tmux', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tmux', b'events': [b'CursorHold', b'CursorHoldI', b'FocusGained', b'BufEnter'], b'type': b'python3', b'id': 9}}, b'cm-jedi': {b'early_cache': 0, b'cm_refresh_length': 3, b'enable': True, b'channel': {b'module': b'cm_sources.cm_jedi', b'events': [], b'type': b'python3', b'multi_thread': 0}, b'priority': 9, b'name': b'cm-jedi', b'abbreviation': b'Py', b'scoping': True, b'scopes': [b'python'], b'sort': 1, b'cm_refresh_patterns': [b'^(import|from).*\\s', b'\\.', b'\\(\\s?', b',\\s?'], b'auto_popup': 1}, b'cm-bufkeyword': {b'early_cache': 0, b'priority': 5, b'name': b'cm-bufkeyword', b'sort': 1, b'abbreviation': b'Key', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_bufkeyword', b'events': [b'InsertEnter', b'BufEnter'], b'type': b'python3', b'id': 6}}, b'cm-keyword-continue': {b'word_pattern': b'\\w+', b'early_cache': 0, b'priority': 5, b'abbreviation': b'', b'cm_refresh_length': 0, b'auto_popup': 0, b'sort': 0, b'enable': True, b'channel': {b'module': b'cm_sources.cm_keyword_continue', b'events': [], b'type': b'python3', b'id': 7}, b'name': b'cm-keyword-continue'}, b'cm-tags': {b'early_cache': 0, b'priority': 6, b'name': b'cm-tags', b'sort': 1, b'abbreviation': b'Tag', b'auto_popup': 1, b'cm_refresh_length': 4, b'enable': True, b'channel': {b'module': b'cm_sources.cm_tags', b'events': [b'WinEnter'], b'type': b'python3', b'id': 8}}}, {b'typed': b'\t"syn', b'bufnr': 1, b'lnum': 15, b'filetype': b'go', b'col': 6, b'changedtick': 20, b'curpos': [0, 15, 6, 0, 13], b'filepath': b'/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:10,243 [DEBUG @ session.py:_on_notification:216] 30760 - received rpc notification, greenlet <greenlet.greenlet object at 0x103674638> will handle it
2017-10-15 12:11:10,244 [DEBUG @ cm.py:on_notification:248] 30760 - core method: cm_refresh, args: [{'cm-css': {'early_cache': 0, 'cm_refresh_length': 3, 'cm_refresh': {'omnifunc': 'csscomplete#CompleteCSS'}, 'enable': 1, 'word_pattern': '[\\w\\-]+', 'priority': 9, 'name': 'cm-css', 'abbreviation': 'css', 'scoping': 1, 'scopes': ['css', 'scss'], 'sort': 1, 'cm_refresh_patterns': ['[\\w\\-]+\\s*:\\s+'], 'auto_popup': 1}, 'cm-bufkeyword': {'early_cache': 0, 'priority': 5, 'name': 'cm-bufkeyword', 'abbreviation': 'Key', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_bufkeyword', 'events': ['InsertEnter', 'BufEnter'], 'type': 'python3', 'id': 6}, 'enable': True}, 'cm-gocode': {'early_cache': 1, 'cm_refresh_length': 3, 'enable': True, 'channel': {'module': 'cm_sources.cm_gocode', 'events': [], 'type': 'python3', 'id': 5}, 'word_pattern': '[\\w/]+', 'priority': 9, 'name': 'cm-gocode', 'abbreviation': 'Go', 'scoping': True, 'scopes': ['go'], 'sort': 1, 'cm_refresh_patterns': ['\\.'], 'auto_popup': 1}, 'cm-tmux': {'early_cache': 0, 'priority': 4, 'name': 'cm-tmux', 'abbreviation': 'Tmux', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tmux', 'events': ['CursorHold', 'CursorHoldI', 'FocusGained', 'BufEnter'], 'type': 'python3', 'id': 9}, 'enable': True}, 'cm-jedi': {'early_cache': 0, 'abbreviation': 'Py', 'enable': True, 'channel': {'module': 'cm_sources.cm_jedi', 'events': [], 'type': 'python3', 'multi_thread': 0}, 'priority': 9, 'name': 'cm-jedi', 'cm_refresh_length': 3, 'scoping': True, 'scopes': ['python'], 'sort': 1, 'cm_refresh_patterns': ['^(import|from).*\\s', '\\.', '\\(\\s?', ',\\s?'], 'auto_popup': 1}, 'cm-filepath': {'early_cache': 0, 'abbreviation': 'path', 'enable': True, 'channel': {'module': 'cm_sources.cm_filepath', 'events': [], 'type': 'python3', 'id': 4}, 'word_pattern': '([^\\W]|[-.~%$])+', 'priority': 6, 'name': 'cm-filepath', 'cm_refresh_length': 4, 'auto_popup': 1, 'cm_refresh_patterns': ['(\\.[/\\\\]+|[a-zA-Z]:\\\\+|~\\/+)', '([^\\W]|[-.~%$]|[/\\\\])+[/\\\\]+'], 'sort': 0, 'options': {'path_pattern': '(([^\\W]|[-.~%$]|[/\\\\])+)'}}, 'cm-keyword-continue': {'word_pattern': '\\w+', 'early_cache': 0, 'priority': 5, 'abbreviation': '', 'cm_refresh_length': 0, 'auto_popup': 0, 'sort': 0, 'channel': {'module': 'cm_sources.cm_keyword_continue', 'events': [], 'type': 'python3', 'id': 7}, 'enable': True, 'name': 'cm-keyword-continue'}, 'cm-tags': {'early_cache': 0, 'priority': 6, 'name': 'cm-tags', 'abbreviation': 'Tag', 'auto_popup': 1, 'cm_refresh_length': 4, 'sort': 1, 'channel': {'module': 'cm_sources.cm_tags', 'events': ['WinEnter'], 'type': 'python3', 'id': 8}, 'enable': True}}, {'typed': '\t"syn', 'bufnr': 1, 'lnum': 15, 'filetype': 'go', 'col': 6, 'changedtick': 20, 'curpos': [0, 15, 6, 0, 13], 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}, 0]
2017-10-15 12:11:10,245 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-css> for context scope <go>
2017-10-15 12:11:10,245 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-bufkeyword>, force[0] early_cache[0]
2017-10-15 12:11:10,245 [DEBUG @ cm_core.py:cm_refresh:352] 30760 - <cm-gocode> has been cached, <2> candidates
2017-10-15 12:11:10,245 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tmux>, force[0] early_cache[0]
2017-10-15 12:11:10,245 [DEBUG @ cm_core.py:cm_refresh:322] 30760 - _check_scope ignore <cm-jedi> for context scope <go>
2017-10-15 12:11:10,245 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-filepath>, force[0] early_cache[0]
2017-10-15 12:11:10,245 [DEBUG @ cm_core.py:cm_refresh:326] 30760 - <cm-keyword-continue> is not auto_popup
2017-10-15 12:11:10,245 [DEBUG @ cm_core.py:cm_refresh:336] 30760 - cm_refresh ignore <cm-tags>, force[0] early_cache[0]
2017-10-15 12:11:10,245 [INFO @ cm_core.py:cm_refresh:372] 30760 - not notifying any channels, _refresh_completions now
2017-10-15 12:11:10,245 [INFO @ cm_core.py:_refresh_completions:577] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 3, matches cnt: 2
2017-10-15 12:11:10,245 [DEBUG @ cm_core.py:_refresh_completions:578] 30760 - _refresh_completions names: ['cm-gocode'], startcol: 3, matches: [{'word': 'sync', 'icase': 1, 'dup': 1, 'snippet_word': 'sync', 'menu': '', 'padding': '', 'abbr': 'sync'}, {'word': 'sync/atomic', 'icase': 1, 'dup': 1, 'snippet_word': 'sync/atomic', 'menu': '', 'padding': '', 'abbr': 'sync/atomic'}], source matches: {'cm-gocode': {'startcol': 3, 'matches': [{'word': 'sync', 'icase': 1, 'menu': '', 'dup': 1}, {'word': 'sync/atomic', 'icase': 1, 'menu': '', 'dup': 1}], 'last_matches': [{'word': 'sync', 'icase': 1, 'dup': 1, 'snippet_word': 'sync', 'menu': '', 'padding': '', 'abbr': 'sync'}, {'word': 'sync/atomic', 'icase': 1, 'dup': 1, 'snippet_word': 'sync/atomic', 'menu': '', 'padding': '', 'abbr': 'sync/atomic'}], 'enable': True, 'refresh': False, 'context': {'typed': '\t"syn', 'early_cache': False, 'startcol': 3, 'filetype': 'go', 'col': 6, 'base': 'syn', 'force': 0, 'scope_match': 'go', 'bufnr': 1, 'lnum': 15, 'match_end': 2, 'scope': 'go', 'curpos': [0, 15, 6, 0, 13], 'changedtick': 12, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go'}}}
2017-10-15 12:11:10,246 [DEBUG @ msgpack_stream.py:send:33] 30760 - sent [0, 26, 'nvim_call_function', ('cm#_core_complete', [{'typed': '\t"syn', 'bufnr': 1, 'lnum': 15, 'filepath': '/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go', 'filetype': 'go', 'col': 6, 'changedtick': 20, 'curpos': [0, 15, 6, 0, 13], 'scope': 'go', 'force': 0}, 3, [{'word': 'sync', 'icase': 1, 'dup': 1, 'menu': '', 'abbr': 'sync', 'snippet_word': 'sync', 'padding': ''}, {'word': 'sync/atomic', 'icase': 1, 'dup': 1, 'menu': '', 'abbr': 'sync/atomic', 'snippet_word': 'sync/atomic', 'padding': ''}], 0, []])]
2017-10-15 12:11:10,246 [DEBUG @ base.py:send:113] 30760 - Sending 'b'\x94\x00\x1a\xb2nvim_call_function\x92\xb1cm#_core_complete\x95\x8a\xa5typed\xa5\t"syn\xa5bufnr\x01\xa4lnum\x0f\xa8filepath\xda\x002/Users/xlc/go/src/github.com/bytom/p2p/addrbook.go\xa8filetype\xa2go\xa3col\x06\xabchangedtick\x14\xa6curpos\x95\x00\x0f\x06\x00\r\xa5scope\xa2go\xa5force\x00\x03\x92\x87\xa4word\xa4sync\xa5icase\x01\xa3dup\x01\xa4menu\xa0\xa4abbr\xa4sync\xacsnippet_word\xa4sync\xa7padding\xa0\x87\xa4word\xabsync/atomic\xa5icase\x01\xa3dup\x01\xa4menu\xa0\xa4abbr\xabsync/atomic\xacsnippet_word\xabsync/atomic\xa7padding\xa0\x00\x90''
2017-10-15 12:11:10,246 [DEBUG @ session.py:_yielding_request:153] 30760 - yielding from greenlet <greenlet.greenlet object at 0x103674638> to wait for response
2017-10-15 12:11:10,246 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting for message...
2017-10-15 12:11:10,246 [DEBUG @ msgpack_stream.py:_on_data:59] 30760 - unpacker needs more data...
2017-10-15 12:11:10,246 [DEBUG @ msgpack_stream.py:_on_data:54] 30760 - waiting fo
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment