commit python-neovim for openSUSE:Factory
Hello community, here is the log from the commit of package python-neovim for openSUSE:Factory checked in at 2016-05-23 16:40:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-04-28 16:56:50.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-neovim.new/python-neovim.changes 2016-05-23 16:40:36.000000000 +0200 @@ -1,0 +2,18 @@ +Sun May 15 19:38:29 UTC 2016 - ronisbr@gmail.com + +- Version bump to 0.1.8. + Upstream changelog: + + Version 0.1.8 + + * 44fb250 vim compatible behavior for vim.eval("[1, 2]") + * 16cdbc5 fix bang and register command modifiers + * d6669ab better handling of invalid utf-8 in python3 + * 96c721a Don't error out on :UpdateRemotePlugins when there is + no plugins. + * 5f80a55 Use pyuv instead of asyncio on Windows to support + stdio. +- Fix `python-neovim.changes` and `python3-neovim.changes` + indentation. + +------------------------------------------------------------------- @@ -5 +23 @@ - Upstream changelong: + Upstream changelog: @@ -9,2 +27,2 @@ - Add back compatibility for nvim.session.threadsafe_call which is quite - common. + Add back compatibility for nvim.session.threadsafe_call which + is quite common. @@ -14,3 +32,4 @@ - This release contains some breaking changes, primarily for using this - package as a client to remote nvim instances. Most python plugins (both - legacy and rplugins) are expected to be unaffected. + This release contains some breaking changes, primarily for + using this package as a client to remote nvim instances. Most + python plugins (both legacy and rplugins) are expected to be + unaffected. @@ -18,2 +37,2 @@ - This version requires recent master version of neovim (or 0.1.3 when it gets - released). + This version requires recent master version of neovim (or 0.1.3 + when it gets released). @@ -29,5 +48,6 @@ - nvim.with_hook is gone. This was mostly used by clients to configure - decoding on python3. With this release, neovim.attach will activate decoding - for python3, so str is returned by default on both python2 and python3. - attach takes an optional boolean keyword argument decode, to force - decoding on or off. Decoding behavior can be changed with nvim2 = + nvim.with_hook is gone. This was mostly used by clients to + configure decoding on python3. With this release, neovim.attach + will activate decoding for python3, so str is returned by + default on both python2 and python3. attach takes an optional + boolean keyword argument decode, to force decoding on or off. + Decoding behavior can be changed with nvim2 = @@ -38,5 +58,6 @@ - * 6655ced remove SessionHook and move public session api to the nvim object - * 22537a2 introduce nvim.api.some_method and buffer.api.some_method to call - the msgpack API directly - * 69d6d0f allow nosetests without needing to set envirionment varibles to - find nvim + * 6655ced remove SessionHook and move public session api to the + nvim object + * 22537a2 introduce nvim.api.some_method and + buffer.api.some_method to call the msgpack API directly + * 69d6d0f allow nosetests without needing to set envirionment + varibles to find nvim @@ -46,3 +67,4 @@ - Also some bugs regarding line indexing are fixed in neovim master (not the - python-client), for instance buffer.append("line", i), when the line is - inserted after the last existing line, is no longer an error. + Also some bugs regarding line indexing are fixed in neovim + master (not the python-client), for instance + buffer.append("line", i), when the line is inserted after the + last existing line, is no longer an error. @@ -52,2 +74,2 @@ - Previously, when implementing an rplugin as a package, an empty dummy file - was needed like this: + Previously, when implementing an rplugin as a package, an empty + dummy file was needed like this: @@ -70,3 +92,3 @@ - This release introduces no new features or bugfixes, and is a compatibility - release. Neovim master will soon require this version (or later) being - installed. + This release introduces no new features or bugfixes, and is a + compatibility release. Neovim master will soon require this + version (or later) being installed. @@ -87,2 +109,2 @@ - * c3789fb move test/common.py to test/test_common.py to include it in - release tarballs + * c3789fb move test/common.py to test/test_common.py to include + it in release tarballs @@ -90,2 +112,4 @@ - * 4be9207 better handling of exceptions in async (notification) handlers - * 57747f6 allow $NVIM_PYTHON_LOG_FILE also when running the nosetests + * 4be9207 better handling of exceptions in async (notification) + handlers + * 57747f6 allow $NVIM_PYTHON_LOG_FILE also when running the + nosetests @@ -100,2 +124,4 @@ - * 62e347a add wrappers for add_highlight/clear_highlight buffer methods - * 2db6bee don't use BaseException.message which is removed in python3 + * 62e347a add wrappers for add_highlight/clear_highlight buffer + methods + * 2db6bee don't use BaseException.message which is removed in + python3 python3-neovim.changes: same change Old: ---- python-client-0.1.7.tar.gz New: ---- python-client-0.1.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-neovim.spec ++++++ --- /var/tmp/diff_new_pack.I4Z6gd/_old 2016-05-23 16:40:37.000000000 +0200 +++ /var/tmp/diff_new_pack.I4Z6gd/_new 2016-05-23 16:40:37.000000000 +0200 @@ -17,7 +17,7 @@ Name: python-neovim -Version: 0.1.7 +Version: 0.1.8 Release: 0 Summary: Python 2 client to Neovim License: Apache-2.0 python3-neovim.spec: same change ++++++ python-client-0.1.7.tar.gz -> python-client-0.1.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.7/neovim/__init__.py new/python-client-0.1.8/neovim/__init__.py --- old/python-client-0.1.7/neovim/__init__.py 2016-04-02 21:27:49.000000000 +0200 +++ new/python-client-0.1.8/neovim/__init__.py 2016-05-10 15:49:31.000000000 +0200 @@ -53,9 +53,6 @@ if os.path.isdir(path) and dup in plugins: plugins.remove(dup) - if not plugins: - sys.exit('must specify at least one plugin as argument') - setup_logging() if not session: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.7/neovim/api/common.py new/python-client-0.1.8/neovim/api/common.py --- old/python-client-0.1.7/neovim/api/common.py 2016-04-02 21:27:49.000000000 +0200 +++ new/python-client-0.1.8/neovim/api/common.py 2016-05-10 15:49:31.000000000 +0200 @@ -1,6 +1,8 @@ """Code shared between the API classes.""" import functools +from ..compat import unicode_errors_default + class Remote(object): @@ -156,7 +158,7 @@ def decode_if_bytes(obj, mode=True): """Decode obj if it is bytes.""" if mode is True: - mode = "strict" + mode = unicode_errors_default if isinstance(obj, bytes): return obj.decode("utf-8", errors=mode) return obj diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.7/neovim/compat.py new/python-client-0.1.8/neovim/compat.py --- old/python-client-0.1.7/neovim/compat.py 2016-04-02 21:27:49.000000000 +0200 +++ new/python-client-0.1.8/neovim/compat.py 2016-05-10 15:49:31.000000000 +0200 @@ -30,7 +30,9 @@ # There is no 'long' type in Python3 just int long = int + unicode_errors_default = 'surrogateescape' else: find_module = original_find_module + unicode_errors_default = 'strict' NUM_TYPES = (int, long, float) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.7/neovim/msgpack_rpc/msgpack_stream.py new/python-client-0.1.8/neovim/msgpack_rpc/msgpack_stream.py --- old/python-client-0.1.7/neovim/msgpack_rpc/msgpack_stream.py 2016-04-02 21:27:49.000000000 +0200 +++ new/python-client-0.1.8/neovim/msgpack_rpc/msgpack_stream.py 2016-05-10 15:49:31.000000000 +0200 @@ -3,6 +3,7 @@ from msgpack import Packer, Unpacker +from ..compat import unicode_errors_default logger = logging.getLogger(__name__) debug, info, warn = (logger.debug, logger.info, logger.warning,) @@ -19,7 +20,7 @@ def __init__(self, event_loop): """Wrap `event_loop` on a msgpack-aware interface.""" self._event_loop = event_loop - self._packer = Packer(use_bin_type=True) + self._packer = Packer(unicode_errors=unicode_errors_default) self._unpacker = Unpacker() self._message_cb = None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.7/neovim/plugin/decorators.py new/python-client-0.1.8/neovim/plugin/decorators.py --- old/python-client-0.1.7/neovim/plugin/decorators.py 2016-04-02 21:27:49.000000000 +0200 +++ new/python-client-0.1.8/neovim/plugin/decorators.py 2016-05-10 15:49:31.000000000 +0200 @@ -3,7 +3,7 @@ import inspect import logging -from ..compat import IS_PYTHON3 +from ..compat import IS_PYTHON3, unicode_errors_default logger = logging.getLogger(__name__) debug, info, warn = (logger.debug, logger.info, logger.warning,) @@ -59,10 +59,10 @@ opts['count'] = count if bang: - opts['bang'] = True + opts['bang'] = '' if register: - opts['register'] = True + opts['register'] = '' if nargs: opts['nargs'] = nargs @@ -141,7 +141,7 @@ return f -def decode(mode='strict'): +def decode(mode=unicode_errors_default): """Configure automatic encoding/decoding of strings.""" def dec(f): f._nvim_decode = mode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.7/neovim/plugin/script_host.py new/python-client-0.1.8/neovim/plugin/script_host.py --- old/python-client-0.1.7/neovim/plugin/script_host.py 2016-04-02 21:27:49.000000000 +0200 +++ new/python-client-0.1.8/neovim/plugin/script_host.py 2016-05-10 15:49:31.000000000 +0200 @@ -6,7 +6,7 @@ import sys from .decorators import plugin, rpc_export -from ..api import Nvim +from ..api import Nvim, walk __all__ = ('ScriptHost',) @@ -161,15 +161,23 @@ self.redirect_handler('\n'.join(seq)) +if IS_PYTHON3: + num_types = (int, float) +else: + num_types = (int, long, float) + + +def num_to_str(obj): + if isinstance(obj, num_types): + return str(obj) + else: + return obj + + class LegacyVim(Nvim): def eval(self, expr): obj = self.request("vim_eval", expr) - if IS_PYTHON3: - if isinstance(obj, (int, float)): - return str(obj) - elif isinstance(obj, (int, long, float)): - return str(obj) - return obj + return walk(num_to_str, obj) # This was copied/adapted from nvim-python help diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.7/setup.py new/python-client-0.1.8/setup.py --- old/python-client-0.1.7/setup.py 2016-04-02 21:27:49.000000000 +0200 +++ new/python-client-0.1.8/setup.py 2016-05-10 15:49:31.000000000 +0200 @@ -1,5 +1,6 @@ import platform import sys +import os from setuptools import setup @@ -7,7 +8,9 @@ 'msgpack-python>=0.4.0', ] -if sys.version_info < (3, 4): +if os.name == 'nt': + install_requires.append('pyuv') +elif sys.version_info < (3, 4): # trollius is just a backport of 3.4 asyncio module install_requires.append('trollius') @@ -16,10 +19,10 @@ install_requires.append('greenlet') setup(name='neovim', - version='0.1.7', + version='0.1.8', description='Python client to neovim', url='http://github.com/neovim/python-client', - download_url='https://github.com/neovim/python-client/archive/0.1.7.tar.gz', + download_url='https://github.com/neovim/python-client/archive/0.1.8.tar.gz', author='Thiago de Arruda', author_email='tpadilha84@gmail.com', license='Apache', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-client-0.1.7/test/test_buffer.py new/python-client-0.1.8/test/test_buffer.py --- old/python-client-0.1.7/test/test_buffer.py 2016-04-02 21:27:49.000000000 +0200 +++ new/python-client-0.1.8/test/test_buffer.py 2016-05-10 15:49:31.000000000 +0200 @@ -2,6 +2,8 @@ from nose.tools import with_setup, eq_ as eq, ok_ as ok from test_common import vim, cleanup +from neovim.compat import IS_PYTHON3 + @with_setup(setup=cleanup) def test_get_length(): @@ -147,6 +149,15 @@ vim.command('mark V') eq(vim.current.buffer.mark('V'), [3, 0]) +@with_setup(setup=cleanup) +def test_invalid_utf8(): + vim.command('normal "=printf("%c", 0xFF)\np') + eq(vim.eval("char2nr(getline(1))"), 0xFF) + + eq(vim.current.buffer[:], ['\udcff'] if IS_PYTHON3 else ['\xff']) + vim.current.line += 'x' + eq(vim.eval("getline(1)", decode=False), b'\xFFx') + eq(vim.current.buffer[:], ['\udcffx'] if IS_PYTHON3 else ['\xffx']) @with_setup(setup=cleanup) def test_get_exceptions():
participants (1)
-
root@hilbert.suse.de