Commit Graph

32 Commits

Author SHA1 Message Date
aherlihy
193915e636 PYTHON-959 - Connection string spec compliance. 2015-08-06 13:14:31 -04:00
Len Buckens
64009228f8 PYTHON-934 - allow ssl_match_hostname option to be passed as string 2015-06-15 13:16:30 -07:00
Bernie Hackett
aec685b374 Fix up copyright dates. 2015-03-25 11:55:02 -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
8f0bd0a6d4 PYTHON-850 - Change some uses of ConfigurationError to Type/ValueError. 2015-02-26 16:02:25 -08:00
A. Jesse Jiryu Davis
ee11436675 PYTHON-764 SCRAM-SHA-1 automatic upgrade / downgrade. 2014-10-23 16:30:55 -04:00
Luke Lovett
141200083e PYTHON-680 Stop using nose in favor of pure unittest/unittest2 2014-04-25 22:57:33 +00:00
Luke Lovett
4d6d1e067b PYTHON-676 python 2/3 single-source for the test module 2014-04-23 18:37:02 +00:00
behackett
e0b52baf8e PYTHON-672 - Make read preference a class
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.
2014-04-14 16:28:07 -07:00
Bernie Hackett
48a65eb9c1 PYTHON-526 Drop support for slaveOk/slave_okay.
Use any ReadPreference other than PRIMARY instead.
2014-04-04 16:37:32 -07:00
A. Jesse Jiryu Davis
2fa1750b07 Update copyright notices and company name. 2014-01-31 09:36:46 -05:00
hawka
74546ec88d Adding Support for readPreferenceTags and uuidRepresentation in URI parsing. PYTHON-473 2013-08-30 15:38:34 -04:00
A. Jesse Jiryu Davis
78bcc97846 Handle unicode connection URIs in Python 2.4
Unicode MongoDB connection URIs, if they have options like "/?fsync=true", raised a TypeError in old Pythons.
2013-05-01 15:27:45 -04:00
behackett
f09e38879d MONGO-CR -> MONGODB-CR (spec change) 2013-02-15 16:06:38 -08:00
behackett
8de9051228 Remove MongoAuthenticationMechanism PYTHON-465
The spec changed - MongoAuthenticationMechanism is
no longer required.
2013-02-12 14:30:11 -08:00
behackett
18d20ed181 Support GSSAPI (Kerberos) authentication PYTHON-465
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.
2013-02-08 16:04:53 -08:00
Craig Hobbs
e2ec7bd09c Ensure parse_uri accepts readPreference option 2013-01-23 11:03:38 -08:00
Craig Hobbs
f56460b293 Fix uri_parser read_preference validation 2013-01-23 11:03:38 -08:00
A. Jesse Jiryu Davis
6164fcf3f6 float('inf') isn't available everywhere, use 1e100000 instead 2012-11-26 21:45:14 -05:00
Ross Lawley
7577a19703 Add support for unix domain sockets PYTHON-297 2012-10-23 23:45:27 +00:00
A. Jesse Jiryu Davis
28a7ed9a93 Prohibit +/-infinity as timeout values 2012-10-06 11:19:17 -07:00
behackett
0ee7170cc2 It's 2012... 2012-04-19 12:40:38 -07: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
behackett
11abdfe08d Fix max_pool_size and tz_aware validation. 2012-03-16 16:45:24 -07:00
Ross Lawley
afcd0f6900 PYTHON-319 Use urllib.unquote_plus
Makes userinfo parser handle `+` signs as spaces.
If `+` signs were used then they will now need to
be escaped.
2012-02-08 15:39:39 -08:00
behackett
d0d0ec3f81 socket|connectTimeoutMS can be a float 2011-10-26 14:37:52 -07:00
Bernie Hackett
b9d732a556 Support (connect|socket)TimeoutMS, PYTHON-269
This change also includes some validation clean-ups
and fixes some problems in the Pool class.
2011-10-02 03:07:59 -07: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
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
behackett
66de08678d Fix a style issue pylint somehow missed. 2011-05-09 15:50:06 -07:00
behackett
80d3d3856d Add a new uri_parser module PYTHON-243
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
2011-05-09 15:32:34 -07:00