Commit Graph

60 Commits

Author SHA1 Message Date
Shane Harvey
890cd26e1a
PYTHON-3288 Implement client side operation timeout (#954)
Add timeoutMS URI option and MongoClient keyword argument.
Add provisional/beta pymongo.timeout() api to set a deadline for a block of operations.
2022-06-06 15:36:52 -04:00
Steven Silvester
5578999a90
PYTHON-1834 Use a code formatter (#852) 2022-02-09 06:44:28 -06:00
Steven Silvester
dd6c140d43
PYTHON-3060 Add typings to pymongo package (#831) 2022-02-02 21:12:36 -06:00
Shane Harvey
c94a3ad1df
PYTHON-2585 Remove legacy multi-auth code (#816) 2021-12-09 18:00:41 -08:00
Shane Harvey
278a50d4b0
PYTHON-3005 Make maxConnecting configurable (#789) 2021-11-16 12:51:36 -08:00
Shane Harvey
b342990934
PYTHON-2164 Add MongoClient.options, remove redundant properties (#772) 2021-11-03 11:21:33 -07:00
Shane Harvey
2eb0df812c
PYTHON-2879 Fix get_ssl_context for CSFLE and ocsptest.py (#713) 2021-08-24 13:36:37 -04:00
Prashant Mital
b3118e034e
PYTHON-2162 Remove support for ssl* URI options (#706) 2021-08-19 14:58:31 -07:00
Shane Harvey
10002fad1c
PYTHON-2857 Remove the socketKeepAlive option (#702) 2021-08-10 14:00:41 -07:00
Shane Harvey
e3a61b9ff7
PYTHON-1840 Remove waitQueueMultiple and ExceededMaxWaiters (#699) 2021-08-09 10:53:28 -07:00
Shane Harvey
5bf15c8e18
PYTHON-2672 SDAM, CMAP, and server selection changes for load balancers (#621)
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.
2021-05-18 14:12:49 -07:00
Shane Harvey
2c41c6fe95
PYTHON-2671 Support loadBalanced URI option (#614)
Add workaround in test_dns until PYTHON-2679 is completed.
2021-05-05 12:51:05 -07:00
Shane Harvey
ac2f506ba2
PYTHON-2453 Add MongoDB Versioned API (#536)
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.
2021-01-11 18:16:00 -08:00
Prashant Mital
0743c0b222
PYTHON-2121 add directConnection URI option 2020-06-08 15:11:55 -07:00
Prashant Mital
47a6718352
PYTHON-2161 add support for tlsDisableOcspEndpointCheck URI option 2020-03-11 18:35:11 -07:00
Shane Harvey
6d8c1ced70 PYTHON-1882 Add AutoEncryptionOpts 2019-07-29 16:05:20 -07:00
Shane Harvey
f588412b67 PYTHON-1842 Implement Connection Monitoring and Pooling spec 2019-06-13 15:50:49 -07:00
Shane Harvey
a15266083b PYTHON-1674 Support retryable reads
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.
2019-04-25 14:28:12 -07:00
Prashant Mital
927a97e39b PYTHON-1670: Implement Unified URI Options (#386) 2019-02-27 15:56:48 -08:00
Prashant Mital
bc26c0db69
PYTHON-1577 Allow applications to register a custom server selector (#371)
PYTHON-1577 Allow applications to register a custom server selector
2018-08-30 17:33:03 -05:00
A. Jesse Jiryu Davis
c63c068611 PYTHON-1564 Add DriverInfo to handshake metadata
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.
2018-06-03 10:04:45 -04:00
Bernie Hackett
335cb97a34 PYTHON-1278, PYTHON-1553 - Support OP_COMPRESSED 2018-05-22 11:44:21 -07:00
Bernie Hackett
984977ba9e PYTHON-1425 - Implement the auth spec and tests 2018-04-25 10:25:00 -07:00
Bernie Hackett
73478106eb PYTHON-1463 - Implement read / write concern spec 2018-04-06 12:55:09 -07:00
Bernie Hackett
3733971e35 PYTHON-1456 - Use SSLContext.check_hostname with Python 3.7+
Continue using our bundled match_hostname otherwise.
2018-03-06 17:25:49 -08:00
Shane Harvey
251df6abd1 PYTHON-1482 Fix maxIdleTime reaper calculation 2018-02-21 17:01:03 -08:00
Bernie Hackett
507f954ed4 Update copyright dates 2017-12-01 17:23:39 -08:00
Shane Harvey
8b1aa3aafa PYTHON-1339 Retryable single-statement writes.
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.
2017-10-30 14:23:16 -04:00
Shane Harvey
312408e041 PYTHON-1279 Deprecate socketKeepAlive and default to true.
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.
2017-08-01 12:34:42 -07:00
Michael Elovskikh
9f07ff35a1 PYTHON-1334 Don't change readpreference value at uri parsing (#325) 2017-07-25 17:43:51 -07:00
Bernie Hackett
1600059015 PYTHON-1184 - Don't require X.509 user with MongoDB 3.4 2016-11-16 14:31:14 -08:00
A. Jesse Jiryu Davis
87708a2f96 PYTHON-1169 - Default maxStalenessSeconds is -1. 2016-11-08 21:52:04 -05:00
A. Jesse Jiryu Davis
f4922da97c PYTHON-1104 - maxStalenessMS -> maxStalenessSeconds. 2016-11-08 21:52:04 -05:00
Bernie Hackett
b37e828422 Fix handling of maxStalenessMS default 2016-09-19 14:00:28 -07:00
Luke Lovett
c9bbfa7ace PYTHON-1119 - Implement the client metadata capture specification. 2016-07-26 10:35:55 -07:00
A. Jesse Jiryu Davis
5933730588 PYTHON-1104 Implement maxStalenessMS. 2016-07-22 14:12:40 -04:00
A. Jesse Jiryu Davis
a2f97f92a4 PYTHON-1105 Configurable heartbeatFrequencyMS. 2016-07-08 16:30:56 -04:00
aherlihy
10608144d6 PYTHON-658 - Support minPoolSize, maxIdleTimeMS 2016-06-14 14:37:06 +02:00
Bernie Hackett
db1dea6f73 PYTHON-1042 - Support client certificate passphrase 2016-05-26 14:59:42 -07:00
Bernie Hackett
d7abe6e7be PYTHON-1073 - Support certificate revocation lists 2016-05-24 11:47:49 -07:00
Luke Lovett
dde4a658b5 PYTHON-981 - Implement ReadConcern. 2015-11-18 14:12:28 -08:00
Bernie Hackett
28885b25e8 PYTHON-952 - API improvements
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
2015-10-09 17:03:51 -07:00
aherlihy
193915e636 PYTHON-959 - Connection string spec compliance. 2015-08-06 13:14:31 -04:00
Luke Lovett
5f14e1b9bf PYTHON-928 - Enhance __repr__ of MongoClient with other options passed in to the constructor. 2015-07-17 14:49:36 -07:00
Bernie Hackett
d396068e6a PYTHON-872 - Default to ssl.CERT_REQUIRED when ssl=True.
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.
2015-04-01 15:43:39 -07:00
Bernie Hackett
aec685b374 Fix up copyright dates. 2015-03-25 11:55:02 -07:00
Bernie Hackett
981414da40 Define and use some constants. 2015-03-24 17:53:36 -07:00
aherlihy
fa1466179f PYTHON-813 Added support for serverSelectionTimeoutMS 2015-03-09 12:38:24 -07:00
Bernie Hackett
4fd6f8a0b1 PYTHON-854 max_pool_size -> maxPoolSize
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.
2015-03-09 10:08:13 -07:00
Bernie Hackett
761c630d4d PYTHON-834 - Add option to disable match_hostname. 2015-03-05 14:03:49 -08:00