Bug 2336888 - python-neovim fails to build with Python 3.14: ImportError: cannot import name 'ThreadedChildWatcher' from 'asyncio.unix_events' (/usr/lib64/python3.14/asyncio/unix_events.py)
Summary: python-neovim fails to build with Python 3.14: ImportError: cannot import nam...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: python-neovim
Version: 42
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andreas Schneider
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2025-01-10 09:29 UTC by Karolina Surma
Modified: 2025-08-27 14:28 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-08-27 14:28:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2025-01-10 09:29:37 UTC
python-neovim fails to build with Python 3.14.0a3.

+ /usr/bin/python3 -m tox --current-env -q --recreate -e py314 run -- -k 'not test_broadcast'
ImportError while loading conftest '/builddir/build/BUILD/python-neovim-0.5.2-build/pynvim-0.5.2/test/conftest.py'.
test/conftest.py:11: in <module>
    import pynvim
pynvim/__init__.py:13: in <module>
    from pynvim.msgpack_rpc import (ErrorResponse, Session, TTransportType,
pynvim/msgpack_rpc/__init__.py:9: in <module>
    from pynvim.msgpack_rpc.async_session import AsyncSession
pynvim/msgpack_rpc/async_session.py:6: in <module>
    from pynvim.msgpack_rpc.msgpack_stream import MsgpackStream
pynvim/msgpack_rpc/msgpack_stream.py:7: in <module>
    from pynvim.msgpack_rpc.event_loop.base import BaseEventLoop
pynvim/msgpack_rpc/event_loop/__init__.py:6: in <module>
    from pynvim.msgpack_rpc.event_loop.asyncio import AsyncioEventLoop as EventLoop
pynvim/msgpack_rpc/event_loop/asyncio.py:12: in <module>
    from asyncio.unix_events import ThreadedChildWatcher
E   ImportError: cannot import name 'ThreadedChildWatcher' from 'asyncio.unix_events' (/usr/lib64/python3.14/asyncio/unix_events.py)

https://docs.python.org/3.14/whatsnew/3.14.html says:
Remove the following classes and functions. They were all deprecated and emitted deprecation warnings since Python 3.12:

    asyncio.get_child_watcher()
    asyncio.set_child_watcher()
    asyncio.AbstractEventLoopPolicy.get_child_watcher()
    asyncio.AbstractEventLoopPolicy.set_child_watcher()
    asyncio.AbstractChildWatcher
    asyncio.FastChildWatcher
    asyncio.MultiLoopChildWatcher
    asyncio.PidfdChildWatcher
    asyncio.SafeChildWatcher
    asyncio.ThreadedChildWatcher
(Contributed by Kumar Aditya in gh-120804.)

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08480240-python-neovim/

For all our attempts to build python-neovim with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-neovim/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Aoife Moloney 2025-02-26 13:22:01 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 2 Karolina Surma 2025-08-27 14:28:13 UTC
python-neovim-0.5.2-7.fc43 built successfully.


Note You need to log in before you can comment on or make changes to this bug.