Bug 2356177

Summary: python-aiounittest fails to build with Python 3.14: RuntimeError: There is no current event loop in thread 'MainThread'.
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-aiounittestAssignee: Fabian Affolter <mail>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: carl, ksurma, mail, mhroncok
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 2025-03-31 09:47:26 UTC
python-aiounittest fails to build with Python 3.14.0a6.

+ /usr/bin/pytest -v
==================================== ERRORS ====================================
_________ ERROR collecting tests/test_asynctestcase_get_event_loop.py __________
/usr/lib/python3.14/site-packages/_pytest/python.py:1595: in instance
    return self._instance
E   AttributeError: 'TestCaseFunction' object has no attribute '_instance'. Did you mean: 'instance'?

During handling of the above exception, another exception occurred:
tests/test_asynctestcase_get_event_loop.py:30: in get_event_loop
    self.my_loop = asyncio.get_event_loop()
/usr/lib64/python3.14/asyncio/events.py:719: in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'
E   RuntimeError: There is no current event loop in thread 'MainThread'.

According to https://docs.python.org/dev/whatsnew/3.14.html#id3

Removed implicit creation of event loop by asyncio.get_event_loop(). It now raises a RuntimeError if there is no current event loop. (Contributed by Kumar Aditya in gh-126353.)


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/08837282-python-aiounittest/

For all our attempts to build python-aiounittest with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/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.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.