minor: 1.5.1+ -> 1.5.2+
This commit is contained in:
parent
13d2185869
commit
f25af4d7ee
@ -41,7 +41,7 @@ class GridFS(object):
|
||||
- `database`: database to use
|
||||
- `collection` (optional): root collection to use
|
||||
|
||||
.. versionadded:: 1.5.1+
|
||||
.. versionadded:: 1.5.2+
|
||||
The `collection` parameter.
|
||||
|
||||
.. mongodoc:: gridfs
|
||||
@ -66,7 +66,7 @@ class GridFS(object):
|
||||
:Parameters:
|
||||
- `**kwargs` (optional): keyword arguments for file creation
|
||||
|
||||
.. versionadded:: 1.5.1+
|
||||
.. versionadded:: 1.5.2+
|
||||
"""
|
||||
return GridIn(self.__collection, **kwargs)
|
||||
|
||||
@ -91,7 +91,7 @@ class GridFS(object):
|
||||
- `data`: data to be written as a file.
|
||||
- `**kwargs` (optional): keyword arguments for file creation
|
||||
|
||||
.. versionadded:: 1.5.1+
|
||||
.. versionadded:: 1.5.2+
|
||||
"""
|
||||
grid_file = GridIn(self.__collection, **kwargs)
|
||||
try:
|
||||
@ -109,7 +109,7 @@ class GridFS(object):
|
||||
:Parameters:
|
||||
- `file_id`: ``"_id"`` of the file to get
|
||||
|
||||
.. versionadded:: 1.5.1+
|
||||
.. versionadded:: 1.5.2+
|
||||
"""
|
||||
return GridOut(self.__collection, file_id)
|
||||
|
||||
@ -128,7 +128,7 @@ class GridFS(object):
|
||||
:Parameters:
|
||||
- `filename`: ``"filename"`` of the file to get
|
||||
|
||||
.. versionadded:: 1.5.1+
|
||||
.. versionadded:: 1.5.2+
|
||||
"""
|
||||
self.__files.ensure_index([("filename", ASCENDING),
|
||||
("uploadDate", DESCENDING)])
|
||||
@ -156,7 +156,7 @@ class GridFS(object):
|
||||
:Parameters:
|
||||
- `file_id`: ``"_id"`` of the file to delete
|
||||
|
||||
.. versionadded:: 1.5.1+
|
||||
.. versionadded:: 1.5.2+
|
||||
"""
|
||||
self.__files.remove({"_id": file_id}, safe=True)
|
||||
self.__chunks.remove({"files_id": file_id})
|
||||
@ -165,7 +165,7 @@ class GridFS(object):
|
||||
"""List the names of all files stored in this instance of
|
||||
:class:`GridFS`.
|
||||
|
||||
.. versionchanged:: 1.5.1+
|
||||
.. versionchanged:: 1.5.2+
|
||||
Removed the `collection` argument.
|
||||
"""
|
||||
return self.__files.distinct("filename")
|
||||
@ -173,7 +173,7 @@ class GridFS(object):
|
||||
def open(self, *args, **kwargs):
|
||||
"""No longer supported.
|
||||
|
||||
.. versionchanged:: 1.5.1+
|
||||
.. versionchanged:: 1.5.2+
|
||||
The open method is no longer supported.
|
||||
"""
|
||||
raise UnsupportedAPI("The open method is no longer supported.")
|
||||
@ -181,7 +181,7 @@ class GridFS(object):
|
||||
def remove(self, *args, **kwargs):
|
||||
"""No longer supported.
|
||||
|
||||
.. versionchanged:: 1.5.1+
|
||||
.. versionchanged:: 1.5.2+
|
||||
The remove method is no longer supported.
|
||||
"""
|
||||
raise UnsupportedAPI("The remove method is no longer supported. "
|
||||
|
||||
@ -32,17 +32,17 @@ class CorruptGridFile(GridFSError):
|
||||
class NoFile(GridFSError):
|
||||
"""Raised when trying to read from a non-existent file.
|
||||
|
||||
.. versionadded:: 1.5.1+
|
||||
.. versionadded:: 1.5.2+
|
||||
"""
|
||||
|
||||
class UnsupportedAPI(GridFSError):
|
||||
"""Raised when trying to use the old GridFS API.
|
||||
|
||||
In version 1.5.1+ of the PyMongo distribution there were backwards
|
||||
In version 1.5.2+ of the PyMongo distribution there were backwards
|
||||
incompatible changes to the GridFS API. Upgrading shouldn't be
|
||||
difficult, but the old API is no longer supported (with no
|
||||
deprecation period). This exception will be raised when attempting
|
||||
to use unsupported constructs from the old API.
|
||||
|
||||
.. versionadded:: 1.5.1+
|
||||
.. versionadded:: 1.5.2+
|
||||
"""
|
||||
|
||||
@ -401,7 +401,7 @@ class GridOut(object):
|
||||
class GridFile(object):
|
||||
"""No longer supported.
|
||||
|
||||
.. versionchanged:: 1.5.1+
|
||||
.. versionchanged:: 1.5.2+
|
||||
The GridFile class is no longer supported.
|
||||
"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
@ -38,7 +38,7 @@ SLOW_ONLY = 1
|
||||
ALL = 2
|
||||
"""Profile all operations."""
|
||||
|
||||
version = "1.5.1+"
|
||||
version = "1.5.2+"
|
||||
"""Current version of PyMongo."""
|
||||
|
||||
Connection = PyMongo_Connection
|
||||
|
||||
@ -280,7 +280,7 @@ class Database(object):
|
||||
- `**kwargs` (optional): additional keyword arguments will
|
||||
be added to the command document before it is sent
|
||||
|
||||
.. versionchanged:: 1.5.1+
|
||||
.. versionchanged:: 1.5.2+
|
||||
Added the `value` argument for string commands, and keyword
|
||||
arguments for additional command options.
|
||||
.. versionchanged:: 1.5
|
||||
|
||||
Loading…
Reference in New Issue
Block a user