Bug 2326210

Summary: python-uvloop fails to build with Python 3.14: AttributeError: module 'asyncio' has no attribute 'AbstractChildWatcher'
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-uvloopAssignee: Orphan Owner <extras-orphan>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: carl, edward.evans, fti-bugs, igor.raits, ksurma, mhroncok, nick.farrell, orange, paul.wouters, rj.layco, romain.geissler, rominf
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-08-19 09:57:26 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: 2339432, 2339435, 2384425, 2322407, 2371713, 2371774, 2371819, 2371941, 2372189    

Description Karolina Surma 2024-11-14 11:53:47 UTC
python-uvloop fails to build with Python 3.14.0a1.

20 test errors with:

__________________ ERROR collecting _empty/tests/test_unix.py __________________
Traceback (most recent call last):
  File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 341, in from_call
    result: TResult | None = func()
                             ~~~~^^
  File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 389, in collect
    return list(collector.collect())
                ~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 549, in collect
    self._register_setup_module_fixture()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 562, in _register_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
    ^^^^^^^^
  File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 284, in obj
    self._obj = obj = self._getobj()
                      ~~~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 546, in _getobj
    return importtestmodule(self.path, self.config)
  File "/usr/lib/python3.14/site-packages/_pytest/python.py", line 493, in importtestmodule
    mod = import_path(
        path,
    ...<2 lines>...
        consider_namespace_packages=config.getini("consider_namespace_packages"),
    )
  File "/usr/lib/python3.14/site-packages/_pytest/pathlib.py", line 544, in import_path
    mod = _import_module_using_spec(
        module_name, path, pkg_root, insert_modules=False
    )
  File "/usr/lib/python3.14/site-packages/_pytest/pathlib.py", line 663, in _import_module_using_spec
    spec.loader.exec_module(mod)  # type: ignore[union-attr]
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^
  File "<frozen importlib._bootstrap_external>", line 752, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/builddir/build/BUILD/python-uvloop-0.19.0-build/uvloop-0.19.0/_empty/tests/test_unix.py", line 10, in <module>
    from uvloop import _testbase as tb
  File "/builddir/build/BUILD/python-uvloop-0.19.0-build/BUILDROOT/usr/lib64/python3.14/site-packages/uvloop/__init__.py", line 9, in <module>
    from .loop import Loop as __BaseLoop  # NOQA
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "uvloop/includes/stdlib.pxi", line 47, in init uvloop.loop
AttributeError: module 'asyncio' has no attribute 'AbstractChildWatcher'

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/08258824-python-uvloop/

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

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 Romain Geissler 2025-02-15 00:04:49 UTC
Reported upstream in https://github.com/MagicStack/uvloop/issues/637

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

Comment 3 Karolina Surma 2025-03-05 10:38:37 UTC
With Python 3.14.0a5 the error looks different:

__________________ ERROR collecting _empty/tests/test_unix.py __________________
ImportError while importing test module '/builddir/build/BUILD/python-uvloop-0.21.0-build/uvloop-0.21.0/_empty/tests/test_unix.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_unix.py:10: in <module>
    from uvloop import _testbase as tb
../../BUILDROOT/usr/lib64/python3.14/site-packages/uvloop/__init__.py:6: in <module>
    from asyncio.events import BaseDefaultEventLoopPolicy as __BasePolicy
E   ImportError: cannot import name 'BaseDefaultEventLoopPolicy' from 'asyncio.events' (/usr/lib64/python3.14/asyncio/events.py)

Comment 4 Miro Hrončok 2025-03-12 13:31:06 UTC
I reported the removal to CPython as a regression. https://github.com/python/cpython/issues/131148

Comment 5 Miro Hrončok 2025-03-12 13:38:16 UTC
However, workaroundign that, I get back to:

AttributeError: module 'asyncio' has no attribute 'AbstractChildWatcher'.

This one was deprecated and is reported to uvloop upstream at https://github.com/MagicStack/uvloop/issues/637

Comment 6 Karolina Surma 2025-06-11 16:05:42 UTC
*** Bug 2372190 has been marked as a duplicate of this bug. ***

Comment 7 Fedora Fails To Install 2025-06-20 19:49:59 UTC
Hello,

Please note that this comment was generated automatically by https://pagure.io/releng/blob/main/f/scripts/ftbfs-fti/follow-policy.py
If you feel that this output has mistakes, please open an issue at https://pagure.io/releng/

This package fails to install and maintainers are advised to take one of the following actions:

 - Fix this bug and close this bugzilla once the update makes it to the repository.
   (The same script that posted this comment will eventually close this bugzilla
   when the fixed package reaches the repository, so you don't have to worry about it.)

or

 - Move this bug to ASSIGNED if you plan on fixing this, but simply haven't done so yet.

or

 - Orphan the package if you no longer plan to maintain it.


If you do not take one of these actions, the process at https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs will continue.
This package may be orphaned in 7+ weeks.
This is the first reminder (step 3) from the policy.

Don't hesitate to ask for help on https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ if you are unsure how to fix this bug.

Comment 8 Fedora Fails To Install 2025-07-15 08:33:09 UTC
Hello,

Please note that this comment was generated automatically by https://pagure.io/releng/blob/main/f/scripts/ftbfs-fti/follow-policy.py
If you feel that this output has mistakes, please open an issue at https://pagure.io/releng/

This package fails to install and maintainers are advised to take one of the following actions:

 - Fix this bug and close this bugzilla once the update makes it to the repository.
   (The same script that posted this comment will eventually close this bugzilla
   when the fixed package reaches the repository, so you don't have to worry about it.)

or

 - Move this bug to ASSIGNED if you plan on fixing this, but simply haven't done so yet.

or

 - Orphan the package if you no longer plan to maintain it.


If you do not take one of these actions, the process at https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs will continue.
This package may be orphaned in 4+ weeks.
This is the second reminder (step 4) from the policy.

Don't hesitate to ask for help on https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ if you are unsure how to fix this bug.

Comment 9 Fedora Fails To Install 2025-08-12 12:18:08 UTC
This package has been orphaned.

You can pick it up at https://src.fedoraproject.org/rpms/python-uvloop by clicking button "Take". If nobody picks it up, it will be retired and removed from a distribution.

Comment 10 Fedora Admin user for bugzilla script actions 2025-08-12 13:32:19 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 11 Miro Hrončok 2025-08-19 09:57:26 UTC
Automation has figured out the package is retired in rawhide.

If you like it to be unretired, please open a ticket at https://pagure.io/releng/new_issue?template=package_unretirement

Comment 12 Red Hat Bugzilla 2025-12-18 04:25:11 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days