Bug#945605: python-neovim: autopkgtest needs update for new version of neovim: Invalid option name: 'listchars'

2019-12-17 Thread Sebastien Bacher
tags 945605 patch
user ubuntu-de...@lists.ubuntu.com
usertags 945605 origin-ubuntu focal ubuntu-patch

thank you

The attached patch fixes the issue by backporting 2 commits from upstream

diff -Nru python-neovim-0.3.0/debian/changelog python-neovim-0.3.0/debian/changelog
--- python-neovim-0.3.0/debian/changelog	2019-01-08 15:27:39.0 +0100
+++ python-neovim-0.3.0/debian/changelog	2019-12-17 16:18:21.0 +0100
@@ -1,3 +1,11 @@
+python-neovim (0.3.0-2) UNRELEASED; urgency=medium
+
+  * debian/patches/git_options_handling.patch:
+- backported some upstream patches to make the test work with the
+  new neovim version (Closes: #945605 )
+
+ -- Sebastien Bacher   Tue, 17 Dec 2019 16:17:10 +0100
+
 python-neovim (0.3.0-1) unstable; urgency=medium
 
   * New upstream version 0.3.0
diff -Nru python-neovim-0.3.0/debian/patches/git_options_handling.patch python-neovim-0.3.0/debian/patches/git_options_handling.patch
--- python-neovim-0.3.0/debian/patches/git_options_handling.patch	1970-01-01 01:00:00.0 +0100
+++ python-neovim-0.3.0/debian/patches/git_options_handling.patch	2019-12-17 16:16:24.0 +0100
@@ -0,0 +1,26 @@
+# Description: backport some upstream fixes for the new neovim
+# https://github.com/neovim/pynvim/commit/5a329f22
+# https://github.com/neovim/pynvim/commit/1d121e08
+Index: python-neovim-0.3.0/test/test_vim.py
+===
+--- python-neovim-0.3.0.orig/test/test_vim.py
 python-neovim-0.3.0/test/test_vim.py
+@@ -81,9 +81,15 @@ def test_vars(vim):
+ 
+ 
+ def test_options(vim):
+-assert vim.options['listchars'] == 'tab:> ,trail:-,nbsp:+'
+-vim.options['listchars'] = 'tab:xy'
+-assert vim.options['listchars'] == 'tab:xy'
++assert vim.options['background'] == 'dark'
++vim.options['background'] = 'light'
++assert vim.options['background'] == 'light'
++
++
++def test_local_options(vim):
++assert vim.windows[0].options['foldmethod'] == 'manual'
++vim.windows[0].options['foldmethod'] = 'syntax'
++assert vim.windows[0].options['foldmethod'] == 'syntax'
+ 
+ 
+ def test_buffers(vim):
diff -Nru python-neovim-0.3.0/debian/patches/series python-neovim-0.3.0/debian/patches/series
--- python-neovim-0.3.0/debian/patches/series	2019-01-08 14:50:30.0 +0100
+++ python-neovim-0.3.0/debian/patches/series	2019-12-17 16:15:02.0 +0100
@@ -1 +1,2 @@
 0001-Add-missing-conftest.py-in-sdist.patch
+git_options_handling.patch


Bug#945605: python-neovim: autopkgtest needs update for new version of neovim: Invalid option name: 'listchars'

2019-11-27 Thread Paul Gevers
Source: python-neovim
Version: 0.3.0-1
Severity: serious
X-Debbugs-CC: debian...@lists.debian.org, neo...@packages.debian.org
Tags: sid bullseye
User: debian...@lists.debian.org
Usertags: needs-update
Control: affects -1 src:neovim

Dear maintainers,

With a recent upload of neovim the autopkgtest of python-neovim fails in
testing when that autopkgtest is run with the binary packages of neovim
from unstable. It passes when run with only packages from testing. In
tabular form:
   passfail
neovim from testing0.4.3-2
python-neovim  from testing0.3.0-1
versioned deps [0] from testingfrom unstable
all others from testingfrom testing

I copied some of the output at the bottom of this report.

Currently this regression is blocking the migration of neovim to testing
[1]. Of course, neovim shouldn't just break your autopkgtest (or even
worse, your package), but it seems to me that the change in neovim was
intended and your package needs to update to the new situation.

If this is a real problem in your package (and not only in your
autopkgtest), the right binary package(s) from neovim should really add
a versioned Breaks on the unfixed version of (one of your) package(s).
Note: the Breaks is nice even if the issue is only in the autopkgtest as
it helps the migration software to figure out the right versions to
combine in the tests.

More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[0] You can see what packages were added from the second line of the log
file quoted below. The migration software adds source package from
unstable to the list if they are needed to install packages from
neovim/0.4.3-2. I.e. due to versioned dependencies or breaks/conflicts.
[1] https://qa.debian.org/excuses.php?package=neovim

https://ci.debian.net/data/autopkgtest/testing/amd64/p/python-neovim/3517661/log.gz

=== FAILURES
===
_ test_options
_

vim = 

def test_options(vim):
>   assert vim.options['listchars'] == 'tab:> ,trail:-,nbsp:+'

test/test_vim.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
/usr/lib/python3/dist-packages/neovim/api/common.py:88: in __getitem__
return self._get(key)
/usr/lib/python3/dist-packages/neovim/api/nvim.py:180: in request
res = self._session.request(name, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _

self = 
method = 'nvim_get_option', args = ('listchars',), kwargs = {}, async_ =
False
v = [[1, b"Invalid option name: 'listchars'"], None]
err = [1, b"Invalid option name: 'listchars'"], rv = None

def request(self, method, *args, **kwargs):
"""Send a msgpack-rpc request and block until as response is
received.

If the event loop is running, this method must have been called by a
request or notification handler running on a greenlet. In that case,
send the quest and yield to the parent greenlet until a response is
available.

When the event loop is not running, it will perform a blocking
request
like this:
- Send the request
- Run the loop until the response is available
- Put requests/notifications received while waiting into a queue

If the `async_` flag is present and True, a asynchronous
notification
is sent instead. This will never block, and the return value or
error
is ignored.
"""
async_ = check_async(kwargs.pop('async_', None), kwargs, False)
if async_:
self._async_session.notify(method, args)
return

if kwargs:
raise ValueError("request got unsupported keyword
argument(s): {}"
 .format(', '.join(kwargs.keys(

if self._is_running:
v = self._yielding_request(method, args)
else:
v = self._blocking_request(method, args)
if not v:
# EOF
raise IOError('EOF')
err, rv = v
if err:
info("'Received error: %s", err)
>   raise self.error_wrapper(err)
E   neovim.api.nvim.NvimError: b"Invalid option name: 'listchars'"



signature.asc
Description: OpenPGP digital signature