-
Type: Task
-
Resolution: Done
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
After PYTHON-4725, an AsyncMongoClient can only be used on a single event loop because the SDAM and other various background tasks are bound to the loop used to open the client.
For this reason, the async test suite should use a single event loop for all tests:
https://pytest-asyncio.readthedocs.io/en/latest/how-to-guides/run_package_tests_in_same_loop.html
import pytest pytestmark = pytest.mark.asyncio(loop_scope="package")
Any tests for using multiple/different loops (eg PYTHON-4724) should be handwritten.
- is related to
-
PYTHON-4860 Async client should use asyncio.Lock and asyncio.Condition
- Closed
- related to
-
PYTHON-4724 Document the behavior of using an async client across multiple event loops
- Backlog
-
PYTHON-4725 Async client should use tasks for SDAM instead of threads
- Closed