You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test failure in test_pool_handles_transaction_exit_in_asyncgen_2 with Python 3.15.0a5, PYTHONASYNCIODEBUG=1 #1300
$ git clone https://github.com/MagicStack/asyncpg.git
$ cd asyncpg
$ git submodule update --init --recursive
$ uv venv --python 3.15
Using CPython 3.15.0a5 interpreter at: /usr/bin/python3.15
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
$ uv pip install -e .[gssauth]
$ uv pip install --group test
$ PYTHONASYNCIODEBUG=1 pytest -v
[…]
________________________________________________________________ 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 "/home/ben/src/forks/asyncpg/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
The above instructions also result in TestConnectionAttributes.test_prefer_standby_picks_master_when_standby_is_down failing due to a timeout, but I’m not seeing that when I build https://src.fedoraproject.org/rpms/python-asyncpg.
The test TestPool.test_pool_handles_transaction_exit_in_asyncgen_2 passes when PYTHONASYNCIODEBUG=1 is not set.
Activity
musicinmybrain commentedon Oct 7, 2026
This appears to be fixed in https://github.com/MagicStack/asyncpg/releases/tag/v0.32.0.