jbergstroem
ec22172030
s/failIf/assertFalse
2010-08-11 03:44:06 +08:00
Mike Dirolf
eafe0062d5
skip test for old server versions
2010-08-03 13:57:26 -04:00
Mike Dirolf
159ebcc62d
support for w, wtimeout, fsync, and any future getlasterror options
2010-08-03 11:24:24 -04:00
Mike Dirolf
057a1ebe61
make test more lenient, there's a race condition that we don't care about
2010-07-30 14:07:24 -04:00
Mike Dirolf
6150f39629
test and doc for Connection.nodes
2010-07-30 13:36:43 -04:00
Mike Dirolf
dea373fea3
test that already passes
2010-07-29 12:53:56 -04:00
Mike Dirolf
7a2b5259da
Pool -> _Pool
2010-07-27 16:36:12 -04:00
Mike Dirolf
ebf39f7d62
use module level functions instead of staticmethods
2010-07-22 11:23:29 -04:00
Mike Dirolf
9b8b714377
fix bug in python bson decoder for as_class with embedded lists
2010-07-21 15:12:12 -04:00
Mike Dirolf
8bb0db507e
cap connection pool size at 10 open sockets PYTHON-144
2010-07-21 14:51:19 -04:00
Mike Dirolf
363695345d
change tz_aware=False to be the default, so we're backwards compatible
2010-07-21 10:49:35 -04:00
Mike Dirolf
a8bb1038e6
docs, deprecate Connection.from_host and Connection.paired (use __init__ instead)
2010-07-15 14:18:33 -04:00
Mike Dirolf
0726f21543
Rework connection handling, and add support for replSets
2010-07-15 11:58:10 -04:00
Mike Dirolf
0110cd66cf
replace paired logic w/ a call to __init__
2010-07-12 11:26:03 -04:00
Mike Dirolf
9307c3d011
More flexible host parameter for Connection.
...
Can take a MongoDB URI (replaces Connection.from_uri) or a list of
hosts/URIs. In preparation for supporting replsets.
2010-07-12 11:24:46 -04:00
Mike Dirolf
58335bb16e
fix test
2010-06-29 15:26:23 -04:00
Mike Dirolf
2a37d25827
Use timezone aware datetimes in Timestamp and json_util.
...
These are the last two places that aren't properly using/handling
timezone_aware datetime instances. This is a BREAKING change,
depending on how an application is using the datetime instances
returned.
2010-06-29 10:30:00 -04:00
Mike Dirolf
c25e5c4bd3
better (tz aware) datetime handling for ObjectId methods (possibly BREAKING)
2010-06-29 10:18:05 -04:00
Mike Dirolf
2d8c93940f
Adding a drop() helper on Collection instances PYTHON-126
2010-06-28 17:55:51 -04:00
Mike Dirolf
8c8e56ffb7
Add the socket used in __find_master to the pool if we find the master PYTHON-131
2010-06-28 17:34:05 -04:00
Mike Dirolf
491c06a59a
Add tz_aware option to Connection() PYTHON-125
...
Defaults to True, which is the new behavior. For full backwards
compatibility, set tz_aware to False.
2010-06-28 17:03:41 -04:00
Kristina Chodorow
e92eb400a1
add json serialization/deserialization for MinKey, MaxKey, and Timestamp
2010-06-28 22:17:20 +08:00
Mike Dirolf
ad4ecbd024
make the bson decoder optionally decode datetimes as naive PYTHON-125
2010-06-23 16:45:08 -04:00
Mike Dirolf
8327335733
Decode datetime instances as UTC/aware PYTHON-125
...
The C implementation of this is *very* ugly, but might be as good as
we can get. Any improvements/suggestions are appreciated.
This is a BREAKING change if application code was depending on
datetimes being naive (i.e. comparisons and subtractions between aware
and naive datetimes are not supported by Python), but most apps
*probably* aren't. We might need to change this somehow before the
next release...
2010-06-22 17:52:55 -04:00
Mike Dirolf
2cf37f77a0
add network_timeout option for individual calls to find/find_one - overrides Connection default PYTHON-127
2010-06-22 11:44:55 -04:00
Mike Dirolf
169ec824dc
add GridFS.exists method PYTHON-132
2010-06-22 10:51:04 -04:00
Mike Dirolf
6b0a9ccb62
Allow additional keys to be added to DBRef instances. PYTHON-133
2010-06-21 17:26:38 -04:00
Mike Dirolf
8b76667b42
add document_class to MasterSlaveConnection
2010-06-21 16:45:21 -04:00
Mike Dirolf
a125034837
add code attribute to OperationFailure exceptions
2010-06-21 12:23:57 -04:00
Jonas Haag
be2470a485
Fixed serialization of int and float subclasses in the C BSON module.
...
Subclasses of int and float are now handled as if they were ints/floats
in the C module.
Technically, this was done by replacing Py{Int,Float}_CheckExact by
Py{Int,Float}_Check. I had to move the PyBool_Check thing above the
int/float checks to keep the original behaviour regarding boolean
values.
I added tests to tests/test_bson.py. They succeed.
2010-06-21 22:59:35 +08:00
Mike Dirolf
790f87be4a
actually, keep using subtype 2 as default for a while
2010-06-17 11:37:19 -04:00
Mike Dirolf
be157dd399
minor: another test fix
2010-06-16 15:05:58 -04:00
Mike Dirolf
64c0403d16
minor: fix test
2010-06-16 15:04:44 -04:00
Mike Dirolf
ce965158d6
use subtype 0 as default for Binary, instead of 2
2010-06-16 12:13:25 -04:00
Mike Dirolf
359fbd8535
support for MaxKey and MinKey PYTHON-75
2010-06-04 13:58:49 -04:00
Mike Dirolf
5c8eb64e70
fix test
2010-06-04 13:05:19 -04:00
Mike Dirolf
cf46feb79e
timestamps need to use unsigned in bson encoder/decoder
2010-06-04 12:50:22 -04:00
Mike Dirolf
86a3b2ab5a
clean up command response checking
2010-06-04 12:16:08 -04:00
Mike Dirolf
a8ef8fc2af
accept any type for remove by _id, not just ObjectId
2010-05-24 10:51:55 -04:00
Mike Dirolf
cf99775373
BREAKING change to index_information so that we can support unique status and any other options in system.indexes PYTHON-72
2010-05-18 16:35:09 -04:00
Mike Dirolf
66fe4a4597
test that already passes
2010-05-18 16:13:09 -04:00
Mike Dirolf
472c6cfee6
test that already passes
2010-05-18 15:42:15 -04:00
Mike Dirolf
353d42a428
do index_information query as_class SON PYTHON-120
2010-05-18 13:50:30 -04:00
Mike Dirolf
afa57fa97f
add document_class parameter/property to Connection
2010-05-18 13:41:28 -04:00
Mike Dirolf
88c20df8ec
add as_class parameter for find() and find_one()
2010-05-18 12:53:59 -04:00
Mike Dirolf
9ebd7375de
make find() just a pass-through to Cursor __init__, explicitly doc Collection rather than relying on autodoc
2010-05-18 12:04:49 -04:00
Mike Dirolf
7a43744cfa
implementation of as_class for bson.py
2010-05-17 14:12:57 -04:00
Mike Dirolf
c2dc7856fa
this test was buggy
2010-05-12 16:52:29 -04:00
Mike Dirolf
ff1f1bff58
allow creating Timestamp instances from datetimes
2010-05-12 16:27:23 -04:00
Mike Dirolf
46b378849a
update rename so it'll work for the oplog and can take the dropTarget option
2010-05-12 15:47:51 -04:00