Commit Graph

180 Commits

Author SHA1 Message Date
Bernie Hackett
e6b0f3847d PYTHON-1581 - Deprecate Collection/Cursor count 2018-06-18 10:50:26 -07:00
Shane Harvey
a15c8283dc PYTHON-1584 Skip maxScan tests on 4.1+ 2018-06-12 10:20:49 -07:00
Nikolai Matiushev
72cab9356d PYTHON-1556 Fix compatibility issues with Python >= 3.6 (#352)
Use raw strings to avoid invalid escape sequence warnings in Python >= 3.6
2018-05-15 15:20:03 -07:00
Bernie Hackett
f847be3fcb PYTHON-1502 - Deprecate the snapshot cursor option 2018-03-22 08:47:34 -07:00
Bernie Hackett
507f954ed4 Update copyright dates 2017-12-01 17:23:39 -08:00
Shane Harvey
2a05236f61 PYTHON-1332 Only gossip cluster time on >= 3.6.
Do not add readConcern to explain.
Test explain with collation.
2017-11-30 14:53:14 -08:00
Shane Harvey
49cee292cc PYTHON-1408 Cursor iteration should complete when another thread closes the cursor.
Closing a cursor should not raise an error when killCursors fails.
2017-11-13 13:08:38 -08:00
Bernie Hackett
7ab179067b PYTHON-1299 - More test cleanup 2017-11-09 18:53:29 -08:00
Bernie Hackett
1227f5544d PYTHON-1280 - Support maxTimeMS in index management methods 2017-11-09 15:57:50 -08:00
Shane Harvey
3e778334e7 PYTHON-1299 Remove test logic for MongoDB <2.6. 2017-09-29 12:09:24 -07:00
A. Jesse Jiryu Davis
3cba982db9 PYTHON-1332 - Test lsid with all commands 2017-09-29 14:52:26 -04:00
caosiyang
db57f671dc PYTHON-1371 - The tailable cursor cannot get document through __getitem__(index) on MongoDB v3.4
Fix issue and add test case.
2017-09-08 11:45:11 -07:00
A. Jesse Jiryu Davis
cfb30e91c0 PYTHON-1362 - Add find/aggregate_raw_batches()
Rename find_raw to find_raw_batches, and add aggregate_raw_batches.
Rename RawBSONCursor and RawBSONCommandCursor to RawBatchCursor and
RawBatchCommandCursor.
2017-08-25 15:26:16 -04:00
A. Jesse Jiryu Davis
4957589024 PYTHON-1362 - Add Collection.find_raw()
Instead of passing raw_batches=True to find(), make a separate method.
2017-08-25 15:24:46 -04:00
A. Jesse Jiryu Davis
a6183a5dc5 Style in test_cursor.py 2017-08-25 15:24:16 -04:00
A. Jesse Jiryu Davis
0534596dc5 PYTHON-1362 - Add raw_batches option to find() 2017-08-25 15:24:16 -04:00
Shane Harvey
61ad5b223a PYTHON-1353 Fix failing CommandCursor test on 2.4. 2017-08-17 14:23:57 -07:00
Shane Harvey
b00584b892 PYTHON-1353 Kill cursors synchronously in CommandCursor.close. 2017-08-15 14:58:44 -07:00
A. Jesse Jiryu Davis
7b1cbace17 PYTHON-1217 - Deprecate the "modifiers" find option 2017-07-24 12:40:15 -04:00
Bernie Hackett
988fd450b4 Fix test_comment for MongoDB 3.5 2017-05-25 16:44:43 -07:00
Shane Harvey
6aaa1f71aa PYTHON-1269 Kill cursors synchronously in Cursor.close and MongoClient.close. 2017-05-08 13:23:50 -04:00
Bernie Hackett
43cf6be1c8 PYTHON-1196 - Fix test_max_await_time_ms 2017-03-23 18:49:39 -07:00
Bernie Hackett
cd078c8300 PYTHON-1196 - Disable test_max_await_time_ms 2017-02-17 13:55:50 -08:00
Shane Harvey
5905a86785 PYTHON-1075 Support running the entire test suite with SSL/TLS
SSL connections are configurable via the environment variables
"CLIENT_PEM", "CA_PEM", and "CERT_REQS".
2016-09-28 16:34:14 -07:00
Bernie Hackett
e89ba4bcd0 PYTHON-1026 - Remove test assumption about primary host 2016-09-21 11:15:43 -07:00
Bernie Hackett
1ee5e27f9a Fix testing with no server 2016-06-24 10:28:18 -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
aherlihy
d98a745700 PYTHON-1067 - Implement SDAM Monitoring 2016-06-14 15:20:19 +02:00
Bernie Hackett
6c4e4b5a81 PYTHON-1065 - Support 1 for batch_size with MongoDB >= 3.2 2016-03-07 17:48:54 -08:00
Bernie Hackett
e873e272fe Fix a test for MongoDB 3.3 behavior change 2016-03-03 16:00:10 -05:00
Bernie Hackett
4bad518ccd Filter out killCursors in some monitoring tests 2016-01-12 16:27:20 -08:00
Bernie Hackett
15a18aa785 Debug a spurious test failure 2016-01-08 16:42:55 -08:00
Bernie Hackett
b93c10504c PYTHON-985 - Fix cursor test for is_mongos changes 2015-11-18 15:02:38 -08:00
aherlihy
ab6b3a3b1b Add support for maxAwaitTimeMS to getMore 2015-11-18 14:17:56 -08:00
Bernie Hackett
f5eed9707c Fix up profiling tests for MongoDB 3.1.x 2015-09-11 16:28:36 -07:00
Bernie Hackett
39c41b277e Fix $comment tests for MongoDB 3.1.x. 2015-07-13 17:18:49 -07:00
Bernie Hackett
55578f9405 Use modern PyMongo in tests. 2015-04-20 15:12:35 -07:00
A. Jesse Jiryu Davis
cb64f87aa6 PYTHON-894 - Set cursor.alive False after final batch.
Even with this change, "next" can raise StopIteration even though
"alive" is True. For example if batch size is 2 and there are 4
documents in the result set, then after the 4th document "alive" is True
but "next" raises StopIteration.
2015-04-17 14:56:36 -04:00
Bernie Hackett
b1810c4461 PYTHON-876 - Better docs and test for modifiers Cursor param. 2015-04-11 15:08:49 -07:00
Bernie Hackett
dfc7551542 PYTHON-875 - Fix Cursor.hint(<index spec>).count() 2015-04-11 15:06:53 -07:00
Bernie Hackett
aec685b374 Fix up copyright dates. 2015-03-25 11:55:02 -07:00
Bernie Hackett
9e3175f3e5 PYTHON-862 - Add batch_size to Cursor constructor. 2015-03-17 06:43:54 -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
d69f76d380 Finalize option locations and exports.
- Move ReturnDocument to pymongo.collection.
- Change ReturnDocument.Before to ReturnDocument.BEFORE
- Change ReturnDocument.After to ReturnDocument.AFTER
- Add pymongo.cursor.CursorType.
- Move pymongo.cursor.NON_TAILABLE and friends to attributes of CursorType.
- read_preferences.ReadPreference is once again an "enum".
- Fix docs for read_preferences.ReadPreference.
- Rename pymongo.options to pymongo.operations.
- Export CursorType, ReturnDocument, WriteConcern, and public classes
  from pymongo.opertions through pymongo/__init__.py
- Fix up a number of documentation issues in the process.
2015-03-05 11:35:46 -08:00
Bernie Hackett
3f3b6bedfc PYTHON-846 - Database.connection -> Database.client 2015-02-25 11:57:39 -08:00
Bernie Hackett
30af616009 PYTHON-821 - Migrate most tests to new the CRUD API. 2015-02-13 08:46:43 -08:00
A. Jesse Jiryu Davis
301bf8066c Replace more tearDowns with addCleanup. 2015-01-26 16:38:16 -05:00
A. Jesse Jiryu Davis
0a75f04384 Remove pre-MongoDB-2.0 version checks from tests. 2015-01-26 16:19:12 -05:00
behackett
c07e543e58 PYTHON-820 - API changes for find/find_one to comply with CRUD spec.
- Changed parameter names (default values and behaviors remain the same):
  - spec (spec_or_id in find_one) -> filter
  - fields -> projection
  - partial -> allow_partial_results

- The "timeout" option is renamed to "no_cursor_timeout" with its default
  changed to False.

- The tailable, await_data, and exhaust options will be replaced with a
  cursor_type option. Valid values:
  - cursor.NON_TAILABLE
  - cursor.TAILABLE
  - cursor.TAILABLE_AWAIT
  - cursor.EXHAUST

- The following options are added:
  - oplog_replay (bool - default False) - only valid with tailable cursors
    against the oplog.
  - modifiers (document - default None) - A dict of query modifiers. See
    http://docs.mongodb.org/manual/reference/operator/query-modifier/#modifiers for
    options.

- The following options are removed, replaced by the "modifiers" option:
  - max_scan
  - snapshot

- The as_class option is removed. Use Collection.with_options instead.
2015-01-19 22:10:56 -08:00