Detailed steps to reproduce the problem?
Enable DEBUG level for pymongo.connection logger. Expected logs doesn't appear, they only appears if a ConnectionPoolListener instance is registered in event_listeners option.
Definition of done: what must be done to consider the task complete?
pymongo.connection logs should appear with no event_listeners registered.
The exact Python version used, with patch level:
$ python -c "import sys; print(sys.version)"
3.11.7 (main, Jan 22 2024, 19:12:29) [GCC 11.4.0]
The exact version of PyMongo used, with patch level:
$ python -c "import pymongo; print(pymongo.version); print(pymongo.has_c())"
4.7.2
True
Describe how MongoDB is set up. Local vs Hosted, version, topology, load balanced, etc.
Hosted
The operating system and version (e.g. Windows 7, OSX 10.8, ...)
Linux Ubuntu 22.04
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, ...)
FastAPI
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