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.
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.
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.