Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-neovim for openSUSE:Factory 
checked in at 2025-09-20 22:04:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-neovim (Old)
 and      /work/SRC/openSUSE:Factory/.python-neovim.new.27445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-neovim"

Sat Sep 20 22:04:19 2025 rev:21 rq:1306068 version:0.6.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-neovim/python-neovim.changes      
2024-12-02 16:59:39.962539659 +0100
+++ /work/SRC/openSUSE:Factory/.python-neovim.new.27445/python-neovim.changes   
2025-09-20 22:04:41.848223896 +0200
@@ -1,0 +2,13 @@
+Thu Sep 18 09:53:43 UTC 2025 - Richard Rahl <[email protected]>
+
+- update to version 0.6.0:
+  * Microoptimize the walk() function
+  * fix: remove the use of asyncio.get_child_watcher() for python3.14
+  * fix: improve EOFError exception when remote nvim crashes
+  * feat: Nvim can detect venv python via "pynvim-python" tool
+- enable tests
+- be more specific in the files section
+- remove python-typing extensions as a dependency, as it's only required
+  if python is lower than 3.12
+
+-------------------------------------------------------------------

Old:
----
  pynvim-0.5.2.tar.gz

New:
----
  pynvim-0.6.0.tar.gz

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

Other differences:
------------------
++++++ python-neovim.spec ++++++
--- /var/tmp/diff_new_pack.Bok2Cx/_old  2025-09-20 22:04:42.520252086 +0200
+++ /var/tmp/diff_new_pack.Bok2Cx/_new  2025-09-20 22:04:42.520252086 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-neovim
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,13 +19,15 @@
 %define modname pynvim
 %{?sle15_python_module_pythons}
 Name:           python-neovim
-Version:        0.5.2
+Version:        0.6.0
 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/%{modname}/archive/%{version}/%{modname}-%{version}.tar.gz
+Source:         %{url}/archive/%{version}/%{modname}-%{version}.tar.gz
+BuildRequires:  %{python_module greenlet}
+BuildRequires:  %{python_module msgpack}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest-timeout}
 BuildRequires:  %{python_module pytest}
@@ -38,13 +40,11 @@
 Requires:       neovim
 Requires:       python-greenlet
 Requires:       python-msgpack
-Requires:       python-typing_extensions
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
 Provides:       python-nvim
 BuildArch:      noarch
-# SECTION test requirements
-BuildRequires:  %{python_module greenlet}
-BuildRequires:  %{python_module msgpack}
-# /SECTION
+
 %python_subpackages
 
 %description
@@ -58,12 +58,23 @@
 
 %install
 %pyproject_install
+%python_clone -a %{buildroot}%{_bindir}/%{modname}-python
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
+%check
+%pytest
+
+%post
+%python_install_alternative %{modname}-python
+
+%postun
+%python_uninstall_alternative %{modname}-python
+
 %files %{python_files}
 %license LICENSE
 %doc README.md
-%{python_sitelib}/neovim
+%python_alternative %{_bindir}/%{modname}-python
 %{python_sitelib}/%{modname}
-%{python_sitelib}/%{modname}-%{version}*-info
+%{python_sitelib}/%{modname}-%{version}.dist-info
+%{python_sitelib}/neovim
 

++++++ pynvim-0.5.2.tar.gz -> pynvim-0.6.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.5.2/.github/workflows/test.yml 
new/pynvim-0.6.0/.github/workflows/test.yml
--- old/pynvim-0.5.2/.github/workflows/test.yml 2024-11-13 04:00:16.000000000 
+0100
+++ new/pynvim-0.6.0/.github/workflows/test.yml 2025-09-07 20:02:09.000000000 
+0200
@@ -27,61 +27,55 @@
     strategy:
       fail-fast: false
       matrix:
