Hello community,

here is the log from the commit of package python-neovim for openSUSE:Leap:15.2 
checked in at 2020-02-19 18:48:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-neovim (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-neovim.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-neovim"

Wed Feb 19 18:48:51 2020 rev:16 rq:776843 version:0.3.2

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-neovim/python-neovim.changes    
2020-01-15 15:50:45.979505838 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python-neovim.new.26092/python-neovim.changes 
2020-02-19 18:48:52.127041263 +0100
@@ -1,0 +2,17 @@
+Sun Jan 20 19:44:11 CET 2019 - [email protected]
+
+- Update to 0.3.2:
+  * Cleanup after the pynvim rename, as well as a few bugfixes
+    and improvements.
+  * support del vim.current.line
+  * Handle nvim_error_event (errors from async requests)
+  * Don't crash when subprocesses write to stdout
+  * 22e5919 Continue pynvim rename
+  * test with Python 3.7 in Travis.
+
+-------------------------------------------------------------------
+Mon Jan  7 21:51:46 UTC 2019 - Matej Cepl <[email protected]>
+
+- Make package buildable on EPEL7, while we give up on Fedora
+
+-------------------------------------------------------------------

Old:
----
  pynvim-0.3.1.tar.gz

New:
----
  pynvim-0.3.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-neovim.spec ++++++
--- /var/tmp/diff_new_pack.bcyx7Y/_old  2020-02-19 18:48:52.395041548 +0100
+++ /var/tmp/diff_new_pack.bcyx7Y/_new  2020-02-19 18:48:52.395041548 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-neovim
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,20 +18,26 @@
 
 %define modname pynvim
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
-# For OpenSUSE and older Fedora
-%{!?python3_pkgversion:%global python3_pkgversion %(c=%{python3_version}; echo 
${c/./})}
+
 Name:           python-neovim
-Version:        0.3.1
+Version:        0.3.2
 Release:        0
 Summary:        Python client to Neovim
 License:        Apache-2.0
 Group:          Productivity/Text/Editors
 URL:            https://github.com/neovim/pynvim
 Source:         
https://github.com/neovim/pynvim/archive/%{version}/pynvim-%{version}.tar.gz
-BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
+%if 0%{?rhel} >= 7
+BuildRequires:  python34-pytest
+BuildRequires:  python34-setuptools
+%else
+BuildRequires:  python3-pytest
+BuildRequires:  python3-setuptools
+%endif
 BuildRequires:  python-rpm-macros
+BuildRequires:  python2-pytest
+BuildRequires:  python2-setuptools
 Requires:       neovim >= 0.1.6
 Requires:       python-greenlet
 Requires:       python-msgpack-python

++++++ pynvim-0.3.1.tar.gz -> pynvim-0.3.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/.scrutinizer.yml 
new/pynvim-0.3.2/.scrutinizer.yml
--- old/pynvim-0.3.1/.scrutinizer.yml   2018-11-17 10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/.scrutinizer.yml   2019-01-20 16:22:43.000000000 +0100
@@ -131,4 +131,4 @@
 tools:
   external_code_coverage:
     timeout: 1200
-    runs: 5
+    runs: 6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/.travis.yml new/pynvim-0.3.2/.travis.yml
--- old/pynvim-0.3.1/.travis.yml        2018-11-17 10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/.travis.yml        2019-01-20 16:22:43.000000000 +0100
@@ -1,16 +1,15 @@
-sudo: false
+dist: xenial
 language: python
 env:
   global:
-    - NOSE_NOLOGCAPTURE=true
-    - NOSE_VERBOSE=2
-    - NOSE_WITH_COVERAGE=true
-    - NOSE_COVER_PACKAGE=neovim
     - PYTEST_ADDOPTS=-vv
   matrix:
     - CI_TARGET=tests
 matrix:
   include:
+    - python: pypy
+      dist: trusty
+      sudo: false
     - python: 3.6
       env: CI_TARGET=checkqa TOXENV=checkqa
 python:
@@ -20,7 +19,7 @@
   - 3.4
   - 3.5
   - 3.6
-  - pypy
+  - 3.7
 before_install:
   - if [ $CI_TARGET = tests ]; then
       eval "$(curl -Ss 
https://raw.githubusercontent.com/neovim/bot-ci/master/scripts/travis-setup.sh) 
nightly-x64";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/README.md new/pynvim-0.3.2/README.md
--- old/pynvim-0.3.1/README.md  2018-11-17 10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/README.md  2019-01-20 16:22:43.000000000 +0100
@@ -1,9 +1,9 @@
 ### Pynvim: Python client to [Neovim](https://github.com/neovim/neovim)
 
-[![Build 
Status](https://travis-ci.org/neovim/python-client.svg?branch=master)](https://travis-ci.org/neovim/python-client)
+[![Build 
Status](https://travis-ci.org/neovim/pynvim.svg?branch=master)](https://travis-ci.org/neovim/pynvim)
 [![Documentation 
Status](https://readthedocs.org/projects/pynvim/badge/?version=latest)](http://pynvim.readthedocs.io/en/latest/?badge=latest)
-[![Scrutinizer Code 
Quality](https://scrutinizer-ci.com/g/neovim/python-client/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/neovim/python-client/?branch=master)
-[![Code 
Coverage](https://scrutinizer-ci.com/g/neovim/python-client/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/neovim/python-client/?branch=master)
+[![Scrutinizer Code 
Quality](https://scrutinizer-ci.com/g/neovim/pynvim/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/neovim/pynvim/?branch=master)
+[![Code 
Coverage](https://scrutinizer-ci.com/g/neovim/pynvim/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/neovim/pynvim/?branch=master)
 
 Pynvim implements support for python plugins in Nvim. It also works as a 
library for
 connecting to and scripting Nvim processes through its msgpack-rpc API.
@@ -13,19 +13,18 @@
 Supports python 2.7, and 3.4 or later.
 
 ```sh
-pip2 install neovim
-pip3 install neovim
+pip2 install pynvim
+pip3 install pynvim
 ```
 
 If you only use one of python2 or python3, it is enough to install that
 version. You can install the package without being root by adding the `--user`
 flag.
 
-If you follow Neovim master, make sure to upgrade the python-client when you
-upgrade neovim:
+Anytime you upgrade Neovim, make sure to upgrade pynvim as well:
 ```sh
-pip2 install --upgrade neovim
-pip3 install --upgrade neovim
+pip2 install --upgrade pynvim
+pip3 install --upgrade pynvim
 ```
 
 Alternatively, the master version could be installed by executing the following
@@ -57,13 +56,23 @@
 
 #### Development
 
-If you change the code, you need to run
-```sh
-pip2 install .
-pip3 install .
-```
-for the changes to have effect. For instructions of testing and 
troubleshooting,
-see the [development](http://pynvim.readthedocs.io/en/latest/development.html) 
documentation.
+Use (and activate) a local virtualenv.
+
+    python3 -m venv env36
+    source env36/bin/activate
+
+If you change the code, you must reinstall for the changes to take effect:
+
+    pip install .
+
+Use `pytest` to run the tests. Invoking with `python -m` prepends the current
+directory to `sys.path` (otherwise `pytest` might find other versions!):
+
+    python -m pytest
+
+For details about testing and troubleshooting, see the
+[development](http://pynvim.readthedocs.io/en/latest/development.html)
+documentation.
 
 #### Usage through the python REPL
 
@@ -80,7 +89,7 @@
 bridge](http://vimdoc.sourceforge.net/htmldoc/if_pyth.html#python-vim)):
 
 ```python
->>> from neovim import attach
+>>> from pynvim import attach
 # Create a python API session attached to unix domain socket created above:
 >>> nvim = attach('socket', path='/tmp/nvim')
 # Now do some work. 
@@ -98,7 +107,7 @@
 running neovim instance.
 
 ```python
->>> from neovim import attach
+>>> from pynvim import attach
 >>> nvim = attach('child', argv=["/bin/env", "nvim", "--embed"])
 ```
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/docs/development.rst 
new/pynvim-0.3.2/docs/development.rst
--- old/pynvim-0.3.1/docs/development.rst       2018-11-17 10:38:41.000000000 
+0100
+++ new/pynvim-0.3.2/docs/development.rst       2019-01-20 16:22:43.000000000 
+0100
@@ -9,7 +9,7 @@
 for the changes to have effect.
 Alternatively you could execute Neovim with the ``$PYTHONPATH`` environment 
variable::
 
-    PYTHONPATH=/path/to/python-client nvim
+    PYTHONPATH=/path/to/pynvim nvim
 
 But note this is not completely reliable,
 as installed packages can appear before ``$PYTHONPATH`` in the python search 
path.
@@ -19,9 +19,11 @@
 
 To run the tests execute::
 
-    pytest
+    python -m pytest
+
+This will run the tests in an embedded instance of Neovim, with the current
+directory added to ``sys.path``.
 
-This will run the tests in an embedded instance of Neovim.
 If you want to test a different version than ``nvim`` in ``$PATH`` use::
 
     NVIM_CHILD_ARGV='["/path/to/nvim", "-u", "NONE", "--embed"]' pytest
@@ -30,7 +32,7 @@
 
     export NVIM_LISTEN_ADDRESS=/tmp/nvimtest
     xterm -e "nvim -u NONE"&
-    pytest
+    python -m pytest
 
 But note you need to restart Neovim every time you run the tests!
 Substitute your favorite terminal emulator for ``xterm``.
@@ -64,7 +66,7 @@
 
 .. code-block:: python
 
-    >>> from neovim import attach
+    >>> from pynvim import attach
     # Create a python API session attached to unix domain socket created above:
     >>> nvim = attach('socket', path='/tmp/nvim')
     # Now do some work. 
@@ -83,7 +85,7 @@
 
 .. code-block:: python
 
-    >>> from neovim import attach
+    >>> from pynvim import attach
     >>> nvim = attach('child', argv=["/bin/env", "nvim", "--embed"])
 
 The tests can be consulted for more examples.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/docs/installation.rst 
new/pynvim-0.3.2/docs/installation.rst
--- old/pynvim-0.3.1/docs/installation.rst      2018-11-17 10:38:41.000000000 
+0100
+++ new/pynvim-0.3.2/docs/installation.rst      2019-01-20 16:22:43.000000000 
+0100
@@ -16,8 +16,8 @@
     If you only use one of python2 or python3,
     it is enough to install that version.
 
-If you follow Neovim HEAD,
-make sure to upgrade the ``python-client`` when you upgrade Neovim::
+If you follow Neovim HEAD, make sure to upgrade ``pynvim`` when you upgrade
+Neovim::
 
     pip2 install --upgrade pynvim
     pip3 install --upgrade pynvim
@@ -25,10 +25,10 @@
 Install from source
 -------------------
 
-Clone the repository somewhere on your disk and enter to the repository:: 
+Clone the repository somewhere on your disk and enter to the repository::
 
-    git clone https://github.com/neovim/python-client.git
-    cd python-client
+    git clone https://github.com/neovim/pynvim.git
+    cd pynvim
 
 Now you can install it on your system::
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/docs/plugin-decorators.rst 
new/pynvim-0.3.2/docs/plugin-decorators.rst
--- old/pynvim-0.3.1/docs/plugin-decorators.rst 2018-11-17 10:38:41.000000000 
+0100
+++ new/pynvim-0.3.2/docs/plugin-decorators.rst 2019-01-20 16:22:43.000000000 
+0100
@@ -1,7 +1,7 @@
 Plugin Decorators
 =================
 
-.. module:: neovim.plugin
+.. module:: pynvim.plugin
 
 Plugin decorators.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/docs/usage/remote-plugins.rst 
new/pynvim-0.3.2/docs/usage/remote-plugins.rst
--- old/pynvim-0.3.1/docs/usage/remote-plugins.rst      2018-11-17 
10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/docs/usage/remote-plugins.rst      2019-01-20 
16:22:43.000000000 +0100
@@ -11,24 +11,24 @@
 
 .. code-block:: python
 
-   import neovim
+   import pynvim
 
-   @neovim.plugin
+   @pynvim.plugin
    class TestPlugin(object):
 
        def __init__(self, nvim):
            self.nvim = nvim
 
-       @neovim.function('TestFunction', sync=True)
+       @pynvim.function('TestFunction', sync=True)
        def testfunction(self, args):
            return 3
 
-       @neovim.command('TestCommand', nargs='*', range='')
+       @pynvim.command('TestCommand', nargs='*', range='')
        def testcommand(self, args, range):
            self.nvim.current.line = ('Command with args: {}, range: {}'
                                      .format(args, range))
 
-       @neovim.autocmd('BufEnter', pattern='*.py', eval='expand("<afile>")', 
sync=True)
+       @pynvim.autocmd('BufEnter', pattern='*.py', eval='expand("<afile>")', 
sync=True)
        def on_bufenter(self, filename):
            self.nvim.out_write('testplugin is in ' + filename + '\n')
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/pynvim/api/common.py 
new/pynvim-0.3.2/pynvim/api/common.py
--- old/pynvim-0.3.1/pynvim/api/common.py       2018-11-17 10:38:41.000000000 
+0100
+++ new/pynvim-0.3.2/pynvim/api/common.py       2019-01-20 16:22:43.000000000 
+0100
@@ -39,8 +39,8 @@
 
     def __eq__(self, other):
         """Return True if `self` and `other` are the same object."""
-        return (hasattr(other, 'code_data') and
-                other.code_data == self.code_data)
+        return (hasattr(other, 'code_data')
+                and other.code_data == self.code_data)
 
     def __hash__(self):
         """Return hash based on remote object id."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/pynvim/api/nvim.py 
new/pynvim-0.3.2/pynvim/api/nvim.py
--- old/pynvim-0.3.1/pynvim/api/nvim.py 2018-11-17 10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/pynvim/api/nvim.py 2019-01-20 16:22:43.000000000 +0100
@@ -166,8 +166,8 @@
         present and True, a asynchronous notification is sent instead. This
         will never block, and the return value or error is ignored.
         """
-        if (self._session._loop_thread is not None and
-                threading.current_thread() != self._session._loop_thread):
+        if (self._session._loop_thread is not None
+                and threading.current_thread() != self._session._loop_thread):
 
             msg = ("Request from non-main thread.\n"
                    "Requests from different threads should be wrapped "
@@ -403,8 +403,8 @@
         return self.request('nvim_err_write', msg, **kwargs)
 
     def _thread_invalid(self):
-        return (self._session._loop_thread is not None and
-                threading.current_thread() != self._session._loop_thread)
+        return (self._session._loop_thread is not None
+                and threading.current_thread() != self._session._loop_thread)
 
     def quit(self, quit_command='qa!'):
         """Send a quit command to Nvim.
@@ -507,6 +507,10 @@
     def line(self, line):
         return self._session.request('nvim_set_current_line', line)
 
+    @line.deleter
+    def line(self):
+        return self._session.request('nvim_del_current_line')
+
     @property
     def buffer(self):
         return self._session.request('nvim_get_current_buf')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/pynvim/compat.py 
new/pynvim-0.3.2/pynvim/compat.py
--- old/pynvim-0.3.1/pynvim/compat.py   2018-11-17 10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/pynvim/compat.py   2019-01-20 16:22:43.000000000 +0100
@@ -1,4 +1,4 @@
-"""Code for supporting compatibility across python versions."""
+"""Code for compatibility across Python versions."""
 
 import sys
 import warnings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pynvim-0.3.1/pynvim/msgpack_rpc/event_loop/asyncio.py 
new/pynvim-0.3.2/pynvim/msgpack_rpc/event_loop/asyncio.py
--- old/pynvim-0.3.1/pynvim/msgpack_rpc/event_loop/asyncio.py   2018-11-17 
10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/pynvim/msgpack_rpc/event_loop/asyncio.py   2019-01-20 
16:22:43.000000000 +0100
@@ -104,10 +104,15 @@
         self._loop.run_until_complete(coroutine)
         debug("native stdin connection successful")
 
+        # Make sure subprocesses don't clobber stdout,
+        # send the output to stderr instead.
+        rename_stdout = os.dup(sys.stdout.fileno())
+        os.dup2(sys.stderr.fileno(), sys.stdout.fileno())
+
         if os.name == 'nt':
-            pipe = PipeHandle(msvcrt.get_osfhandle(sys.stdout.fileno()))
+            pipe = PipeHandle(msvcrt.get_osfhandle(rename_stdout))
         else:
-            pipe = sys.stdout
+            pipe = os.fdopen(rename_stdout, 'wb')
         coroutine = self._loop.connect_write_pipe(self._fact, pipe)
         self._loop.run_until_complete(coroutine)
         debug("native stdout connection successful")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/pynvim/msgpack_rpc/msgpack_stream.py 
new/pynvim-0.3.2/pynvim/msgpack_rpc/msgpack_stream.py
--- old/pynvim-0.3.1/pynvim/msgpack_rpc/msgpack_stream.py       2018-11-17 
10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/pynvim/msgpack_rpc/msgpack_stream.py       2019-01-20 
16:22:43.000000000 +0100
@@ -20,8 +20,7 @@
     def __init__(self, event_loop):
         """Wrap `event_loop` on a msgpack-aware interface."""
         self.loop = event_loop
-        self._packer = Packer(encoding='utf-8',
-                              unicode_errors=unicode_errors_default)
+        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/pynvim-0.3.1/pynvim/msgpack_rpc/session.py 
new/pynvim-0.3.2/pynvim/msgpack_rpc/session.py
--- old/pynvim-0.3.1/pynvim/msgpack_rpc/session.py      2018-11-17 
10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/pynvim/msgpack_rpc/session.py      2019-01-20 
16:22:43.000000000 +0100
@@ -193,8 +193,8 @@
         def handler():
             try:
                 rv = self._request_cb(name, args)
-                debug('greenlet %s finished executing, ' +
-                      'sending %s as response', gr, rv)
+                debug('greenlet %s finished executing, '
+                      + 'sending %s as response', gr, rv)
                 response.send(rv)
             except ErrorResponse as err:
                 warn("error response from request '%s %s': %s", name,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/pynvim/plugin/decorators.py 
new/pynvim-0.3.2/pynvim/plugin/decorators.py
--- old/pynvim-0.3.1/pynvim/plugin/decorators.py        2018-11-17 
10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/pynvim/plugin/decorators.py        2019-01-20 
16:22:43.000000000 +0100
@@ -165,7 +165,7 @@
 
 
 def encoding(encoding=True):
-    """DEPRECATED: use neovim.decode()."""
+    """DEPRECATED: use pynvim.decode()."""
     if isinstance(encoding, str):
         encoding = True
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/pynvim/plugin/host.py 
new/pynvim-0.3.2/pynvim/plugin/host.py
--- old/pynvim-0.3.1/pynvim/plugin/host.py      2018-11-17 10:38:41.000000000 
+0100
+++ new/pynvim-0.3.2/pynvim/plugin/host.py      2019-01-20 16:22:43.000000000 
+0100
@@ -38,7 +38,9 @@
         self._specs = {}
         self._loaded = {}
         self._load_errors = {}
-        self._notification_handlers = {}
+        self._notification_handlers = {
+            'nvim_error_event': self._on_error_event
+        }
         self._request_handlers = {
             'poll': lambda: 'ok',
             'specs': self._on_specs_request,
@@ -49,8 +51,16 @@
         self._decode_default = IS_PYTHON3
 
     def _on_async_err(self, msg):
+        # uncaught python exception
         self.nvim.err_write(msg, async_=True)
 
+    def _on_error_event(self, kind, msg):
+        # error from nvim due to async request
+        # like nvim.command(..., async_=True)
+        errmsg = "{}: Async request caused an error:\n{}\n".format(
+            self.name, decode_if_bytes(msg))
+        self.nvim.err_write(errmsg, async_=True)
+
     def start(self, plugins):
         """Start listening for msgpack-rpc requests and notifications."""
         self.nvim.run_loop(self._on_request,
@@ -152,7 +162,8 @@
             kind = "rplugin"
         name = "python{}-{}-host".format(sys.version_info[0], kind)
         attributes = {"license": "Apache v2",
-                      "website": "github.com/neovim/python-client"}
+                      "website": "github.com/neovim/pynvim"}
+        self.name = name
         self.nvim.api.set_client_info(
             name, VERSION.__dict__, "host", host_method_spec,
             attributes, async_=True)
@@ -202,13 +213,13 @@
             # register in the rpc handler dict
             if sync:
                 if method in self._request_handlers:
-                    raise Exception(('Request handler for "{}" is ' +
-                                    'already registered').format(method))
+                    raise Exception(('Request handler for "{}" is '
+                                    + 'already registered').format(method))
                 self._request_handlers[method] = fn_wrapped
             else:
                 if method in self._notification_handlers:
-                    raise Exception(('Notification handler for "{}" is ' +
-                                    'already registered').format(method))
+                    raise Exception(('Notification handler for "{}" is '
+                                    + 'already registered').format(method))
                 self._notification_handlers[method] = fn_wrapped
             if hasattr(fn, '_nvim_rpc_spec'):
                 specs.append(fn._nvim_rpc_spec)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/pynvim/plugin/script_host.py 
new/pynvim-0.3.2/pynvim/plugin/script_host.py
--- old/pynvim-0.3.1/pynvim/plugin/script_host.py       2018-11-17 
10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/pynvim/plugin/script_host.py       2019-01-20 
16:22:43.000000000 +0100
@@ -7,6 +7,7 @@
 
 from .decorators import plugin, rpc_export
 from ..api import Nvim, walk
+from ..compat import IS_PYTHON3
 from ..msgpack_rpc import ErrorResponse
 from ..util import format_exc_skip
 
@@ -16,8 +17,6 @@
 logger = logging.getLogger(__name__)
 debug, info, warn = (logger.debug, logger.info, logger.warn,)
 
-IS_PYTHON3 = sys.version_info >= (3, 0)
-
 if IS_PYTHON3:
     basestring = str
 
@@ -50,7 +49,7 @@
             'au DirChanged * call rpcnotify({}, "python_chdir", v:event.cwd)'
             .format(nvim.channel_id), async_=True)
         # XXX: Avoid race condition.
-        # 
https://github.com/neovim/python-client/pull/296#issuecomment-358970531
+        # https://github.com/neovim/pynvim/pull/296#issuecomment-358970531
         # TODO(bfredl): when host initialization has been refactored,
         # to make __init__ safe again, the following should work:
         # os.chdir(nvim.eval('getcwd()', async_=False))
@@ -145,8 +144,8 @@
                 elif isinstance(result, basestring):
                     newlines.append(result)
                 else:
-                    exception = TypeError('pydo should return a string ' +
-                                          'or None, found %s instead'
+                    exception = TypeError('pydo should return a string '
+                                          + 'or None, found %s instead'
                                           % result.__class__.__name__)
                     break
                 linenr += 1
@@ -205,7 +204,7 @@
         return walk(num_to_str, obj)
 
 
-# This was copied/adapted from nvim-python help
+# Copied/adapted from :help if_pyth.
 def path_hook(nvim):
     def _get_paths():
         if nvim._thread_invalid():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/pynvim/util.py 
new/pynvim-0.3.2/pynvim/util.py
--- old/pynvim-0.3.1/pynvim/util.py     2018-11-17 10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/pynvim/util.py     2019-01-20 16:22:43.000000000 +0100
@@ -6,10 +6,10 @@
 
 def format_exc_skip(skip, limit=None):
     """Like traceback.format_exc but allow skipping the first frames."""
-    type, val, tb = sys.exc_info()
+    etype, val, tb = sys.exc_info()
     for i in range(skip):
         tb = tb.tb_next
-    return ('\n'.join(format_exception(type, val, tb, limit))).rstrip()
+    return (''.join(format_exception(etype, val, tb, limit))).rstrip()
 
 
 # Taken from SimpleNamespace in python 3
@@ -32,4 +32,4 @@
         return self.__dict__ == other.__dict__
 
 
-VERSION = Version(major=0, minor=3, patch=1, prerelease='')
+VERSION = Version(major=0, minor=3, patch=2, prerelease='')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/scripts/logging_statement_modifier.py 
new/pynvim-0.3.2/scripts/logging_statement_modifier.py
--- old/pynvim-0.3.1/scripts/logging_statement_modifier.py      2018-11-17 
10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/scripts/logging_statement_modifier.py      2019-01-20 
16:22:43.000000000 +0100
@@ -220,7 +220,7 @@
         if num_open == num_closed:
             return (lines[:i+1], lines[i+1:])
 
-    print ''.join(lines)
+    print(''.join(lines))
     raise Exception('parenthesis are mismatched (%d open, %d closed found)' % 
(num_open, num_closed))
 
 def modify_logging(input_fn, output_fn, min_level_value, max_level_value, 
restore, force):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/setup.cfg new/pynvim-0.3.2/setup.cfg
--- old/pynvim-0.3.1/setup.cfg  2018-11-17 10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/setup.cfg  2019-01-20 16:22:43.000000000 +0100
@@ -1,5 +1,5 @@
 [flake8]
-ignore = D211,E731,D401
+ignore = D211,E731,D401,W503
 
 [tool:pytest]
 testpaths = test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/setup.py new/pynvim-0.3.2/setup.py
--- old/pynvim-0.3.1/setup.py   2018-11-17 10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/setup.py   2019-01-20 16:22:43.000000000 +0100
@@ -29,10 +29,10 @@
     install_requires.append('greenlet')
 
 setup(name='pynvim',
-      version='0.3.1',
+      version='0.3.2',
       description='Python client to neovim',
       url='http://github.com/neovim/python-client',
-      
download_url='https://github.com/neovim/python-client/archive/0.3.1.tar.gz',
+      
download_url='https://github.com/neovim/python-client/archive/0.3.2.tar.gz',
       author='Thiago de Arruda',
       author_email='[email protected]',
       license='Apache',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.3.1/test/test_vim.py 
new/pynvim-0.3.2/test/test_vim.py
--- old/pynvim-0.3.1/test/test_vim.py   2018-11-17 10:38:41.000000000 +0100
+++ new/pynvim-0.3.2/test/test_vim.py   2019-01-20 16:22:43.000000000 +0100
@@ -74,6 +74,15 @@
     assert vim.current.line == 'abc'
 
 
+def test_current_line_delete(vim):
+    vim.current.buffer[:] = ['one', 'two']
+    assert len(vim.current.buffer[:]) == 2
+    del vim.current.line
+    assert len(vim.current.buffer[:]) == 1 and vim.current.buffer[0] == 'two'
+    del vim.current.line
+    assert len(vim.current.buffer[:]) == 1 and not vim.current.buffer[0]
+
+
 def test_vars(vim):
     vim.vars['python'] = [1, 2, {'3': 1}]
     assert vim.vars['python'], [1, 2 == {'3': 1}]


Reply via email to