Commit Graph

120 Commits

Author SHA1 Message Date
Bernie Hackett
749c1a2f0b PYTHON-1467 - PyMongo no longer supports Python 2.6 2018-07-02 15:15:43 -07:00
Bernie Hackett
709b28467f PYTHON-1586 - Deprecate database_names and collection_names 2018-06-18 10:52:11 -07:00
Bernie Hackett
8cc2f72e20 PYTHON-1471 - Reenable arbiter tests on 4.0 and latest 2018-06-04 13:54:38 -07:00
Shane Harvey
5a652be993 PYTHON-1508 Add read_preference to TransactionOptions
All read operations use the transaction's read preference.
Add transaction read preference spec tests.
Remove write test in test_read_preferences.
2018-05-08 11:38:28 -07:00
Shane Harvey
3c6ffb895e PYTHON-1471 Disable failing arbiter tests on MongoDB latest 2018-02-27 09:45:56 -08:00
Bernie Hackett
507f954ed4 Update copyright dates 2017-12-01 17:23:39 -08:00
A. Jesse Jiryu Davis
3cba982db9 PYTHON-1332 - Test lsid with all commands 2017-09-29 14:52:26 -04:00
A. Jesse Jiryu Davis
b273d94358 PYTHON-1299 - Use new wire version in tests 2017-08-24 08:57:36 -04:00
Bernie Hackett
aa5249068a PYTHON-1235 - Fix auto reconnect test under Jython 2017-02-17 13:55:50 -08:00
Bernie Hackett
b90295d806 PYTHON-1221 - Skip test_ipv6 with TLS and no ipaddress module 2017-02-17 13:55:50 -08:00
Bernie Hackett
f677556f0d PYTHON-1203 - Fix TestReplicaSetClient.test_ipv6 2017-02-17 13:55:50 -08:00
Shane Harvey
0a2961b4c4 PYTHON-1203 Disable test_replica_set_client.test_ipv6 2017-02-17 13:55:50 -08:00
Bernie Hackett
ba6ef88d10 PYTHON-1026 - Single member replica set testing 2016-11-15 15:25:04 -08:00
Shane Harvey
1f30c3ba99 PYTHON-1152 Update common.MAX_SUPPORTED_WIRE_VERSION for MongoDB 3.4 2016-10-13 11:29:32 -07: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
A. Jesse Jiryu Davis
2964f53423 Test failures with capitalized hostname. 2016-06-20 15:27:17 -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
596f80fc8d PYTHON-985 - MongoClient properties now block until connected 2015-11-18 15:02:38 -08:00
Luke Lovett
5140166772 PYTHON-928 - Fix tests around MongoReplicaSetClient __repr__ to expect original seed list instead of discovered nodes. 2015-07-17 16:41:06 -07:00
Bernie Hackett
aec685b374 Fix up copyright dates. 2015-03-25 11:55:02 -07: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
A. Jesse Jiryu Davis
f757eb0433 Some unused imports in tests. 2015-03-11 21:56:44 -04:00
aherlihy
c23fde58f5 Added server selection timeout to hanging tests. 2015-03-11 14:43:55 -07:00
aherlihy
70c06d11a9 PYTHON-813 Removed client_knobs where no longer needed 2015-03-11 13:03:59 -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
6bacdaafaa PYTHON-851 - Clean up MongoClient properties. 2015-03-08 20:23:07 -07:00
Bernie Hackett
b71526a2da PYTHON-836 - Always set slaveOk bit for non-mongos direct connection. 2015-03-07 11:09:16 -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
0a75f04384 Remove pre-MongoDB-2.0 version checks from tests. 2015-01-26 16:19:12 -05:00
Bernie Hackett
4e13a39db9 PYTHON-812 - Make local threshold global and immutable. 2015-01-08 11:21:54 -08:00
A. Jesse Jiryu Davis
47a736da89 PYTHON-799 Avoid deadlock in Cursor destructor with PyPy.
Use a background thread to periodically close destroyed
cursors instead of killing them directly from Cursor.__del__.
2015-01-05 15:21:51 -05:00
Bernie Hackett
1b1457ab1f PYTHON-677 - Finish transition to WriteConcern. 2014-12-20 22:34:48 -08:00
Bernie Hackett
f6a260c683 PYTHON-805 - Add with_options and remove per helper read_preference
This change removes the read_preference parameter from various
command helpers on the Collection object. Those options were
never shipped in a PyMongo release. It also documents which
helpers obey Collection.read_preference.

