Compatibility
MongoDB Compatibility
The following compatibility table specifies the recommended version or versions of PyMongo for use with a specific version of MongoDB.
The first column lists the driver version.
When a replica set runs in Docker, it might expose only one MongoDB endpoint.
In this case, the replica set is not discoverable. Specifying directConnection=false
in your connection URI,
or leaving this option unset, can prevent your application from connecting to it.
In a test or development environment, you can connect to the replica set by specifying
directConnection=true
. In a production environment, we
recommend configuring the cluster to make each MongoDB instance accessible outside of
the Docker virtual network.
When a replica set runs in Docker, it might expose only one MongoDB endpoint.
In this case, the replica set is not discoverable. Specifying directConnection=false
in your connection URI,
or leaving this option unset, can prevent your application from connecting to it.
In a test or development environment, you can connect to the replica set by specifying
directConnection=true
. In a production environment, we
recommend configuring the cluster to make each MongoDB instance accessible outside of
the Docker virtual network.
Language Compatibility
PyMongo supports both CPython and PyPy.
When a version of Python is marked end-of-life (EOL), the next minor release of PyMongo drops support for that version. The driver offers the following ongoing support for EOL Python versions:
CPython: The last minor PyMongo version compatible with the EOL CPython version receives critical bug fixes for one year.
PyPy: PyMongo doesn't support PyPy versions past their EOL date.
The following compatibility table specifies the recommended version of PyMongo for use with a specific version of Python. The first column lists the driver version.
PHP Driver Versions | PHP 8.4 | PHP 8.3 | PHP 8.2 | PHP 8.1 | PHP 8.0 | PHP 7.4 | PHP 7.3 | PHP 7.2 |
---|---|---|---|---|---|---|---|---|
ext + lib 1.21 to 2.0 | ✓ | ✓ | ✓ | ✓ | ||||
ext + lib 1.20 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
ext + lib 1.17 to 1.19 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
ext + lib 1.16 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
ext + lib 1.15 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |