Bug 2576587 - python-aiounittest fails to build with Python 3.16: AttributeError: module 'asyncio' has no attribute 'iscoroutinefunction'
Summary: python-aiounittest fails to build with Python 3.16: AttributeError: module 'a...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-aiounittest
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Carl George 🤠
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.16
TreeView+ depends on / blocked
 
Reported: 2026-11-19 12:56 UTC by Karolina Surma
Modified: 2026-11-19 12:56 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2026-11-19 12:56:54 UTC
python-aiounittest fails to build with Python 3.16.0a2.

___________________ ERROR collecting tests/test_futurized.py ___________________
/usr/lib/python3.16/site-packages/_pytest/python.py:1675: in instance
    return self._instance
           ^^^^^^^^^^^^^^
E   AttributeError: 'TestCaseFunction' object has no attribute '_instance'. Did you mean '.instance' instead of '._instance'?

During handling of the above exception, another exception occurred:
/usr/lib64/python3.16/unittest/case.py:451: in __init__
    testMethod = getattr(self, methodName)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
../BUILDROOT/usr/lib/python3.16/site-packages/aiounittest/case.py:82: in __getattribute__
    if name.startswith('test_') and asyncio.iscoroutinefunction(attr):
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   AttributeError: module 'asyncio' has no attribute 'iscoroutinefunction'

During handling of the above exception, another exception occurred:
/usr/lib64/python3.16/unittest/case.py:456: in __init__
    raise ValueError("no such test method in %s: %s" %
E   ValueError: no such test method in <class 'test_futurized.MyAddTest'>: test_add

https://docs.python.org/3.16/whatsnew/3.16.html
The asyncio.iscoroutinefunction() which has been deprecated since Python 3.14. Use inspect.iscoroutinefunction() instead.

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.16/fedora-rawhide-x86_64/11359625-python-aiounittest/

For all our attempts to build python-aiounittest with Python 3.16, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.16/package/python-aiounittest/

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.16:
https://copr.fedorainfracloud.org/coprs/g/python/python3.16/

Let us know here if you have any questions.

Python 3.16 is planned to be included in Fedora 47.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.16.
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.


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