Disable SRV Polling, SDAM compatibility check, logicalSessionTimeoutMinutes check.
server session pool pruning, server selection, and server monitoring.
A ServerType of LoadBalancer MUST be considered a data-bearing server.
"drivers MUST emit the following series of SDAM events" section.
Send loadBalanced:True with handshakes, validate serviceId.
Add topologyVersion fallback when serviceId is missing.
Don't mark load balancers unknown.
Add pymongo.server_api.ServerApi and the MongoClient server_api option.
Support Unified Test Format version 1.1 (serverParameters in
runOnRequirements)
Skip dropRole tests due to SERVER-53499.
Add retryReads URI option that defaults to True.
Supported read operations will be retried once after transient
network, election, and shutdown errors on MongoDB 3.6+.
Supported operations are:
listCollections, listIndexes, and listDatabases
distinct
count, estimated_document_count, count_documents
aggregate (not including $out)
find (only for the initial find command, getMore commands are not
retried).
ChangeStreams: watch (initial aggregate command).
GridFS read APIs.
Test changes:
Add retryable reads spec test runner.
Disable retryable reads in network error tests.
Allow drivers that wrap PyMongo to add their info to the handshake
metadata, using a "driver" option like:
MongoClient(driver=DriverInfo("MyDriver", "1.2.3"))
The DriverInfo is appended to PyMongo's own metadata.
Add retryWrites MongoClient and URI setting.
Retry once for supported single-statement write operations including:
insert_one, update_one, delete_one, find_one_and_update, find_one_and_replace,
find_one_and_delete, update and remove with multi=False, and find_and_modify.
Wherever possible set:
- keep-alive idle time to a maximum of 300 seconds.
- keep-alive interval time to a maximum of 10 seconds.
- keep-alive count to a maximum of 9 probes.
This commit implements the following simplifications and improvements:
- The Subscriber ABC has been renamed to CommandListener
- The subscribe function has been renamed to register
- The COMMAND constant has been removed
- The get_subscribers function has been removed
- Command listeners can now be registered per MongoClient instance
instead of just globally
If ssl=True is passed as a keyword arg (or ssl=true in the URI)
but no value for ssl_cert_reqs or ssl_ca_certs has been provided,
assume ssl.CERT_REQUIRED for cert_reqs and attempt to load
system provided CA certificates. Raise ConfigurationError if
the necessary SSLContext methods don't exist.
With this change the max_pool_size named parameter to
MongoClient is removed. It is replaced by the maxPoolSize
MongoDB URI option, which can be passed in a URI, or as a
keyword argument to MongoClient.