The bigger change is the removal of the read_preference, tag_sets,
and secondary_acceptable_latency_ms params from find() and find_one()
- a major backward breaking change. Collection.with_options
is intended to replace their use.

coll.find(read_preference=ReadPreference.SECONDARY)

changes to

coll.with_options(read_preference=ReadPreference.SECONDARY).find()
2014-12-17 15:06:03 -08:00
A. Jesse Jiryu Davis
108e97baad Unused imports in tests. 2014-12-10 14:11:33 -05:00
A. Jesse Jiryu Davis
e8be121a89 PYTHON-785 Don't use requests in tests. 2014-11-20 22:57:56 -05:00
A. Jesse Jiryu Davis
daad4446f8 Rename connection_id and conn_id to "address". 2014-11-18 17:40:34 -05:00
A. Jesse Jiryu Davis
ff7958ad38 PYTHON-525 Helpful connection error messages. 2014-11-18 12:14:35 -05:00
A. Jesse Jiryu Davis
0e222c4c4c Rename "set_name" to "replica_set_name".
Rename the attributes of IsMaster, ServerDescription, TopologyDescription, and
TopologySettings from "set_name" to "replica_set_name" for greater clarity.
2014-11-17 20:29:16 -05:00
A. Jesse Jiryu Davis
0a246d2033 Standardize how tests construct MongoClients. 2014-10-30 19:36:59 -04:00
A. Jesse Jiryu Davis
c5eae2f99f Use replica set connection in tests wherever possible.
Most tests now inherit from IntegrationTest and use self.client for all MongoDB
operations. self.client is now a replica set connection if an RS is available,
otherwise a connection to a standalone.
2014-10-07 13:36:52 -04:00
A. Jesse Jiryu Davis
8e8a7334dd Fix test_not_master_error for auth. 2014-09-25 16:34:16 -04:00
A. Jesse Jiryu Davis
6641d04882 Unused imports. 2014-09-25 16:34:15 -04:00
A. Jesse Jiryu Davis
28d40f5745 Redundant implementation of partition_node(). 2014-09-25 16:34:15 -04:00
A. Jesse Jiryu Davis
fabff670af NotMasterError, not AutoReconnect, on w=0 write to secondary.
Not a breaking change, since NotMasterError inherits from AutoReconnect. But a
NotMasterError is more consistent with the original intent: bail as if we'd done a
getLastError.
2014-09-25 11:33:44 -04:00
A. Jesse Jiryu Davis
5405d93467 Remove unused test method "assertSoon". 2014-09-24 10:04:57 -04:00
A. Jesse Jiryu Davis
3c9fd60fed PYTHON-525 Use MongoClient in replica set tests.
Connect the MongoClient to the replica set if one is running,
otherwise connect it to the standalone. Only continue to use
MongoReplicaSetClient when testing the specific behavior of
that deprecated class.

Also suppress some warnings when running tests, and better
determine whether to test IPv6.
2014-09-20 08:42:23 -04:00
A. Jesse Jiryu Davis
735a1247ca PYTHON-525 Deprecate MongoReplicaSetClient.
MongoClient now supports all MongoReplicaSetClient's features.
Fix bugs and add features in the new MongoClient to bring it up
to spec. MongoReplicaSetClient is now a deprecated stub that
subclasses MongoClient.

Introduce new errors, NetworkTimeout and NotMasterError, to
communicate events that MongoClient must handle specially.
2014-09-16 15:33:19 -04:00
A. Jesse Jiryu Davis
a801c38d4a PYTHON-525 Restart monitor threads after fork.
A reimplementation of PYTHON-549 for PyMongo 3's new MongoClient.
2014-09-09 16:14:59 -04:00