Compatibility Policy
Deprecation
Before we remove a feature in a major release, PyMongo’s maintainers make an effort to release at least one minor version that deprecates it. We add “DEPRECATED” to the feature’s documentation, and update the code to raise a . You can ensure your code is future-proof by running your code with the latest PyMongo release and looking for DeprecationWarnings.
To print deprecation warnings to stderr, run python with “-Wd”:
If your own code’s test suite passes with “python -We” then it uses no deprecated PyMongo features.
The Python documentation on the warnings module, and .