Commit Graph

40 Commits

Author SHA1 Message Date
Shane Harvey
9aa5bb791a PYTHON-1734 Skip failing index tests on MongoDB 4.1 2019-02-01 11:05:11 -08:00
Prashant Mital
58851e1221
PYTHON-1619 Implement ObjectID Specification (#373)
PYTHON-1619 Implement ObjectID Specification
2018-08-29 12:24:28 -05:00
Shane Harvey
05c7c65470 PYTHON-1329 OP_MSG with unacknowledged writes
Replace OP_INSERT/OP_UPDATE/OP_DELETE usage with OP_MSG with moreToCome
flag when the server is 3.6 or greater.
Unack'ed OP_MSG supports bypass_document_validation.
getLastError updatedExisting is always false on mongos after an OP_MSG
unack'ed update.
2018-06-23 11:46:50 -04:00
Bernie Hackett
54b8058c66 PYTHON-1571 - Skip group tests with MongoDB 4.1+ 2018-06-01 18:29:30 -07:00
Shane Harvey
9cecbb2ae5 PYTHON-1491 Skip failing OP_KILL_CURSORS test 2018-02-28 13:05:05 -08:00
Bernie Hackett
507f954ed4 Update copyright dates 2017-12-01 17:23:39 -08:00
Bernie Hackett
7ab179067b PYTHON-1299 - More test cleanup 2017-11-09 18:53:29 -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
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
3e778334e7 PYTHON-1299 Remove test logic for MongoDB <2.6. 2017-09-29 12:09:24 -07:00
Shane Harvey
3d57cfecfe PYTHON-1342 Enable test_insert_large_batch. 2017-09-08 15:03:49 -07:00
Shane Harvey
fadb8161b4 PYTHON-1317 Fix race condition in w=0 bulk tests. 2017-08-07 11:07:39 -07:00
Shane Harvey
e89ed11113 PYTHON-1317 Deprecate legacy bulk write api.
Use Collection.bulk_write() in documentation examples.
Move deprecated bulk tests to test_legacy_api.
2017-08-04 21:41:29 -07:00
Shane Harvey
bb7db3d19a PYTHON-1331 Enable mongodb-latest sharded cluster testing.
PYTHON-1342 Skip test_insert_large_batch.
2017-08-04 14:53:09 -07:00
A. Jesse Jiryu Davis
85e80bcc8b PYTHON-1308 - Finish deprecating SON manipulators 2017-08-01 10:19:48 -04:00
Shane Harvey
9388281795 PYTHON-1306 Deprecate MongoClient.get_default_database.
PYTHON-1304 Make name optional for MongoClient.get_database.
2017-07-25 17:16:34 -07:00
Bernie Hackett
53bd24bfc3 PYTHON-1260 - Deprecate the group helper 2017-07-18 10:54:33 -07:00
Shane Harvey
a6eed38e54 PYTHON-1291 Skip *_with_invalid_keys tests against >= 3.5.8. 2017-06-28 18:04:00 -07:00
Bernie Hackett
9193e577f2 PYTHON-1266 - Make test_continue_on_error more reliable 2017-04-03 14:47:00 -07:00
Bernie Hackett
5fb2544c29 PYTHON-1263 - Fix test_insert_manipulate_false
The server no longer includes process id when generating
ObjectIds so we can't actually test that the _id value
was generated by the server instead of the driver.
2017-03-29 13:54:08 -07:00
Bernie Hackett
15bae00c83 PYTHON-1246 - Attempt to fix test_insert_large_batch
...with sharded MongoDB 2.4.
2017-03-16 15:01:33 -07:00
Bernie Hackett
e1850d8abe PYTHON-988 - Deprecate cursor managers and kill_cursors 2016-06-17 10:08:14 -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
Bernie Hackett
36817ac0f6 Fix a racy test 2016-03-10 15:34:58 -08:00
Bernie Hackett
7ee852a00f PYTHON-1070 - Make index cache thread safe 2016-03-10 07:42:00 -08:00
Bernie Hackett
e09ded21e0 Fix a test when running with WT 2016-01-08 15:38:30 -08:00
Bernie Hackett
1a8478dbd5 PYTHON-893 - Fix application of SON manipulators in CommandCursor. 2015-04-14 11:39:23 -07:00
Bernie Hackett
8623f6e190 PYTHON-891 - Collection.save should always return _id. 2015-04-11 15:05:39 -07:00
A. Jesse Jiryu Davis
400bb19950 Fix racy tests of legacy unacknowledged writes.
Each test that writes to a collection with w=0 uses its own exclusive collection,
to avoid intermittently breaking subsequent tests.
2015-04-01 11:19:09 -04:00
Bernie Hackett
d2f9807cd1 PYTHON-857 - Remove MongoClient.(min|max)_wire_version.
The min_wire_version and max_wire_version attributes have
always been racy when connected to a mixed version replica set
or any sharded cluster. When connected to a mongos all you know
is the wire version of that mongos, not the shards behind it.
With mongos load balancing this problem is even worse, since
each operation could possibly be executed on a different mongo
version during an upgrade.
2015-03-24 14:38:25 -07:00
Bernie Hackett
f93c73aa73 PYTHON-861 - create/ensure index changes
- Deprecate ensure_index
- Remove caching from create_index
- In create_index, remove support for the cache_for param, and the
  bucket_size and drop_dups aliases (they all remain in ensure_index)
- GridFS uses create_index
- Fix up tests.
2015-03-14 13:38:13 -07:00
Bernie Hackett
c87424e7af PYTHON-856 - as_class -> document_class
This commit changes the name of the as_class option
in CodecOptions to document_class, to match the name
of the MongoClient option.
2015-03-09 14:32:42 -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
0b9d79fb92 Move another legacy test. 2015-03-06 08:32:18 -08:00
Bernie Hackett
3f3b6bedfc PYTHON-846 - Database.connection -> Database.client 2015-02-25 11:57:39 -08:00
Bernie Hackett
caf69240ce PYTHON-838 - Deprecate Database.add_son_manipulator 2015-02-25 10:08:50 -08:00
Bernie Hackett
5819c86acd Fix a racy test. 2015-02-20 16:21:18 -08:00
Bernie Hackett
839893939e PYTHON-821 - Deprecated legacy API.
This commit deprecates insert, update, save, and remove. Each
now raises DeprecationWarning at stacklevel 2. This change also
updates all tutorials and example documentation to use the new
CRUD API, tests the deprecations, and fixes up a few more tests
that were still using the legacy API.
2015-02-20 15:41:45 -08:00
Bernie Hackett
aa090fe393 PYTHON-821 - Small test fixes. 2015-02-19 10:36:42 -08:00
Bernie Hackett
a817fa9a28 PYTHON-821 - Add test_legacy_api.py 2015-02-19 09:32:14 -08:00