Steven Silvester
b3604a81d3
PYTHON-3171 Add usage of NoReturn annotation ( #901 )
2022-03-16 15:26:10 -05:00
Steven Silvester
a0fe7c03af
PYTHON-3120 Set up flake8 linting ( #868 )
2022-02-17 06:44:08 -06: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
2af521ec03
PYTHON-2984 Fix retry behavior for bulk write writeConcernError ( #800 )
2021-11-19 12:15:23 -08:00
Julius Park
fcedc510e1
PYTHON-2501 Remove iteritems from son.SON ( #731 )
2021-09-22 12:18:19 -07:00
Shane Harvey
11752ed594
PYTHON-2899 Remove code for MongoDB <= 3.4 ( #729 )
...
Remove unneeded memoryview to bytes conversion.
2021-09-16 16:53:50 -07:00
Bernie Hackett
ad4315134c
PYTHON-2803 Get rid of most uses of 'master'
...
This change also resolves PYTHON-2848 for MongoDB 4.0.
2021-09-13 12:50:49 -07:00
Prashant Mital
ff6ca53328
PYTHON-2572 Introduce NotPrimaryError and deprecate NotMasterError ( #646 )
2021-06-22 13:24:07 -07:00
Shane Harvey
de7c7b8be2
PYTHON-2544 Do not check error messages when an error code is present ( #574 )
...
Add 10058 as a "not master" error code to account for MongoDB<=3.2 errors.
2021-03-04 10:03:52 -08:00
Shane Harvey
e01d9a37e7
PYTHON-1320 Remove legacy CRUD methods ( #556 )
...
Remove save, insert, update, remove, and find_and_modify.
Remove tools/benchmark.py
2021-01-22 17:11:15 -08:00
Bernie Hackett
e17299ab2e
PYTHON-2133 Remove u prefixes from code
2021-01-20 16:10:23 -08:00
Bernie Hackett
6c2d629006
PYTHON-2133 Remove Py2 compatibility from pymongo
2021-01-19 21:15:20 -08:00
Prashant Mital
f458473925
PYTHON-2452 Ensure command-responses with RetryableWriteError label are retried on MongoDB 4.4+ ( #530 )
2020-12-14 19:03:19 -08:00
Shane Harvey
b2fba416e9
PYTHON-2342 Prefer checking error codes over error messages ( #492 )
2020-10-02 11:30:39 -07:00
Prashant Mital
956ce3d4b0
Incorporate review changes
2020-07-01 16:47:33 -07:00
Prashant Mital
9fc7ed1e11
PYTHON-2143 Use an allow-list to determine resumable change stream errors
2020-07-01 16:43:27 -07:00
Shane Harvey
fb7533e888
PYTHON-2099 Make ExceededTimeLimit a retryable writes error
...
Reinstate DuplicateKey code assertions.
2020-05-12 14:41:11 -07:00
Shane Harvey
5efdcb88e2
PYTHON-2185 Deprecate geoHaystack in create_index(es)
2020-05-08 10:09:21 -07:00
Shane Harvey
90cb160595
PYTHON-2129 Use error code to check for NamespaceNotFound errors
2020-02-19 10:56:51 -08:00
Prashant Mital
611c3f86b3
PYTHON-1677 Connections survive primary stepdown
2019-08-06 13:08:15 -07:00
Shane Harvey
e4317d286b
PYTHON-1508 Retryable commit/abort, has_error_label api
...
Retryable commitTransaction/abortTransaction.
Retry writes after certain writeConcernErrors.
Add has_error_label api.
Update unacknowledged write concern error messge.
Resync transaction tests and update test runner.
2018-06-07 14:39:52 -07:00
Shane Harvey
96aeb461f9
PYTHON-1545 Consider more errors retryable
2018-06-07 14:37:01 -07:00
Shane Harvey
3c2432d641
PYTHON-1543 Write operations should raise WTimeoutError
2018-05-23 19:57:00 -07:00
Bernie Hackett
ba7c95a9df
PYTHON-1462 - Import ABCs from collections.abc
2018-02-12 19:42:44 -08:00
rdb
077fb2041a
Allow fields to be a set ( #347 )
...
Add test cases for set and tuple projection arguments.
2018-02-12 11:33:36 -08:00
Bernie Hackett
507f954ed4
Update copyright dates
2017-12-01 17:23:39 -08:00
Shane Harvey
280efd2d72
PYTHON-1339 Generate a single message in _do_batched_write_command.
...
Ordered op_insert should check for errors on the last insert.
Use _Bulk API for Collection.insert.
Avoid sending acknowledged inserts as much as possible.
max_cmd_size already accounts for trailing null bytes.
2017-10-31 16:59:26 -04:00
Shane Harvey
f0b847adb8
PYTHON-1329 Refactor wire protocol message parsing.
...
Use _OpReply class instead of passing bytes around.
Remove unnecessary operation argument to receive message.
Move _first_batch to message.py to avoid circular import.
2017-10-09 15:11:50 -07:00
A. Jesse Jiryu Davis
2487e9b71f
PYTHON-1332 - Session param for Collection methods
2017-09-11 17:46:44 -04:00
A. Jesse Jiryu Davis
0534596dc5
PYTHON-1362 - Add raw_batches option to find()
2017-08-25 15:24:16 -04:00
Bernie Hackett
26a4ae2c2f
PYTHON-1113 - Fix _first_batch helper
2016-09-07 16:17:21 -07:00
Luke Lovett
b36a4345fd
PYTHON-1101 - Support sending writeConcern for commands that write.
2016-08-11 14:02:22 -07:00
Bernie Hackett
53a7bea492
PYTHON-1022 - Drop support for Python 3.2
...
This change removes the u() helper from bson.py3compat
and all of its uses in the driver and tests. PyPy3 continues
to be supported since, even though it is based on python 3.2.5,
it has always supported the u string prefix.
The README and install docs are now explicit about PyPy(3) support.
2016-06-15 10:05:43 -07:00
aherlihy
10608144d6
PYTHON-658 - Support minPoolSize, maxIdleTimeMS
2016-06-14 14:37:06 +02:00
Luke Lovett
ecab1c9432
PYTHON-1090, PYTHON-1098 - Use sane codec options when reading write responses.
...
When reading a write response from the server, we now use the 'replace'
unicode_decode_error_handler and 'dict' as the document_class.
2016-06-01 13:34:18 -07:00
Bernie Hackett
740fc3c07a
PYTHON-1033, PYTHON-1034 - Make protocol asserts exceptions
...
This change introduces a new exception, pymongo.errors.ProtocolError,
and uses it in place of asserts related to the wire protocol.
2016-05-19 17:18:00 -07:00
Bernie Hackett
6c4e4b5a81
PYTHON-1065 - Support 1 for batch_size with MongoDB >= 3.2
2016-03-07 17:48:54 -08:00
Luke Lovett
dde4a658b5
PYTHON-981 - Implement ReadConcern.
2015-11-18 14:12:28 -08:00
aherlihy
1a3aeea426
PYTHON-978 - Use find/getMore commands
2015-11-18 12:57:47 -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
Luke Lovett
b6182d0587
PYTHON-976 - Publish a CommandFailedEvent for arbitrary failures.
2015-10-07 11:08:05 -07:00
Bernie Hackett
a2a83c005f
PYTHON-952 - Publish events for uses of _first_batch
2015-09-30 10:14:04 -07:00
Bernie Hackett
b80fa6d632
PYTHON-952 - Bulk write operations monitoring
...
This change adds monitoring of bulk write operations (i.e.
Collection.bulk_write, Collection.insert_many, Collection.insert with multiple
documents, Bulk.execute, etc.). It also fixes bugs in conversion of legacy
write results to write command result format and conversion of legacy queries
to find command documents. Finally, it adds an operation_id attribute to the
published events to tie related events together.
2015-09-10 09:10:19 -07:00
Bernie Hackett
414250b5ef
PYTHON-952 - Minor docstring updates
2015-08-21 13:46:05 -07:00
Bernie Hackett
0e4f79c7c3
PYTHON-952 - Non-bulk write operation monitoring
2015-08-21 12:47:08 -07:00
Bernie Hackett
07d2199477
PYTHON-952 - Fix duration measurements.
...
We weren't including the time to decode responses in
a number of places. This commit also fixes an issue with
handling "cursor not found" errors from mongos versions
older than 2.4.
2015-08-12 14:04:21 -07:00
Bernie Hackett
fa4a6a39d3
PYTHON-952 - Query and getMore monitoring
...
This commit adds support for monitoring queries and getMore
operations, including getMore operations for command cursors
(e.g. aggregate cursor getMore). It also fixes a bug in duration
calculation.
2015-08-11 12:19:28 -07:00
Jason R. Coombs
1c806791a9
PYTHON-946 - Allow fields to be any sequence.
2015-06-15 14:43:44 -07:00
Bernie Hackett
5df17c2c63
PYTHON-818 - Remove unicode_literals future imports.
2015-03-27 10:08:11 -07:00