Commit Graph

30 Commits

Author SHA1 Message Date
Bernie Hackett
9d47f1cd3d PYTHON-691 - Fix UserWarning command issues.
Don't raise UserWarning for helpers and internal calls to
commands that do not obey read preference.
2014-05-01 09:21:52 -07:00
A. Jesse Jiryu Davis
2fa1750b07 Update copyright notices and company name. 2014-01-31 09:36:46 -05:00
Bernie Hackett
add8d4fd6a More warnings cleanup. 2013-10-31 12:04:21 -07:00
A. Jesse Jiryu Davis
459d34fd93 Unused import 2013-10-20 17:18:32 -04:00
behackett
0217091284 Fix tests with MongoDB 2.5.x and --nojournal. 2013-09-24 18:15:37 -07:00
hawka
74546ec88d Adding Support for readPreferenceTags and uuidRepresentation in URI parsing. PYTHON-473 2013-08-30 15:38:34 -04:00
Ross Lawley
bc6368dafa Fixing write concern logic on a collection - PYTHON-474
Adding warnings in documentation about a change
in side effects when calling write_concern
2013-03-21 09:42:50 +00:00
A. Jesse Jiryu Davis
8536acb4a0 Standardize tests' handling of DB_IP and DB_PORT, fix PYTHON-475 2013-02-19 15:09:28 -05:00
A. Jesse Jiryu Davis
d35bec12e5 Tests use MongoClient instead of Connection PYTHON-451 2013-02-11 20:57:17 -05:00
behackett
118ab45001 Tests should clean up after themselves. 2013-01-23 13:10:54 -08:00
Ross Lawley
417cbb9b5c Remove equality test for ReplicaSetConnection 2012-11-22 12:03:22 +00:00
Ross Lawley
e51b3e6f1c Remove equality test for MongoReplicaSetClient
It doesn't implement an equality check.
2012-11-22 11:53:56 +00:00
Ross Lawley
29b9de45db Added __ne__ for DBRefs PYTHON-440 2012-11-22 11:12:36 +00:00
Bernie Hackett
fc0ce0dfe9 Fix skiptest issue. 2012-11-16 14:52:31 -08:00
behackett
afe49a4002 MongoClient/MongoReplicaSetClient PYTHON-423
This change adds two new top level classes, MongoClient
and MongoReplicaSetClient. They work almost exactly the
same as Connection and ReplicaSetConnection with a few
differences:

1. These connection objects awknowledge write operations by default.
2. The network_timeout parameter is gone, use socketTimeoutMS instead.
3. auto_start_request defaults to False.

Default acknowledged write operation will be the biggest change for
most users. Using MongoClient and MongoReplicaSetClient you no longer
have to pass safe=True to a write method (save, update, insert, remove)
to request an acknowledgement from the server.

Connection and ReplicaSetConnection are now deprecated but retain their
previous behavior. This should not be a backward breaking change.
2012-11-16 13:39:18 -08:00
behackett
8dd2670182 New write concern API PYTHON-427
This change deprecates get|set|unset_lasterror_options,
replacing them with a write_concern attribute that can be
accessed directly. See the write_concern docstring for
an example of its use.
2012-11-06 14:44:46 -08:00
A. Jesse Jiryu Davis
4d69ed38da Respect DB_HOST and DB_IP environment variables in test_common.py 2012-09-05 16:07:02 -04:00
Ross Lawley
11c3f3a8dd Fix handling of safe=False PYTHON-358 2012-07-27 08:55:30 +01:00
behackett
0ee7170cc2 It's 2012... 2012-04-19 12:40:38 -07:00
A. Jesse Jiryu Davis
62e0c23d67 Don't drop databases unnecessarily during tests, saves about 35% of unittest time PYTHON-320 2012-03-19 12:16:33 -04:00
behackett
2d21ba9376 Replace deprecated unittest assert method aliases.
assert_ -> assertTrue
assertEquals -> assertEqual

This is needed to clean up deprecation warnings
in python >= 3.2
2012-03-16 17:20:21 -07:00
A. Jesse Jiryu Davis
fa296b1711 Style fixes and import cleanups 2012-02-08 18:21:26 -08:00
A. Jesse Jiryu Davis
ae51cc45fe Use 'localhost' interface, avoid weird auth error in test_common 2012-02-08 18:21:26 -08:00
Bernie Hackett
3f76c9a1e0 Minor style changes. 2011-12-14 07:09:25 -08:00
A. Jesse Jiryu Davis
00c376f69d Respect the DB_PORT environment variable in all unittests 2011-12-14 06:53:02 -08:00
behackett
63266d025e Be a little smarter about deprecation warnings. 2011-12-02 15:21:57 -08:00
behackett
a8314bf22d Support w=<basestring> for tagging PYTHON-268.
See http://www.mongodb.org/display/DOCS/Data+Center+Awareness
for a full explanation.
2011-09-09 17:02:35 -07:00
behackett
145a05be09 Support journal and wtimeoutMS URI aliases.
This commit also cleans up some code related to
URI options that were never supported in pymongo
and have been removed from the URI spec.
2011-08-01 14:48:34 -07:00
behackett
02724d61d2 Ensure we can override slave_okay per-query. 2011-06-02 10:22:39 -07:00
behackett
7212fb6006 slaveok and safe enhancement PYTHON-181 PYTHON-246
This change adds a new module common.py with some
common functions and classes used in a number of
pymongo modules.

The most important of these is the BaseObject class.
This provides a new base class that Connection, Database,
and Collection inherit from. The class provides attributes
common to each of these subclasses including slave_okay,
safe and getlasterror options.

With this change you can now set slaveok, safe, w, wtimeout,
fsync and j at the Connection, Database, Collection or per-
operation level. Each level inherits from and can override
the previous.

All of these options are now supported as keyword parameters
to connection.Connection and in the mongodb URI.
2011-05-19 14:15:58 -07:00