Bug 2326224

Summary: python-neovim fails to build with Python 3.14: AttributeError: module 'asyncio' has no attribute 'get_child_watcher'
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-neovimAssignee: Andreas Schneider <asn>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: asn, ksurma, mhroncok, michel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-neovim-0.5.2-2.fc42 python-neovim-0.5.2-2.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-03 08:22:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2322407    

Description Karolina Surma 2024-11-14 12:54:32 UTC
python-neovim fails to build with Python 3.14.0a1.

71 test errors like this one:

_________________________ ERROR at setup of test_repr __________________________

    @pytest.fixture
    def vim() -> Generator[pynvim.Nvim, None, None]:
        """Create an embedded, sub-process Nvim fixture instance."""
        editor: pynvim.Nvim
    
        child_argv = os.environ.get('NVIM_CHILD_ARGV')
        listen_address = os.environ.get('NVIM_LISTEN_ADDRESS')
        if child_argv is None and listen_address is None:
            child_argv = json.dumps([
                "nvim",
                "--clean",  # no config and plugins (-u NONE), no SHADA
                "-n",  # no swap file
                "--embed",
                "--headless",
                # Always use the same exact python executable regardless of $PATH
                "--cmd", f"let g:python3_host_prog='{sys.executable}'",
            ])
    
        if child_argv is not None:
>           editor = pynvim.attach('child', argv=json.loads(child_argv))

test/conftest.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pynvim/__init__.py:144: in attach
    child_session(cast(List[str], argv)) if session_type == 'child' else
pynvim/msgpack_rpc/__init__.py:49: in child_session
    return session('child', argv)
pynvim/msgpack_rpc/__init__.py:23: in session
    loop = EventLoop(transport_type, *args, **kwargs)
pynvim/msgpack_rpc/event_loop/base.py:107: in __init__
    raise e
pynvim/msgpack_rpc/event_loop/base.py:104: in __init__
    getattr(self, '_connect_{}'.format(transport_type))(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pynvim.msgpack_rpc.event_loop.asyncio.AsyncioEventLoop object at 0x7fef25f610d0>
argv = ['nvim', '--clean', '-n', '--embed', '--headless', '--cmd', ...]

    def _connect_child(self, argv: List[str]) -> None:
        if os.name != 'nt':
>           self._child_watcher = asyncio.get_child_watcher()
E           AttributeError: module 'asyncio' has no attribute 'get_child_watcher'


https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08257926-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 Fedora Update System 2025-01-03 08:18:27 UTC
FEDORA-2025-505eecf187 (python-neovim-0.5.2-2.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-505eecf187

Comment 2 Fedora Update System 2025-01-03 08:22:51 UTC
FEDORA-2025-505eecf187 (python-neovim-0.5.2-2.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 3 Fedora Update System 2025-01-03 08:30:43 UTC
FEDORA-2025-f6719e1c8f (python-neovim-0.5.2-2.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-f6719e1c8f

Comment 4 Fedora Update System 2025-01-04 02:40:54 UTC
FEDORA-2025-f6719e1c8f has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-f6719e1c8f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-f6719e1c8f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2025-01-12 01:38:35 UTC
FEDORA-2025-f6719e1c8f (python-neovim-0.5.2-2.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.