-
Type:
Task
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
Python Drivers
-
Completed
-
-
None
-
None
-
None
-
None
-
None
-
None
Detailed steps to reproduce the problem?
The async transactions documentation, specifically lines 56 an 57 in client_sesssion.py, do not appear to be correct.
If I do not place an "async" on line 56, I get the error: `
AsyncClientSession' object does not support the context manager protocol
If I do not place an "await" on line 57, I get the error:
'AsyncClientSession' object does not support the context manager protocol
I've attached a short script as an example.
Definition of done: what must be done to consider the task complete?
Documentation is updated. Or, please let me know if I'm doing something dumb here.
The exact Python version used, with patch level:
$ python -c "import sys; print(sys.version)"
3.13.1 (main, Dec 19 2024, 14:22:59) [Clang 18.1.8 ]
The exact version of PyMongo used, with patch level:
$ python -c "import pymongo; print(pymongo.version); print(pymongo.has_c())"
4.10.1
True
Describe how MongoDB is set up. Local vs Hosted, version, topology, load balanced, etc.
Using MongoDB Atlas
The operating system and version (e.g. Windows 7, OSX 10.8, ...)
MacOs: 15.3 (24D60)
Web framework or asynchronous network library used, if any, with version (e.g. Django 1.7, mod_wsgi 4.3.0, gevent 1.0.1, Tornado 4.0.2, ...)
only using asyncio
Security Vulnerabilities
If you’ve identified a security vulnerability in a driver or any other MongoDB project, please report it according to the instructions here