Bug 2431533

Summary: python-asyncpg fails to build with Python 3.15: TestPool.test_pool_handles_transaction_exit_in_asyncgen_2: RuntimeError: cannot reuse already awaited coroutine
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-asyncpgAssignee: Ben Beasley <code>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: code, ksurma, mhroncok
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-asyncpg-0.31.0-5.fc44 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-01-22 00:35:23 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: 2412434    

Description Karolina Surma 2026-01-21 09:43:40 UTC
python-asyncpg fails to build with Python 3.15.0a5.

=================================== FAILURES ===================================
__________ TestPool.test_pool_handles_transaction_exit_in_asyncgen_2 ___________
Traceback (most recent call last):
  File "/usr/lib64/python3.15/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/usr/lib64/python3.15/unittest/case.py", line 667, in run
    self._callTestMethod(testMethod)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib64/python3.15/unittest/case.py", line 613, in _callTestMethod
    result = method()
  File "/builddir/build/BUILD/python-asyncpg-0.31.0-build/BUILDROOT/usr/lib64/python3.15/site-packages/asyncpg/_testbase/__init__.py", line 92, in wrapper
    self.loop.run_until_complete(coro)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib64/python3.15/asyncio/base_events.py", line 719, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
RuntimeError: cannot reuse already awaited coroutine
=========================== short test summary info ============================
FAILED tests/test_pool.py::TestPool::test_pool_handles_transaction_exit_in_asyncgen_2

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10038485-python-asyncpg/

For all our attempts to build python-asyncpg with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/python-asyncpg/

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

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
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 2026-01-22 00:27:18 UTC
FEDORA-2026-73c3e77fc4 (python-asyncpg-0.31.0-5.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-73c3e77fc4

Comment 2 Fedora Update System 2026-01-22 00:35:23 UTC
FEDORA-2026-73c3e77fc4 (python-asyncpg-0.31.0-5.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.