-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
An async test failed with "RuntimeError: Lock is not acquired" in github actions with python3.13t:
FAILED test/asynchronous/test_session.py::TestSession::test_end_sessions - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <coroutine object _AsyncGeneratorContextManager.__aenter__ at 0x51cd9ab3f00> Traceback (most recent call last): File "/home/runner/work/mongo-python-driver/mongo-python-driver/pymongo/asynchronous/pool.py", line 1474, in _get_conn if not await _async_cond_wait(self.size_cond, timeout): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ GeneratorExit During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/runner/.local/share/uv/python/cpython-3.13.2+freethreaded-linux-x86_64-gnu/lib/python3.13t/contextlib.py", line 214, in __aenter__ return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/mongo-python-driver/mongo-python-driver/pymongo/asynchronous/pool.py", line 1355, in checkout conn = await self._get_conn(checkout_started_time, handler=handler) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/mongo-python-driver/mongo-python-driver/pymongo/asynchronous/pool.py", line 1470, in _get_conn async with self.size_cond: ^^^^^^^^^^^^^^ File "/home/runner/.local/share/uv/python/cpython-3.13.2+freethreaded-linux-x86_64-gnu/lib/python3.13t/asyncio/locks.py", line 20, in __aexit__ self.release() ~~~~~~~~~~~~^^ File "/home/runner/.local/share/uv/python/cpython-3.13.2+freethreaded-linux-x86_64-gnu/lib/python3.13t/asyncio/locks.py", line 142, in release Error: raise RuntimeError('Lock is not acquired.') RuntimeError: Lock is not acquired.
https://github.com/mongodb/mongo-python-driver/actions/runs/13577449794/job/37956811892