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.
This commit introduces the following changes:
- Each read preference is now a class.
- Read preferences other than Primary accept a tag_sets parameter.
- The tag_sets attribute of MongoClient, Database, and Collection has
been removed. Use the tag_sets parameter of the new classes instead.
- The read_preferences.ReadPreference constant still exists and should
continue to work as expected for most users.
This only works with the subscriber addition of MongoDB
>= 2.4 and requires the python "kerberos" module, sometimes
referred to as pykerberos.
http://pypi.python.org/pypi/kerberos
This change also adds support for the authMechanism
and authSource URI options.
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.
This change moves the URI parsing code out
of pymongo.connection and into a new module,
pymongo.uri_parser. It also adds validation
for all MongoDB URI options currently supported
by pymongo as well as some that will be supported
in pymongo-2.0. an UnsupportedOption error
(inheriting from ConfigurationError) is raised
if the URI includes an option pymongo doesn't
support or recognize.
The primary entry point for uri_parser is
uri_parser.parse_uri which returns a dict of the
results from parsing the URI. See the documentation
for more details