Commit Graph

1273 Commits

Author SHA1 Message Date
Bernie Hackett
c10a098c2c PYTHON-951 - Use bytes in GridFS tests. 2015-06-16 16:54:02 -07:00
Bernie Hackett
1c6ed1b351 PYTHON-951 - Raise CorruptGridFile for truncated chunks. 2015-06-16 16:22:45 -07:00
Bernie Hackett
331347871c PYTHON-888 - Skip UUID test on python 2.4. 2015-06-16 13:40:41 -07:00
aherlihy
4d6e8637bf PYTHON-888 Add codec_options support to the bson module. 2015-06-16 12:51:36 -07:00
Bernie Hackett
3487b4bfa1 PYTHON-834 - Add option to disable match_hostname. 2015-06-16 12:47:23 -07:00
Bernie Hackett
9b1ac9717f PYTHON-882 - Backport get_database, get_collection, and with_options.
This change comes with a small backward breaking change in the
behavior of client.document_class in exchange for enhanced
configuration flexibility. See changelog.rst for details and
examples.
2015-06-11 14:54:04 -07:00
aherlihy
d19f4996ca PYTHON-889 The aggregate method should always return CommandCursor when passed the cursor option. 2015-06-08 15:05:38 -07:00
aherlihy
5ffe8d44bc PYTHON-933 - "maxPoolSize=0" allowed, causes hang 2015-06-08 14:49:48 -07:00
aherlihy
e405ef91cf PYTHON-885 - Support maxPoolSize URI option. 2015-06-08 14:11:00 -07:00
aherlihy
6e4608b9cd PYTHON-890 - Support localThresholdMS URI option. 2015-06-08 13:26:48 -07:00
aherlihy
f6c28646d6 PYTHON-886 - Add CRUD API find / find_one options. 2015-06-03 16:49:03 -04:00
Bernie Hackett
32c06e0494 PYTHON-879 - Backport new read preference classes from 3.x. 2015-05-22 10:36:06 -07:00
Bernie Hackett
8d072d59e8 PYTHON-880 - Backport WriteConcern class from 3.x. 2015-05-21 14:38:44 -07:00
aherlihy
c7f1546358 PYTHON-911 - Add database.client alias 2015-05-20 15:52:58 -07:00
Bernie Hackett
93bef6eb23 PYTHON-915 - More robust latency test. 2015-05-07 15:53:34 -07:00
Bernie Hackett
90efec37ff PYTHON-915 - Allow 0 for secondaryAcceptableLatencyMS. 2015-05-06 18:13:12 -07:00
Bernie Hackett
9bf46d2bb1 PYTHON-920, PYTHON-921 - Fix metadata helpers with direct connection.
With this change metadata helpers (database_names, collection_names,
options, and index_information) no longer require a non-primary read
preference or the slave_okay option to run them against a directly
connected secondary or slave. This was the easiest way to make the
driver behave consistently across MongoDB versions and helpers. This
is also consistent with the server selection spec, though we are not
implementing that spec for PyMongo 2.x.
2015-05-06 09:14:55 -07:00
behackett
5d8194d0f3 PYTHON-913 - Fix test for old python versions. 2015-04-28 17:26:13 -04:00
behackett
b172a1f1a9 PYTHON-913 - Suppress read preference warning under MongoClient. 2015-04-28 15:45:17 -04:00
A. Jesse Jiryu Davis
8e9bd739b0 Longer wait queue timeout in test_auth_network_error. 2015-04-24 22:25:51 -04:00
A. Jesse Jiryu Davis
8c5e547274 PYTHON-903 - Don't *require* a network error in auth test. 2015-04-23 22:08:23 -04:00
A. Jesse Jiryu Davis
f05e800820 Fix test_auth_network_error for replsets.
We added a user then tried to admin with a disconnected client. During
reconnect it may try to log in with a secondary, which hasn't always
replicated the credentials yet. This change uses the global test creds
instead of creating new ones, so replication doesn't confound the test.
2015-04-23 15:24:23 -04:00
A. Jesse Jiryu Davis
22cf7f2918 PYTHON-894 - Can't use addCleanup in PyMongo 2 tests. 2015-04-17 18:54:52 -04:00
A. Jesse Jiryu Davis
2ef99ef692 PYTHON-894 - Can't use addCleanup in PyMongo 2 tests. 2015-04-17 17:36:01 -04:00
A. Jesse Jiryu Davis
f18b3644c2 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 16:19:03 -04:00
Bernie Hackett
773a8dff0b PYTHON-842 - Fix tests for python with no ssl module. 2015-04-14 11:17:32 -07:00
Bernie Hackett
eaaa54b903 PYTHON-893 - Fix application of SON manipulators in CommandCursor. 2015-04-14 11:07:51 -07:00
Bernie Hackett
eda1e771f6 PYTHON-842 - SSL URI config support.
This commit cleans up and builds on the work in commit
cc943f176c.
2015-04-14 10:59:00 -07:00
Len Buckens
cc943f176c allow ssl_cert_reqs options to be passed as string 2015-04-13 12:27:05 -07:00
Bernie Hackett
2598869d26 PYTHON-864 - Support RFC-3339 offset format for $date. 2015-04-13 12:09:58 -07:00
Bernie Hackett
0687e9b656 PYTHON-832 - Disable copy_database auth tests with MongoDB 2.7.2+ 2015-01-28 11:48:42 -08:00
Bernie Hackett
84c34a3d45 Remove redundant test_copy_db_scram_sha_1. 2015-01-28 11:48:27 -08:00
Bernie Hackett
82af07b9c8 Remove "text" command read preference test. 2015-01-20 10:08:15 -08:00
Bernie Hackett
83f53499ae Fix auth DeprecationWarning test. 2014-12-23 15:37:47 -08:00
A. Jesse Jiryu Davis
9e6a267854 PYTHON-786: Silence DeprecationWarnings in test_master_slave_connection. 2014-12-21 17:11:07 -06:00
A. Jesse Jiryu Davis
61f526a2c5 PYTHON-783 Silence copy_database DeprecationWarnings in tests. 2014-12-21 17:11:07 -06:00
A. Jesse Jiryu Davis
31b83bc0e0 PYTHON-807 Silence DeprecationWarnings in getlasterror tests. 2014-12-21 17:11:07 -06:00
A. Jesse Jiryu Davis
be1a7be639 PYTHON-799 Python 2.4 compatibility in test_kill_cursors_warning. 2014-12-17 15:17:59 -05:00
A. Jesse Jiryu Davis
d195c7c70d PYTHON-799 Warn when MongoClient can't close a cursor. 2014-12-17 14:12:36 -05:00
Heewa Barfchin
5c4556b013 Add generator versions of decode_all in bson.
When decoding large collections of bson documents, the python representation
of dicts are time and space costly, so it's sometimes useful to generate and
consume the documents iteratively. This patch adds two new functions to do
that: decode_iter and decode_file_iter. The first is given all the bson data,
but yields one document at a time, while the second reads from a file object
enough to yield one document at a time (to avoid reading in an entire file).
2014-11-21 15:22:24 -08:00
Bernie Hackett
80bcdb3156 PYTHON-791 - Fix JSON support for Timestamp. 2014-11-21 09:26:37 -08:00
A. Jesse Jiryu Davis
cd3d37b43a Skip copydb auth test with mongos. 2014-11-10 19:42:41 -05:00
A. Jesse Jiryu Davis
4579303838 More thorough test_last_error_options. 2014-11-10 18:33:22 -05:00
A. Jesse Jiryu Davis
e1826051f4 Fix TestBulkWriteConcern for MongoDB 2.8. 2014-11-10 18:33:22 -05:00
A. Jesse Jiryu Davis
fd22f89f9e Fix test_last_error_options for MongoDB 2.8. 2014-11-10 18:33:22 -05:00
A. Jesse Jiryu Davis
52f2314947 More reliable TestClientAuth.test_copy_db. 2014-11-07 23:09:42 -05:00
A. Jesse Jiryu Davis
0b7b51975e PYTHON-777 Make copy_database work with SCRAM-SHA-1.
See doc/examples/copydb.rst for details.
2014-11-07 17:13:40 -05:00
A. Jesse Jiryu Davis
bd895ca079 PYTHON-782 Demonstrate error from readchunk() of disconnected GridOut. 2014-11-06 22:18:04 -05:00
Bernie Hackett
6a39f811b2 Manipulate defaults to False in find_and_modify. 2014-11-02 08:06:33 -08:00
Sergey Azovskov
5ccd02653a Added support for manipulate param in find_and_modify for consistency with find method 2014-11-02 08:02:11 -08:00