mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-06 02:17:34 -08:00
dev-python/pynvim: enable py3.14, fix typing-extensions dep
I don't think we need typing-extensions for 3.12. See also
a2adeecbb7
upstream?
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
parent
638430c413
commit
86a33e7222
51
dev-python/pynvim/files/pynvim-0.5.2-py314.patch
Normal file
51
dev-python/pynvim/files/pynvim-0.5.2-py314.patch
Normal file
@ -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:
|
||||||
|
|
||||||
56
dev-python/pynvim/pynvim-0.5.2-r1.ebuild
Normal file
56
dev-python/pynvim/pynvim-0.5.2-r1.ebuild
Normal file
@ -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_{11..14} pypy3_11 )
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user