Skip to content

Commit 99ae59f

Browse files
authored
fix: deprecation warning for Python 3.12 #609
get_child_watcher is deprecated in Python 3.12. pynvim on Python 3.12+ on Linux seems to run fine without it.
1 parent 026c06e commit 99ae59f

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

pynvim/msgpack_rpc/event_loop/asyncio.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,9 @@ async def connect_stdout():
203203
@override
204204
def _connect_child(self, argv: List[str]) -> None:
205205
def get_child_watcher():
206-
try:
207-
return asyncio.get_child_watcher()
208-
except AttributeError: # Python 3.14
206+
if sys.version_info >= (3, 12):
209207
return None
210-
211-
return None
208+
return asyncio.get_child_watcher()
212209

213210
if os.name != 'nt':
214211
# see #238, #241

0 commit comments

Comments
 (0)