-        python-version: ['3.12', '3.11', '3.10', '3.9', '3.8', '3.7']
-        os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
-        exclude:
-          - os: 'ubuntu-latest'
-            python-version: '3.7'
-          - os: 'macos-latest'
-            python-version: '3.7'
-          - os: 'macos-latest'
-            python-version: '3.8'
-          - os: 'macos-latest'
-            python-version: '3.9'
-        include:
-          - os: 'ubuntu-20.04'
-            python-version: '3.7'
-          - os: 'macos-12'
-            python-version: '3.7'
-          - os: 'macos-12'
-            python-version: '3.8'
-          - os: 'macos-12'
-            python-version: '3.9'
-
-    name: "test (python ${{ matrix.python-version }}, ${{ matrix.os }})"
-    runs-on: ${{ matrix.os }}
+        config: [
+          # NOTE: don't forget updating tox.ini
+          { python-version: '3.13', neovim-version: 'nightly' },
+          { python-version: '3.12', neovim-version: 'nightly' },
+          { python-version: '3.12', neovim-version: 'stable' },
+          { python-version: '3.11' },
+          { python-version: '3.10' },
+          # for python 3.7~3.9, use older version of OS (ubuntu-20.04 and 
macos-13)
+          { python-version: '3.9', ubuntu: '20.04', macos: '13' },
+          { python-version: '3.8', ubuntu: '20.04', macos: '13' },
+          { python-version: '3.7', ubuntu: '20.04', macos: '13' },
+        ]
+        os: ['ubuntu', 'macos', 'windows']
+
+    name:
+      test (python ${{ matrix.config.python-version }},
+            ${{ matrix.config.neovim-version || 'nightly' }},
+            ${{ matrix.os }}-${{ matrix.config[matrix.os] || 'latest' }})
+    runs-on: ${{ matrix.os }}-${{ matrix.config[matrix.os] || 'latest' }}
     steps:
     - uses: actions/checkout@v3
     - uses: actions/setup-python@v4
       with:
         cache: 'pip'
-        python-version: ${{ matrix.python-version }}
+        python-version: ${{ matrix.config.python-version }}
 
     - name: install neovim (Linux/macOS)
       if: runner.os != 'Windows'
       run: |
         set -eu -o pipefail
 
-        if [[ "$RUNNER_OS" == "Linux" ]]; then
-          BASE="nvim-linux64"
-        elif [[ "$RUNNER_OS" == "macOS" ]]; then
-          BASE="nvim-macos-x86_64"
-        else
-          echo "$RUNNER_OS not supported"; exit 1;
+        NVIM_OS="$(echo "$RUNNER_OS" | tr '[:upper:]' '[:lower:]')"
+        if ! [ "$NVIM_OS" = "linux" ] && ! [ "$NVIM_OS" = "macos" ]; then
+          echo "RUNNER_OS=${RUNNER_OS} not supported"; exit 1;
         fi
 
-        curl -LO 
"https://github.com/neovim/neovim/releases/download/nightly/${BASE}.tar.gz";
-        tar xzf "${BASE}.tar.gz"
+        NVIM_NAME="nvim-${NVIM_OS}-x86_64"
+        curl -LO "https://github.com/neovim/neovim/releases/download/${{ 
matrix.config.neovim-version || 'nightly' }}/${NVIM_NAME}.tar.gz"
+        tar xzf "${NVIM_NAME}.tar.gz"
         echo "RUNNER_OS = $RUNNER_OS"
-        $BASE/bin/nvim --version
+        "$NVIM_NAME/bin/nvim" --version
 
         # update $PATH for later steps
-        echo "$(pwd)/$BASE/bin" >> $GITHUB_PATH
+        echo "$(pwd)/$NVIM_NAME/bin" >> "$GITHUB_PATH"
 
     - name: install neovim (Windows)
       if: runner.os == 'Windows'
       run: |
-        curl -LO 
"https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.zip";
+        curl -LO "https://github.com/neovim/neovim/releases/download/${{ 
matrix.config.neovim-version || 'nightly' }}/nvim-win64.zip"
         unzip nvim-win64.zip
         nvim-win64/bin/nvim --version
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.5.2/README.md new/pynvim-0.6.0/README.md
--- old/pynvim-0.5.2/README.md  2024-11-13 04:00:16.000000000 +0100
+++ new/pynvim-0.6.0/README.md  2025-09-07 20:02:09.000000000 +0200
@@ -12,17 +12,35 @@
 
 Supports python 3.7 or later.
 
-    pip3 install pynvim
+- Installation option #1: install using uv (recommended):
 
