diff --git a/doc/api/pymongo/timestamp.rst b/doc/api/pymongo/timestamp.rst index dac776877..6ec3d856d 100644 --- a/doc/api/pymongo/timestamp.rst +++ b/doc/api/pymongo/timestamp.rst @@ -1,6 +1,6 @@ :mod:`timestamp` -- Tools for representing MongoDB internal Timestamps ====================================================================== -.. versionadded:: 1.4+ +.. versionadded:: 1.5 .. automodule:: pymongo.timestamp :synopsis: Tools for representing MongoDB internal Timestamps diff --git a/doc/changelog.rst b/doc/changelog.rst index 4df1afb74..cd77db9e0 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -1,6 +1,41 @@ Changelog ========= +Changes in Version 1.5 +---------------------- +- added subtype constants to :mod:`~pymongo.binary` module. +- DEPRECATED `options` argument to + :meth:`~pymongo.collection.Collection` and + :meth:`~pymongo.database.Database.create_collection` in favor of + kwargs. +- added :meth:`~pymongo.has_c` to check for C extension. +- added :meth:`~pymongo.connection.Connection.copy_database`. +- added :data:`~pymongo.cursor.Cursor.alive` to tell when a cursor + might have more data to return (useful for tailable cursors). +- added :class:`~pymongo.timestamp.Timestamp` to better support + dealing with internal MongoDB timestamps. +- added `name` argument for + :meth:`~pymongo.collection.Collection.create_index` and + :meth:`~pymongo.collection.Collection.ensure_index`. +- fixed connection pooling w/ fork +- :meth:`~pymongo.connection.Connection.paired` takes all kwargs that + are allowed for :meth:`~pymongo.connection.Connection`. +- :meth:`~pymongo.collection.Collection.insert` returns list for bulk + inserts of size one. +- fixed handling of :class:`datetime.datetime` instances in + :mod:`~pymongo.json_util`. +- added :meth:`~pymongo.connection.Connection.from_uri` to support + MongoDB connection uri scheme. +- fixed chunk number calculation when unaligned in :mod:`gridfs`. +- :meth:`~pymongo.database.Database.command` takes a string for simple + commands. +- added :data:`~pymongo.database.Database.system_js` helper for + dealing with server-side JS. +- don't wrap queries containing ``"$query"`` (support manual use of + ``"$min"``, etc.). +- added :class:`~gridfs.errors.GridFSError` as base class for + :mod:`gridfs` exceptions. + Changes in Version 1.4 ---------------------- @@ -33,7 +68,7 @@ Other changes: :meth:`~pymongo.collection.Collection.insert` or :meth:`~pymongo.collection.Collection.update` with `safe` set to ``True``. -- removed :mod:`~pymongo.thread_util` +- removed :mod:`~pymongo.thread_util`. - added :meth:`~pymongo.database.Database.add_user` and :meth:`~pymongo.database.Database.remove_user` helpers. - fix for :meth:`~pymongo.database.Database.authenticate` when using diff --git a/gridfs/errors.py b/gridfs/errors.py index 97417a09b..b9b01db57 100644 --- a/gridfs/errors.py +++ b/gridfs/errors.py @@ -20,7 +20,7 @@ from pymongo.errors import PyMongoError class GridFSError(PyMongoError): """Base class for all GridFS exceptions. - .. versionadded:: 1.4+ + .. versionadded:: 1.5 """ class CorruptGridFile(GridFSError): diff --git a/pymongo/__init__.py b/pymongo/__init__.py index 6264c2466..543f36b5f 100644 --- a/pymongo/__init__.py +++ b/pymongo/__init__.py @@ -28,7 +28,7 @@ SLOW_ONLY = 1 ALL = 2 """Profile all operations.""" -version = "1.4+" +version = "1.5" """Current version of PyMongo.""" Connection = PyMongo_Connection @@ -37,7 +37,7 @@ Connection = PyMongo_Connection def has_c(): """Is the C extension installed? - .. versionadded:: 1.4+ + .. versionadded:: 1.5 """ try: from pymongo import _cbson diff --git a/pymongo/binary.py b/pymongo/binary.py index 344b09ba7..c70b950ef 100644 --- a/pymongo/binary.py +++ b/pymongo/binary.py @@ -18,7 +18,7 @@ FUNCTION_SUBTYPE = 1 """BSON binary subtype for functions. -.. versionadded:: 1.4+ +.. versionadded:: 1.5 """ BINARY_SUBTYPE = 2 @@ -26,7 +26,7 @@ BINARY_SUBTYPE = 2 This is the default subtype and is the most commonly used. -.. versionadded:: 1.4+ +.. versionadded:: 1.5 """ UUID_SUBTYPE = 3 @@ -35,19 +35,19 @@ UUID_SUBTYPE = 3 :class:`uuid.UUID` instances will automatically be encoded by :mod:`~pymongo.bson` using this subtype. -.. versionadded:: 1.4+ +.. versionadded:: 1.5 """ MD5_SUBTYPE = 5 """BSON binary subtype for an MD5 hash. -.. versionadded:: 1.4+ +.. versionadded:: 1.5 """ USER_DEFINED_SUBTYPE = 128 """BSON binary subtype for any user defined structure. -.. versionadded:: 1.4+ +.. versionadded:: 1.5 """ class Binary(str): diff --git a/pymongo/collection.py b/pymongo/collection.py index 545bd01f3..53efe54f2 100644 --- a/pymongo/collection.py +++ b/pymongo/collection.py @@ -57,9 +57,9 @@ class Collection(object): - `**kwargs` (optional): additional keyword arguments will be passed as options for the create collection command - .. versionchanged:: 1.4+ + .. versionchanged:: 1.5 deprecating `options` in favor of kwargs - .. versionadded:: 1.4+ + .. versionadded:: 1.5 the `create` parameter .. mongodoc:: collections @@ -541,7 +541,7 @@ class Collection(object): - `name` (optional): name for the index. If none given, a name will be generated. - .. versionadded:: 1.4+ + .. versionadded:: 1.5 The `name` parameter. .. seealso:: :meth:`ensure_index` @@ -604,7 +604,7 @@ class Collection(object): - `name` (optional): name for the index. If none given, a name will be generated. - .. versionadded:: 1.4+ + .. versionadded:: 1.5 The `name` parameter. .. seealso:: :meth:`create_index` diff --git a/pymongo/connection.py b/pymongo/connection.py index f104a2b03..d0760d0b1 100644 --- a/pymongo/connection.py +++ b/pymongo/connection.py @@ -243,7 +243,7 @@ class Connection(object): # TODO support auth for pooling The remaining keyword arguments are the same as those accepted by :meth:`~Connection`. - .. versionadded:: 1.4+ + .. versionadded:: 1.5 """ (nodes, database, username, password) = Connection._parse_uri(uri) if database and username is None: @@ -798,7 +798,7 @@ class Connection(object): # TODO support auth for pooling - `username` (optional): username for source database - `password` (optional): password for source database - .. versionadded:: 1.4+ + .. versionadded:: 1.5 """ if not isinstance(from_name, basestring): raise TypeError("from_name must be an instance of basestring") diff --git a/pymongo/cursor.py b/pymongo/cursor.py index 4ad9e3671..7a7fedcae 100644 --- a/pymongo/cursor.py +++ b/pymongo/cursor.py @@ -491,7 +491,7 @@ class Cursor(object): since they will stop iterating even though they *may* return more results in the future. - .. versionadded:: 1.4+ + .. versionadded:: 1.5 """ return bool(len(self.__data) or (not self.__killed)) diff --git a/pymongo/database.py b/pymongo/database.py index 715b40b4b..5db31b173 100644 --- a/pymongo/database.py +++ b/pymongo/database.py @@ -106,7 +106,7 @@ class Database(object): See the documentation for :class:`SystemJS` for more details. - .. versionadded:: 1.4+ + .. versionadded:: 1.5 """ return self.__system_js @@ -185,7 +185,7 @@ class Database(object): - `**kwargs` (optional): additional keyword arguments will be passed as options for the create collection command - .. versionchanged:: 1.4+ + .. versionchanged:: 1.5 deprecating `options` in favor of kwargs """ opts = {"create": True} @@ -255,7 +255,7 @@ class Database(object): - `allowable_errors`: if `check` is ``True``, error messages in this list will be ignored by error-checking - .. versionchanged:: 1.4+ + .. versionchanged:: 1.5 `command` can be a string in addition to a full document. .. versionadded:: 1.4 @@ -586,7 +586,7 @@ class SystemJS(object): .. note:: Requires server version **>= 1.1.1** - .. versionadded:: 1.4+ + .. versionadded:: 1.5 .. _server-side JavaScript: http://www.mongodb.org/display/DOCS/Server-side+Code+Execution#Server-sideCodeExecution-Storingfunctionsserverside """ diff --git a/pymongo/errors.py b/pymongo/errors.py index 4fbd0042d..ca5bdce18 100644 --- a/pymongo/errors.py +++ b/pymongo/errors.py @@ -95,5 +95,5 @@ class InvalidId(PyMongoError): class InvalidURI(PyMongoError): """Raised when trying to parse an invalid mongodb URI. - .. versionadded:: 1.4+ + .. versionadded:: 1.5 """