Upgrade to release 4.19.0:
- Added support for Python 3.15.
- Dropped support for Python 3.9 and 3.10.
- Removed support for PyPy.
- Removed the deprecated Algorithm.RANGEPREVIEW and
QueryType.RANGEPREVIEW members (PYTHON-6009).
- Added support for running the synchronous and asynchronous
clients in subinterpreters, including inside
concurrent.futures.InterpreterPoolExecutor (Python 3.14+). Only
in subinterpreters, which do not allow daemon threads, the
synchronous client's monitor threads now start as non-daemon
threads and are stopped and joined when the interpreter is torn
down. Monitor threads in the main interpreter remain daemon
threads and shutdown behavior is unchanged. Note that because
these threads are non-daemon, a subinterpreter may block on
teardown until any in-flight monitor work completes.
- Added support for routing Key Management Service (KMS) requests
for Client-Side Field Level Encryption and Queryable Encryption
through an HTTP proxy, using the new kms_connect_callback option
on AutoEncryptionOpts, ClientEncryption, and AsyncClientEncryption.
The callback opens the connection and the driver performs the KMS
TLS handshake over it, so verification still targets the KMS host
rather than the proxy. For an ordinary HTTP proxy, pass
HTTPProxyKMSConnect or AsyncHTTPProxyKMSConnect instead of writing
a callback. Both helpers accept custom CONNECT headers, e.g.
Proxy-Authorization for proxies that require authentication.
- Added the srv_host_validator keyword argument to MongoClient and
AsyncMongoClient, an alternative to srvAllowedHostsSuffix for
deployments whose acceptable SRV hosts cannot be expressed as a
single suffix. The callback is invoked once per SRV-returned host
and must return a boolean: True to accept the host and False to
reject it. During initial DNS discovery a non-boolean return
raises an error; during SRV polling it is treated as a rejection.
It is mutually exclusive with srvAllowedHostsSuffix and, because
it takes a callable, cannot be set in a connection string. See
the MongoClient and AsyncMongoClient documentation for security
considerations.
- srvAllowedHostsSuffix may now be set to a single label reserved
for private or special use, such as localhost, test, or internal.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>