-You can install the package without being root by adding the `--user` flag.
-Anytime you upgrade Neovim, make sure to upgrade pynvim as well:
+  - Install uv (https://docs.astral.sh/uv/).
 
-    pip3 install --upgrade pynvim
+  - Install pynvim (the `--upgrade` switch ensures installation of the latest
+    version):
 
-Alternatively, you can install the development version by cloning this
-repository and executing the following at the top level:
+        uv tool install --upgrade pynvim
 
-    pip3 install .
+  - Anytime you upgrade Neovim, make sure to upgrade pynvim as well by
+    re-running the above command.
+
+- Installation option #2: install using pipx:
+
+  - Install pipx (https://pipx.pypa.io/stable/).
+
+  - Install pynvim (the `--upgrade` switch ensures installation of the latest
+    version):
+
+        pipx install --upgrade pynvim
+
+  - Anytime you upgrade Neovim, make sure to upgrade pynvim as well by
+    re-running the above command.
+
+- Other installation options:
+
+  - See [pynvim installation
+    documentation](https://pynvim.readthedocs.io/en/latest/installation.html)
+    for additional installation options and information.
 
 Python Plugin API
 -----------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.5.2/docs/installation.rst 
new/pynvim-0.6.0/docs/installation.rst
--- old/pynvim-0.5.2/docs/installation.rst      2024-11-13 04:00:16.000000000 
+0100
+++ new/pynvim-0.6.0/docs/installation.rst      2025-09-07 20:02:09.000000000 
+0200
@@ -3,17 +3,63 @@
 
 The Neovim Python client supports Python 3.7 or later.
 
-Using pip
----------
+Using uv or pipx
+----------------
 
-You can install the package without being root by adding the ``--user`` flag::
+For automatic detection by Neovim, pynvim should be installed in a dedicated
+Python virtual environment and the ``pynvim-python`` executable should be 
placed
+on the ``PATH``.  The recommended approach for this is to use a tool like uv
+(https://docs.astral.sh/uv/) or pipx (https://pipx.pypa.io/stable/); the
+``--upgrade`` switch ensures installation of the latest version:
 
-    pip3 install --user pynvim
+- Install using uv (recommended)::
 
-If you follow Neovim HEAD, make sure to upgrade ``pynvim`` when you upgrade
-Neovim::
+    uv tool install --upgrade pynvim
 
-    pip3 install --upgrade pynvim
+- Install using pipx::
+
+    pipx install --upgrade pynvim
+
+**NOTE** For Neovim before v0.12.0, set the variable ``python3_host_prog`` in
+``init.vim`` to point to ``pynvim-python``::
+
+    let g:python3_host_prog = 'pynvim-python'
+
+Using manually created Python virtual environment
+-------------------------------------------------
+
+Alternatively, you may manually create a Python virtual environment
+(https://docs.python.org/3.13/library/venv.html)::
+
+    python3 -m venv pynvim-venv
+
+Then install pynvim into the virtual environment; the
+``--upgrade`` switch ensures installation of the latest version::
+
+- For Unix::
+
+    pynvim-venv/bin/python -m pip install --upgrade pynvim
+
+- For Windows::
+
+    pynvim-venv\Scripts\python -m pip install --upgrade pynvim
+
+Then copy the ``pynvim-python`` executable somewhere on the ``PATH``:
+
+- For Unix::
+
+    # Assuming `~/.local/bin` is on `PATH`:
+    cp pynvim-venv/bin/pynvim-python ~/.local/bin/pynvim-python
+
+- For Windows::
+
+    REM Assuming `C:\apps` is on `PATH`:
+    copy pynvim-venv\Scripts\pynvim-python.exe C:\apps\pynvim-python.exe
+
+**NOTE** For Neovim before v0.12.0, set the variable ``python3_host_prog`` in
+``init.vim`` to point to ``pynvim-python``::
+
+    let g:python3_host_prog = 'pynvim-python'
 
 Install from source
 -------------------
@@ -23,6 +69,70 @@
     git clone https://github.com/neovim/pynvim.git
     cd pynvim
 
-Now you can install it on your system::
+Now you can install it following the instructions above, using ``.`` instead of
+``pynvim``; the ``--upgrade`` switch ensures installation of the latest 
version:
+
+- Install from source using uv::
+
+    uv tool install --upgrade .
+
+- Install from source using pipx::
+
+    pipx install --upgrade .
+
+- Install from source using manually created Python virtual environment:
+
+  - Create ``pynvim-venv`` as above.
+
+  - Install:
+
+    - For Unix::
+
+        pynvim-venv/bin/python -m pip install --upgrade .
+
+    - For Windows::
+
+        pynvim-venv\Scripts\python -m pip install --upgrade .
+
+  - Copy ``pynvim-python`` executable as above.
+
+**NOTE** For Neovim before v0.12.0, set the variable ``python3_host_prog`` in
+``init.vim`` to point to ``pynvim-python``::
+
+    let g:python3_host_prog = 'pynvim-python'
+
+Upgrade pynvim when upgrading Neovim
+------------------------------------
+
+Make sure to upgrade ``pynvim`` when you upgrade Neovim.  Follow the previous
+instructions; the ``--upgrade`` switch will ensure installation of the latest
+version.
+
+Explicitly choosing pynvim virtual environment
+----------------------------------------------
+
+As an alternative to exposing ``pynvim-python`` on ``PATH``, you may configure
+Neovim to use a specific Python interpreter that has pynvim installed; this may
+be useful when working on pynvim itself.
+
+After installing into a virtual environment named ``pynvim-venv``, add the
+following into Neovim's ``init.vim`` file:
+
+- For Unix::
+
+      let g:python3_host_prog = '/path/to/pynvim-venv/bin/python'
+
+- For Windows::
+
+      let g:python3_host_prog = 'c:\path\to\pynvim-venv\bin\python.exe'
+
+Installing outside of a virtual environment is deprecated
+---------------------------------------------------------
+
+Installing into the per-user Python site package area is a deprecated practice
+with recent Python versions.  For example, the following command fails on 
Ubuntu
+24.04 with the error message ``error: externally-managed-environment``::
+
+    pip install --user pynvim
 
-    pip3 install .
+Instead, always install into a virtual environment.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.5.2/dummy/setup.py 
new/pynvim-0.6.0/dummy/setup.py
--- old/pynvim-0.5.2/dummy/setup.py     2024-11-13 04:00:16.000000000 +0100
+++ new/pynvim-0.6.0/dummy/setup.py     1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-from setuptools import setup
-
-setup(name='neovim',
-      version='0.3.1',
-      description='Transition packgage for pynvim',
-      url='http://github.com/neovim/python-client',
-      author='Thiago de Arruda',
-      author_email='[email protected]',
-      license='Apache',
-      packages=[],
-      install_requires=['pynvim>=0.3.1'],
-      zip_safe=False)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.5.2/pynvim/_version.py 
new/pynvim-0.6.0/pynvim/_version.py
--- old/pynvim-0.5.2/pynvim/_version.py 2024-11-13 04:00:16.000000000 +0100
+++ new/pynvim-0.6.0/pynvim/_version.py 2025-09-07 20:02:09.000000000 +0200
@@ -4,7 +4,7 @@
 from types import SimpleNamespace
 
 # see also setup.py
-VERSION = SimpleNamespace(major=0, minor=5, patch=2, prerelease="")
+VERSION = SimpleNamespace(major=0, minor=6, patch=0, prerelease="")
 
 # e.g. "0.5.0", "0.5.0.dev0" (PEP-440)
 __version__ = '{major}.{minor}.{patch}'.format(**vars(VERSION))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.5.2/pynvim/api/common.py 
new/pynvim-0.6.0/pynvim/api/common.py
--- old/pynvim-0.5.2/pynvim/api/common.py       2024-11-13 04:00:16.000000000 
+0100
+++ new/pynvim-0.6.0/pynvim/api/common.py       2025-09-07 20:02:09.000000000 
+0200
@@ -241,11 +241,15 @@
     return obj
 
 
-def walk(fn: Callable[..., Any], obj: Any, *args: Any, **kwargs: Any) -> Any:
-    """Recursively walk an object graph applying `fn`/`args` to objects."""
-    if type(obj) in [list, tuple]:
-        return list(walk(fn, o, *args) for o in obj)
-    if type(obj) is dict:
-        return dict((walk(fn, k, *args), walk(fn, v, *args)) for k, v in
-                    obj.items())
-    return fn(obj, *args, **kwargs)
+def walk(fn: Callable[[Any], Any], obj: Any) -> Any:
+    """Recursively walk an object graph applying `fn` to objects."""
+
+    # Note: this function is very hot, so it is worth being careful
+    # about performance.
+    type_ = type(obj)
+
+    if type_ is list or type_ is tuple:
+        return [walk(fn, o) for o in obj]
+    if type_ is dict:
+        return {walk(fn, k): walk(fn, v) for k, v in obj.items()}
+    return fn(obj)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.5.2/pynvim/api/nvim.py 
new/pynvim-0.6.0/pynvim/api/nvim.py
--- old/pynvim-0.5.2/pynvim/api/nvim.py 2024-11-13 04:00:16.000000000 +0100
+++ new/pynvim-0.6.0/pynvim/api/nvim.py 2025-09-07 20:02:09.000000000 +0200
@@ -209,7 +209,7 @@
         decode = kwargs.pop('decode', self._decode)
         args = walk(self._to_nvim, args)
         res = self._session.request(name, *args, **kwargs)
-        return walk(self._from_nvim, res, decode=decode)
+        return walk(partial(self._from_nvim, decode=decode), res)
 
     def next_message(self) -> Any:
         """Block until a message(request or notification) is available.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pynvim-0.5.2/pynvim/msgpack_rpc/event_loop/asyncio.py 
new/pynvim-0.6.0/pynvim/msgpack_rpc/event_loop/asyncio.py
--- old/pynvim-0.5.2/pynvim/msgpack_rpc/event_loop/asyncio.py   2024-11-13 
04:00:16.000000000 +0100
+++ new/pynvim-0.6.0/pynvim/msgpack_rpc/event_loop/asyncio.py   2025-09-07 
20:02:09.000000000 +0200
@@ -47,13 +47,14 @@
     @override
     def connection_made(self, transport):
         """Used to signal `asyncio.Protocol` of a successful connection."""
-        del transport  # no-op
+        self._transport = transport
 
     @override
     def connection_lost(self, exc: Optional[Exception]) -> None:
         """Used to signal `asyncio.Protocol` of a lost connection."""
-        debug(f"connection_lost: exc = {exc}")
-        self._on_error(exc if exc else EOFError())
+        warn(f"connection_lost: exc = {exc}")
+
+        self._on_error(exc if exc else EOFError("connection_lost"))
 
     @override
     def data_received(self, data: bytes) -> None:
@@ -63,11 +64,19 @@
     @override
     def pipe_connection_lost(self, fd: int, exc: Optional[Exception]) -> None:
         """Used to signal `asyncio.SubprocessProtocol` of a lost connection."""
-        debug("pipe_connection_lost: fd = %s, exc = %s", fd, exc)
+
+        assert isinstance(self._transport, asyncio.SubprocessTransport)
+        debug_info = {'fd': fd, 'exc': exc, 'pid': self._transport.get_pid()}
+        warn(f"pipe_connection_lost {debug_info}")
+
         if os.name == 'nt' and fd == 2:  # stderr
             # On windows, ignore piped stderr being closed immediately (#505)
             return
-        self._on_error(exc if exc else EOFError())
+
+        # pipe_connection_lost() *may* be called before process_exited() is
+        # called, when a Nvim subprocess crashes (SIGABRT). Do not handle
+        # errors here, as errors will be handled somewhere else
+        # self._on_error(exc if exc else EOFError("pipe_connection_lost"))
 
     @override
     def pipe_data_received(self, fd, data):
@@ -81,8 +90,13 @@
     @override
     def process_exited(self) -> None:
         """Used to signal `asyncio.SubprocessProtocol` when the child exits."""
-        debug("process_exited")
-        self._on_error(EOFError())
+        assert isinstance(self._transport, asyncio.SubprocessTransport)
+        pid = self._transport.get_pid()
+        return_code = self._transport.get_returncode()
+
+        warn("process_exited, pid = %s, return_code = %s", pid, return_code)
+        err = EOFError(f"process_exited: pid = {pid}, return_code = 
{return_code}")
+        self._on_error(err)
 
 
 class AsyncioEventLoop(BaseEventLoop):
@@ -188,10 +202,20 @@
 
     @override
     def _connect_child(self, argv: List[str]) -> None:
+        def get_child_watcher():
+            try:
+                return asyncio.get_child_watcher()
+            except AttributeError:  # Python 3.14
+                return None
+
+            return None
+
         if os.name != 'nt':
             # see #238, #241
-            self._child_watcher = asyncio.get_child_watcher()
-            self._child_watcher.attach_loop(self._loop)
+            watcher = get_child_watcher()
+            if watcher is not None:
+                watcher.attach_loop(self._loop)
+                self._child_watcher = watcher
 
         async def create_subprocess():
             transport: asyncio.SubprocessTransport  # type: ignore
@@ -250,7 +274,8 @@
             # Windows: for ProactorBasePipeTransport, close() doesn't take in
             # effect immediately (closing happens asynchronously inside the
             # event loop), need to wait a bit for completing graceful shutdown.
-            if os.name == 'nt' and hasattr(transport, '_sock'):
+            if (sys.version_info < (3, 13) and
+                    os.name == 'nt' and hasattr(transport, '_sock')):
                 async def wait_until_closed():
                     # pylint: disable-next=protected-access
                     while transport._sock is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.5.2/pynvim/msgpack_rpc/event_loop/base.py 
new/pynvim-0.6.0/pynvim/msgpack_rpc/event_loop/base.py
--- old/pynvim-0.5.2/pynvim/msgpack_rpc/event_loop/base.py      2024-11-13 
04:00:16.000000000 +0100
+++ new/pynvim-0.6.0/pynvim/msgpack_rpc/event_loop/base.py      2025-09-07 
20:02:09.000000000 +0200
@@ -194,6 +194,13 @@
             signal.signal(signal.SIGINT, default_int_handler)
         self._on_data = None
 
+        # eventloop was stopped due to an error, re-raise it
+        # (e.g. connection lost when subprocess nvim dies)
+        if self._error:
+            # Note: traceback is not preserved and attached for some reason,
+            # should be somewhere from msgpack_rpc.event_loop.asyncio.Protocol
+            raise self._error
+
     @abstractmethod
     def _run(self) -> None:
         raise NotImplementedError()
@@ -234,8 +241,11 @@
         self.stop()
 
     def _on_error(self, exc: Exception) -> None:
-        debug(str(exc))
-        self._error = exc
+        warn('on_error: %s', repr(exc))
+        if self._error is None:
+            # ignore subsequent exceptions, it's enough to raise only
+            # the first exception arrived
+            self._error = exc
         self.stop()
 
     def _on_interrupt(self) -> None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.5.2/pynvim/plugin/host.py 
new/pynvim-0.6.0/pynvim/plugin/host.py
--- old/pynvim-0.5.2/pynvim/plugin/host.py      2024-11-13 04:00:16.000000000 
+0100
+++ new/pynvim-0.6.0/pynvim/plugin/host.py      2025-09-07 20:02:09.000000000 
+0200
@@ -112,7 +112,7 @@
 
     def _wrap_function(self, fn, sync, decode, nvim_bind, name, *args):
         if decode:
-            args = walk(decode_if_bytes, args, decode)
+            args = walk(partial(decode_if_bytes, mode=decode), args)
         if nvim_bind is not None:
             args.insert(0, nvim_bind)
         try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.5.2/pynvim/python.py 
new/pynvim-0.6.0/pynvim/python.py
--- old/pynvim-0.5.2/pynvim/python.py   1970-01-01 01:00:00.000000000 +0100
+++ new/pynvim-0.6.0/pynvim/python.py   2025-09-07 20:02:09.000000000 +0200
@@ -0,0 +1,28 @@
+"""Wrapper to expose the Python interpreter as `pynvim-python`.
+
+`setup.py` declares an entry point for the `main()` function below. When
+`pynvim` is installed, an executable named `pynvim-python` will be generated
+that will invoke `main()` below; that function then simply chains to the
+underlying Python interpreter, passing along all command-line arguments.
+
+The intent is to have `pynvim-python` be on the `PATH` such that an invocation
+such as:
+
+    pynvim-python -c 'import pynvim'
+
+is equivalent to explicitly running the correct Python interpreter where
+`pynvim` is installed:
+
+    /path/to/python -c 'import pynvim'
+
+This allows Neovim to automatically detect the correct Python interpreter for
+use with `pynvim`.
+"""
+
+import subprocess
+import sys
+
+
+def main() -> None:
+    """Chain to Python interpreter, passing all command-line args."""
+    subprocess.run([sys.executable] + sys.argv[1:])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.5.2/setup.py new/pynvim-0.6.0/setup.py
--- old/pynvim-0.5.2/setup.py   2024-11-13 04:00:16.000000000 +0100
+++ new/pynvim-0.6.0/setup.py   2025-09-07 20:02:09.000000000 +0200
@@ -9,7 +9,7 @@
 from setuptools import setup
 
 install_requires = [
-    'msgpack>=0.5.0',
+    'msgpack>=1.0.0',
     'greenlet>=3.0; python_implementation != "PyPy"',
     'typing-extensions>=4.5; python_version < "3.12"',
 ]
@@ -58,4 +58,9 @@
       setup_requires=setup_requires,
       tests_require=tests_require,
       extras_require=extras_require,
+      entry_points={
+              'console_scripts': [
+                  'pynvim-python=pynvim.python:main',
+              ],
+          },
       )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.5.2/test/test_attach.py 
new/pynvim-0.6.0/test/test_attach.py
--- old/pynvim-0.5.2/test/test_attach.py        2024-11-13 04:00:16.000000000 
+0100
+++ new/pynvim-0.6.0/test/test_attach.py        2025-09-07 20:02:09.000000000 
+0200
@@ -125,7 +125,7 @@
     ])
     # see :help jobstart(), *jobstart-options* |msgpack-rpc|
     jobid = vim.funcs.jobstart([
-        'python', '-c', remote_py_code,
+        'python3', '-c', remote_py_code,
     ], {'rpc': True, 'on_stderr': 'OutputHandler'})
     assert jobid > 0
     exitcode = vim.funcs.jobwait([jobid], 500)[0]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.5.2/test/test_events.py 
new/pynvim-0.6.0/test/test_events.py
--- old/pynvim-0.5.2/test/test_events.py        2024-11-13 04:00:16.000000000 
+0100
+++ new/pynvim-0.6.0/test/test_events.py        2025-09-07 20:02:09.000000000 
+0200
@@ -1,4 +1,5 @@
-# -*- coding: utf-8 -*-
+import pytest
+
 from pynvim.api import Nvim
 
 
@@ -37,6 +38,10 @@
 
 
 def test_broadcast(vim: Nvim) -> None:
+    if (vim.version.major, vim.version.minor) < (0, 11):
+        # see #570, neovim/neovim#28487
+        pytest.skip("neovim/neovim#28487")
+
     vim.command('call rpcnotify(0, "event1", 1, 2, 3)')
     vim.command('call rpcnotify(0, "event2", 4, 5, 6)')
     vim.command('call rpcnotify(0, "event2", 7, 8, 9)')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.5.2/test/test_window.py 
new/pynvim-0.6.0/test/test_window.py
--- old/pynvim-0.5.2/test/test_window.py        2024-11-13 04:00:16.000000000 
+0100
+++ new/pynvim-0.6.0/test/test_window.py        2025-09-07 20:02:09.000000000 
+0200
@@ -61,10 +61,11 @@
 def test_options(vim: Nvim) -> None:
     vim.current.window.options['colorcolumn'] = '4,3'
     assert vim.current.window.options['colorcolumn'] == '4,3'
+    old_global_statusline = vim.options['statusline']
     # global-local option
     vim.current.window.options['statusline'] = 'window-status'
     assert vim.current.window.options['statusline'] == 'window-status'
-    assert vim.options['statusline'] == ''
+    assert vim.options['statusline'] == old_global_statusline
 
     with pytest.raises(KeyError) as excinfo:
         vim.current.window.options['doesnotexist']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pynvim-0.5.2/tox.ini new/pynvim-0.6.0/tox.ini
--- old/pynvim-0.5.2/tox.ini    2024-11-13 04:00:16.000000000 +0100
+++ new/pynvim-0.6.0/tox.ini    2025-09-07 20:02:09.000000000 +0200
@@ -4,7 +4,7 @@
 [tox]
 min_version = 4.0
 envlist =
-  py{37,38,39,310,311,312}-asyncio
+  py{37,38,39,310,311,312,313}-asyncio
   checkqa
 skip_missing_interpreters =
   true
@@ -18,6 +18,7 @@
   3.10: py310
   3.11: py311
   3.12: py312
+  3.13: py313
   pypy3: pypy3
 
 [testenv]

Reply via email to