Hello community, here is the log from the commit of package python-neovim for openSUSE:Factory checked in at 2016-10-10 16:24:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-neovim (Old) and /work/SRC/openSUSE:Factory/.python-neovim.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-neovim" Changes: -------- --- /work/SRC/openSUSE:Factory/python-neovim/python-neovim.changes 2016-08-12 15:44:03.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-neovim.new/python-neovim.changes 2016-10-10 16:25:00.000000000 +0200 @@ -1,0 +2,15 @@ +Sat Oct 8 23:57:56 UTC 2016 - roni...@gmail.com + +- Version bump to 0.1.10. + Upstream changelog: + + Version 0.1.10 + + * 861b0ba Report errors in handlers on stderr when used as + external client + * 36b2732 Don't rely on sys.stderr when it is not used + * 1954384 Allow Buffer.append to take bytes (b'...') as + argument + * cb23953 Use predictable log file names + +------------------------------------------------------------------- python3-neovim.changes: same change Old: ---- python-client-0.1.9.tar.gz New: ---- python-client-0.1.10.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-neovim.spec ++++++ --- /var/tmp/diff_new_pack.a94uEf/_old 2016-10-10 16:25:04.000000000 +0200 +++ /var/tmp/diff_new_pack.a94uEf/_new 2016-10-10 16:25:04.000000000 +0200 @@ -17,7 +17,7 @@ Name: python-neovim -Version: 0.1.9 +Version: 0.1.10 Release: 0 Summary: Python 2 client to Neovim License: Apache-2.0 python3-neovim.spec: same change ++++++ python-client-0.1.9.tar.gz -> python-client-0.1.10.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.9/README.md new/python-client-0.1.10/README.md --- old/python-client-0.1.9/README.md 2016-06-12 20:53:09.000000000 +0200 +++ new/python-client-0.1.10/README.md 2016-09-24 10:09:36.000000000 +0200 @@ -145,7 +145,9 @@ NVIM_PYTHON_LOG_FILE=logfile NVIM_PYTHON_LOG_LEVEL=DEBUG nvim ``` As more than one python host process might be started, the log filenames take -the pattern `logfile_PID` where `PID` is the process id. +the pattern `logfile_pyX_KIND` where `X` is the major python version (2 or 3) +and `KIND` is either "rplugin" or "script" (for the `:python[3]` +script interface). If the host cannot start at all, the error could be found in `~/.nvimlog` if `nvim` was compiled with logging. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.9/neovim/__init__.py new/python-client-0.1.10/neovim/__init__.py --- old/python-client-0.1.9/neovim/__init__.py 2016-06-12 20:53:09.000000000 +0200 +++ new/python-client-0.1.10/neovim/__init__.py 2016-09-24 10:09:36.000000000 +0200 @@ -53,7 +53,14 @@ if os.path.isdir(path) and dup in plugins: plugins.remove(dup) - setup_logging() + # Special case: the legacy scripthost receives a single relative filename + # while the rplugin host will receive absolute paths. + if plugins == ["script_host.py"]: + name = "script" + else: + name = "rplugin" + + setup_logging(name) if not session: session = stdio_session() @@ -94,12 +101,13 @@ return Nvim.from_session(session).with_decode(decode) -def setup_logging(): +def setup_logging(name): """Setup logging according to environment variables.""" logger = logging.getLogger(__name__) if 'NVIM_PYTHON_LOG_FILE' in os.environ: - logfile = (os.environ['NVIM_PYTHON_LOG_FILE'].strip() + - '_' + str(os.getpid())) + prefix = os.environ['NVIM_PYTHON_LOG_FILE'].strip() + major_version = sys.version_info[0] + logfile = '{0}_py{1}_{2}'.format(prefix, major_version, name) handler = logging.FileHandler(logfile, 'w') handler.formatter = logging.Formatter( '%(asctime)s [%(levelname)s @ ' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.9/neovim/api/buffer.py new/python-client-0.1.10/neovim/api/buffer.py --- old/python-client-0.1.9/neovim/api/buffer.py 2016-06-12 20:53:09.000000000 +0200 +++ new/python-client-0.1.10/neovim/api/buffer.py 2016-09-24 10:09:36.000000000 +0200 @@ -104,7 +104,7 @@ def append(self, lines, index=-1): """Append a string or list of lines to the buffer.""" - if isinstance(lines, basestring): + if isinstance(lines, (basestring, bytes)): lines = [lines] return self._session.request('buffer_insert', self, index, lines) @@ -125,7 +125,7 @@ line, col_start, col_end, async=async) def clear_highlight(self, src_id, line_start=0, line_end=-1, async=True): - """clear highlights from the buffer.""" + """Clear highlights from the buffer.""" self.request('buffer_clear_highlight', src_id, line_start, line_end, async=async) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.9/neovim/api/nvim.py new/python-client-0.1.10/neovim/api/nvim.py --- old/python-client-0.1.9/neovim/api/nvim.py 2016-06-12 20:53:09.000000000 +0200 +++ new/python-client-0.1.10/neovim/api/nvim.py 2016-09-24 10:09:36.000000000 +0200 @@ -146,17 +146,32 @@ This should not be called from a plugin running in the host, which already runs the loop and dispatches events to plugins. """ + if err_cb is None: + err_cb = sys.stderr.write + self._err_cb = err_cb + def filter_request_cb(name, args): + name = self._from_nvim(name) args = walk(self._from_nvim, args) - result = request_cb(self._from_nvim(name), args) + try: + result = request_cb(name, args) + except Exception: + msg = ("error caught in request handler '{} {}'\n{}\n\n" + .format(name, args, format_exc_skip(1, 5))) + self._err_cb(msg) + raise return walk(self._to_nvim, result) def filter_notification_cb(name, args): - notification_cb(self._from_nvim(name), walk(self._from_nvim, args)) - - if err_cb is None: - err_cb = sys.stderr.write - self._err_cb = err_cb + name = self._from_nvim(name) + args = walk(self._from_nvim, args) + try: + notification_cb(name, args) + except Exception: + msg = ("error caught in notification handler '{} {}'\n{}\n\n" + .format(name, args, format_exc_skip(1, 5))) + self._err_cb(msg) + raise self._session.run(filter_request_cb, filter_notification_cb, setup_cb) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.9/neovim/msgpack_rpc/event_loop/asyncio.py new/python-client-0.1.10/neovim/msgpack_rpc/event_loop/asyncio.py --- old/python-client-0.1.9/neovim/msgpack_rpc/event_loop/asyncio.py 2016-06-12 20:53:09.000000000 +0200 +++ new/python-client-0.1.10/neovim/msgpack_rpc/event_loop/asyncio.py 2016-09-24 10:09:36.000000000 +0200 @@ -59,7 +59,7 @@ def pipe_data_received(self, fd, data): """Used to signal `asyncio.SubprocessProtocol` of incoming data.""" - if fd == sys.stderr.fileno(): + if fd == 2: # stderr fd number self._on_stderr(data) elif self._on_data: self._on_data(data) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.9/neovim/plugin/host.py new/python-client-0.1.10/neovim/plugin/host.py --- old/python-client-0.1.9/neovim/plugin/host.py 2016-06-12 20:53:09.000000000 +0200 +++ new/python-client-0.1.10/neovim/plugin/host.py 2016-09-24 10:09:36.000000000 +0200 @@ -77,7 +77,6 @@ msg = ("error caught in async handler '{} {}'\n{}\n" .format(name, args, format_exc_skip(1, 5))) self._on_async_err(msg + "\n") - raise def _on_request(self, name, args): """Handle a msgpack-rpc request.""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.9/setup.py new/python-client-0.1.10/setup.py --- old/python-client-0.1.9/setup.py 2016-06-12 20:53:09.000000000 +0200 +++ new/python-client-0.1.10/setup.py 2016-09-24 10:09:36.000000000 +0200 @@ -19,10 +19,10 @@ install_requires.append('greenlet') setup(name='neovim', - version='0.1.9', + version='0.1.10', description='Python client to neovim', url='http://github.com/neovim/python-client', - download_url='https://github.com/neovim/python-client/archive/0.1.9.tar.gz', + download_url='https://github.com/neovim/python-client/archive/0.1.10.tar.gz', author='Thiago de Arruda', author_email='tpadilh...@gmail.com', license='Apache', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.9/test/test_buffer.py new/python-client-0.1.10/test/test_buffer.py --- old/python-client-0.1.9/test/test_buffer.py 2016-06-12 20:53:09.000000000 +0200 +++ new/python-client-0.1.10/test/test_buffer.py 2016-09-24 10:09:36.000000000 +0200 @@ -140,6 +140,8 @@ eq(vim.current.buffer[:], ['b', '', 'a', 'c', 'd']) vim.current.buffer.append(['c', 'd'], 2) eq(vim.current.buffer[:], ['b', '', 'c', 'd', 'a', 'c', 'd']) + vim.current.buffer.append(b'bytes') + eq(vim.current.buffer[:], ['b', '', 'c', 'd', 'a', 'c', 'd', 'bytes']) @with_setup(setup=cleanup) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.9/test/test_common.py new/python-client-0.1.10/test/test_common.py --- old/python-client-0.1.9/test/test_common.py 2016-06-12 20:53:09.000000000 +0200 +++ new/python-client-0.1.10/test/test_common.py 2016-09-24 10:09:36.000000000 +0200 @@ -6,7 +6,7 @@ from nose.tools import eq_ as eq -neovim.setup_logging() +neovim.setup_logging("test") child_argv = os.environ.get('NVIM_CHILD_ARGV') listen_address = os.environ.get('NVIM_LISTEN_ADDRESS')