A. Jesse Jiryu Davis
fd9abff394
Docstring grammar
2013-01-31 11:33:25 -05:00
Ross Lawley
2435f8609d
GridFS.new_file fails to raise FileExists
...
When using a manual _id - PYTHON-453
2013-01-07 14:30:04 +00:00
behackett
139459beb9
Replace safe with w in internal methods PYTHON-437
2012-11-19 16:29:15 -08:00
A. Jesse Jiryu Davis
b47f679a17
GridFS writes must be in request PYTHON-423
2012-11-19 16:25:09 -05:00
A. Jesse Jiryu Davis
c503f1dbad
Higher-performance solution to PYTHON-417
2012-10-18 14:51:03 -04:00
A. Jesse Jiryu Davis
0223027ecf
Ensure writing a chunk to an existing file raises FileExists PYTHON-417
2012-10-15 19:14:35 -04:00
A. Jesse Jiryu Davis
713fecedbf
Insert chunks into GridFS with safe=True to avoid out-of-order inserts via mongos PYTHON-417
...
Inserts into fs.chunks via mongos, even though they're using a single
connection, can succeed out-of-order due to the writebackListener.
We mustn't call "filemd5" until all inserts are complete, which we
ensure by calling getLastError after inserting each chunk.
2012-10-15 17:17:15 -04:00
A. Jesse Jiryu Davis
ab024028f2
Add GridOut attribute 'filename' as alias for 'name' PYTHON-412
2012-09-26 16:26:39 -04:00
A. Jesse Jiryu Davis
2446ca96c8
Add GridIn attribute 'name' as alias for 'filename' PYTHON-412
2012-09-26 16:26:39 -04:00
A. Jesse Jiryu Davis
4fa7a6fa17
Send to server any attributes set on GridIn before close() PYTHON-411
2012-09-26 16:26:39 -04:00
A. Jesse Jiryu Davis
0a5b98721c
Spelling
2012-09-14 12:56:11 -04:00
behackett
c188836d64
Fallback to StringIO if cStringIO doesn't exist.
2012-08-03 14:28:53 -07:00
A. Jesse Jiryu Davis
f275b2291a
Implement read preferences for distributing reads among replica set members PYTHON-367
...
Replace the 'mongo' dict with a Member object everywhere in ReplicaSetConnection.
A handful of commands obey read preferences; most are always sent to primary.
Track a 5-sample moving average of each replica set member's ping time.
Connection detects whether it's connected to primary, secondary, or mongos.
2012-07-25 00:05:06 -04:00
behackett
e0fcc9825f
Fix a minor docstring issue.
2012-04-20 15:57:24 -07:00
behackett
0ee7170cc2
It's 2012...
2012-04-19 12:40:38 -07:00
Bernie Hackett
ef803527bb
Python 3 gridfs package changes PYTHON-84
2012-03-22 14:42:34 -07:00
behackett
a4ea04cb7f
Guard against PHP-237 - PYTHON-290
2011-11-11 15:49:52 -08:00
behackett
4fa59c2fd8
Query GridFS from a secondary/slave PYTHON-263
2011-11-01 21:08:41 -07:00
Dan Crosta
59758053a0
avoid making extra queries when using get_[last_]version
2011-09-29 13:02:46 -07:00
behackett
5948ed94b5
Don't add a _closed field to files PYTHON-278
...
GridIn was adding a _closed field to each file
in the files collection. This seems incorrect and
adds another round trip to the server when closing
the file.
2011-08-31 14:40:09 -07:00
Alexey Borzenkov
7b0d289982
PYTHON-271: fix GridFS loss of data
2011-08-15 14:01:29 -07:00
Josip Delic
085a7e7d30
also use StringIO for writing strings in gridfs performance boost
2011-05-29 08:28:28 -07:00
Bernie Hackett
10b451a3cd
close method and code/test cleanups PYTHON-209
2011-05-29 07:39:20 -07:00
Jonas Haag
09017cb53c
Allow GridOut to be used in a with statement. (PYTHON-209)
2011-05-29 06:57:51 -07:00
behackett
a048cc63b2
Fix version numbers in a few comments.
2011-05-06 12:07:33 -07:00
Dan Crosta
23bf1bb2a5
always ensure_index, it has minimal overhead
2011-04-28 12:03:54 -07:00
Dan Crosta
ae189fa7dd
ensure_index when querying by filename only
2011-04-28 12:03:54 -07:00
Dan Crosta
96c66f5269
whoops, meant 1.10.1+
2011-04-28 12:03:54 -07:00
Dan Crosta
b95dfcdaa1
use versionchanged for default value of filename
2011-04-28 12:03:54 -07:00
Dan Crosta
10e6cfea50
no need to copy the kwargs dict
2011-04-28 12:03:54 -07:00
Dan Crosta
80f7fa7f79
be consistent with how we limit fields in other methods
2011-04-28 12:03:54 -07:00
Dan Crosta
2683affc4d
clean up docstrings per behackett's comments
2011-04-28 12:03:54 -07:00
Dan Crosta
afeda6df59
allow querying by metadata in GridFS.get_[last_]version()
2011-04-28 12:03:54 -07:00
Dan Crosta
b4665592ec
only return _id when querying from GridFS.get_version()
2011-04-28 12:03:54 -07:00
Dan Crosta
8df44533e6
correct a typo in GridOut.__getattr__
2011-04-26 14:31:14 -07:00
Mathias Stearn
066be855b9
more documentation PYTHON-168
2010-10-21 17:29:22 -04:00
Mike Dirolf
4087168bcb
minor: spacing
2010-09-29 11:45:28 -04:00
Mike Dirolf
1992b6cd29
BUMP 1.9
2010-09-28 10:48:46 -04:00
Mike Dirolf
7cde8c744f
outdated todo
2010-09-23 14:48:57 -04:00
Mike Dirolf
9c182809f3
Create a separate bson package PYTHON-60
...
Many of the pymongo modules have been moved into the bson
package. Aliases for those modules have been added to the pymongo
package, without deprecation warnings for now. Application developers
should begin to use the bson namespace, as deprecation of moved
modules will probably begin in the next release.
2010-09-14 13:52:50 -04:00
Mike Dirolf
64f9641609
allow updating (some) file metadata after a GridIn has been closed PYTHON-116
2010-09-07 15:43:38 -04:00
Mike Dirolf
68a6be85c5
slight cleanup and add Christian to contributors list
2010-09-03 12:17:38 -04:00
Christian Wyglendowski
fee7ff8a75
Performance improvements for reading from GridFS.
...
Switched to join()ing strings instead of concatenating them. The time
spent in GridOut.read() is now less than 1% of what it was before. All
tests pass.
Before:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.001 0.001 grid_file.py:316(__init__)
1 1.362 1.362 1.901 1.901 grid_file.py:375(read)
32 0.000 0.000 0.000 0.000 grid_file.py:54(getter)
After:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.001 0.001 grid_file.py:316(__init__)
1 0.005 0.005 0.567 0.567 grid_file.py:375(read)
32 0.000 0.000 0.000 0.000 grid_file.py:54(getter)
2010-09-04 00:06:17 +08:00
Mike Dirolf
f157a35377
allow writing unicode to GridFS if an encoding attribute has been specified PYTHON-100
2010-08-31 12:25:45 -04:00
Mike Dirolf
9ddabb9b0b
add gridfs get_version method PYTHON-115
2010-08-30 16:26:09 -04:00
Mike Dirolf
8098845c0e
add readline to GridOut PYTHON-157
2010-08-20 11:26:36 -04:00
Mike Dirolf
b4fe7faefc
only need _id for exists
2010-08-17 16:55:06 -04:00
Mike Dirolf
1cfa801f02
add file_document param to GridOut to initialize from existing file doc PYTHON-117
2010-08-16 17:09:45 -04:00
Mike Dirolf
a3a8cf2d79
BUMP 1.8 - see changelog for details
2010-08-05 10:04:37 -04:00
Mike Dirolf
a264d75483
towards pep8
2010-07-22 11:38:22 -04:00