summaryrefslogtreecommitdiff
path: root/dev-python/pynvim
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2025-05-30 07:01:36 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2025-05-30 07:01:36 +0000
commit216687eabe1b7cfafd62452784bb1ba4abe7a3d2 (patch)
tree97c9d0b8dce982ab7883962098c54f77a19c6afd /dev-python/pynvim
parent5e57d2b387148ab942c22849d50e0e660168bf58 (diff)
downloadbaldeagleos-repo-216687eabe1b7cfafd62452784bb1ba4abe7a3d2.tar.gz
baldeagleos-repo-216687eabe1b7cfafd62452784bb1ba4abe7a3d2.tar.xz
baldeagleos-repo-216687eabe1b7cfafd62452784bb1ba4abe7a3d2.zip
Adding metadata
Diffstat (limited to 'dev-python/pynvim')
-rw-r--r--dev-python/pynvim/files/pynvim-0.5.2-py314.patch51
-rw-r--r--dev-python/pynvim/pynvim-0.5.2-r1.ebuild56
2 files changed, 107 insertions, 0 deletions
diff --git a/dev-python/pynvim/files/pynvim-0.5.2-py314.patch b/dev-python/pynvim/files/pynvim-0.5.2-py314.patch
new file mode 100644
index 000000000000..1bd0d1d90e72
--- /dev/null
+++ b/dev-python/pynvim/files/pynvim-0.5.2-py314.patch
@@ -0,0 +1,51 @@
+https://github.com/neovim/pynvim/commit/e2a3ead549f91bc5f5a157660be7a29e0bc9f728
+
+From e2a3ead549f91bc5f5a157660be7a29e0bc9f728 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn@cryptomilk.org>
+Date: Mon, 13 Jan 2025 09:43:32 +0100
+Subject: [PATCH] fix: asyncio.get_child_watcher() was removed in Python 3.14
+ #584
+
+Fixes #583
+---
+ pynvim/msgpack_rpc/event_loop/asyncio.py | 17 ++++++++++++++---
+ 1 file changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/pynvim/msgpack_rpc/event_loop/asyncio.py b/pynvim/msgpack_rpc/event_loop/asyncio.py
+index cb17f321..d4ad1413 100644
+--- a/pynvim/msgpack_rpc/event_loop/asyncio.py
++++ b/pynvim/msgpack_rpc/event_loop/asyncio.py
+@@ -188,10 +188,20 @@ async def connect_stdout():
+
+ @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 +260,8 @@ def _close_transport(transport):
+ # 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 --git a/dev-python/pynvim/pynvim-0.5.2-r1.ebuild b/dev-python/pynvim/pynvim-0.5.2-r1.ebuild
new file mode 100644
index 000000000000..df142895d8da
--- /dev/null
+++ b/dev-python/pynvim/pynvim-0.5.2-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9,10,11,12,13} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="Python client for Neovim"
+HOMEPAGE="
+ https://github.com/neovim/pynvim/
+ https://pypi.org/project/pynvim/
+"
+SRC_URI="
+ https://github.com/neovim/pynvim/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+RDEPEND="
+ dev-python/msgpack[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ >=dev-python/greenlet-3.0[${PYTHON_USEDEP}]
+ ' 'python*')
+ $(python_gen_cond_dep '
+ >=dev-python/typing-extensions-4.5[${PYTHON_USEDEP}]
+ ' 3.11)
+"
+BDEPEND="
+ test? (
+ app-editors/neovim
+ dev-python/pytest-timeout[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.5.2-py314.patch
+)
+
+: ${EPYTEST_TIMEOUT:=5}
+distutils_enable_tests pytest
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # hangs
+ test/test_events.py::test_broadcast
+ )
+
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest
+}