minor: add full changelog and add version changed / added information for all changes since 1.0

This commit is contained in:
Mike Dirolf 2009-12-09 14:39:58 -05:00
parent 17d1d0091e
commit 13b61192d1
7 changed files with 224 additions and 25 deletions

193
doc/changelog.rst Normal file
View File

@ -0,0 +1,193 @@
Changes
=======
Changes in Version 1.2
----------------------
- `spec` parameter for :meth:`~pymongo.collection.Collection.remove` is
now optional to allow for deleting all documents in a
:class:`~pymongo.collection.Collection`
- always wrap queries with ``{query: ...}`` even when no special options -
get around some issues with queries on fields named ``query``
- enforce 4MB document limit on the client side
- added :meth:`~pymongo.collection.Collection.map_reduce` helper - see
:doc:`example <examples/map_reduce>`
- added :meth:`~pymongo.cursor.Cursor.distinct` method on
:class:`~pymongo.cursor.Cursor` instances to allow distinct with
queries
- fix for :meth:`~pymongo.cursor.Cursor.__getitem__` after
:meth:`~pymongo.cursor.Cursor.skip`
- allow any UTF-8 string in :class:`~pymongo.bson.BSON` encoder, not
just ASCII subset
- added :attr:`~pymongo.objectid.ObjectId.generation_time`
- removed support for legacy :class:`~pymongo.objectid.ObjectId`
format - pretty sure this was never used, and is just confusing
- DEPRECATED :meth:`~pymongo.objectid.ObjectId.url_encode` and
:meth:`~pymongo.objectid.ObjectId.url_decode` in favor of :meth:`str`
and :meth:`~pymongo.objectid.ObjectId`, respectively
- allow *oplog.$main* as a valid collection name
- some minor fixes for installation process
- added support for datetime and regex in :mod:`~pymongo.json_util`
Changes in Version 1.1.2
------------------------
- improvements to :meth:`~pymongo.collection.Collection.insert` speed
(using C for insert message creation)
- use random number for request_id
- fix some race conditions with :class:`~pymongo.errors.AutoReconnect`
Changes in Version 1.1.1
------------------------
- added `multi` parameter for
:meth:`~pymongo.collection.Collection.update`
- fix unicode regex patterns with C extension
- added :meth:`~pymongo.collection.Collection.distinct`
- added `database` support for :class:`~pymongo.dbref.DBRef`
- added :mod:`~pymongo.json_util` with helpers for encoding / decoding
special types to JSON
- DEPRECATED :meth:`~pymongo.cursor.Cursor.__len__` in favor of
:meth:`~pymongo.cursor.Cursor.count` with `with_limit_and_skip` set
to ``True`` due to performance regression
- switch documentation to Sphinx
Changes in Version 1.1
----------------------
- added :meth:`__hash__` for :class:`~pymongo.dbref.DBRef` and
:class:`~pymongo.objectid.ObjectId`
- bulk :meth:`~pymongo.collection.Collection.insert` works with any
iterable
- fix :class:`~pymongo.objectid.ObjectId` generation when using
:mod:`multiprocessing`
- added :attr:`~pymongo.cursor.Cursor.collection`
- added `network_timeout` parameter for
:meth:`~pymongo.connection.Connection`
- DEPRECATED `slave_okay` parameter for individual queries
- fix for `safe` mode when multi-threaded
- added `safe` parameter for :meth:`~pymongo.collection.Collection.remove`
- added `tailable` parameter for :meth:`~pymongo.collection.Collection.find`
Changes in Version 1.0
----------------------
- fixes for
:class:`~pymongo.master_slave_connection.MasterSlaveConnection`
- added `finalize` parameter for :meth:`~pymongo.collection.Collection.group`
- improvements to :meth:`~pymongo.collection.Collection.insert` speed
- improvements to :mod:`gridfs` speed
- added :meth:`~pymongo.cursor.Cursor.__getitem__` and
:meth:`~pymongo.cursor.Cursor.__len__` for
:class:`~pymongo.cursor.Cursor` instances
Changes in Version 0.16
-----------------------
- support for encoding/decoding :class:`uuid.UUID` instances
- fix for :meth:`~pymongo.cursor.Cursor.explain` with limits
Changes in Version 0.15.2
-------------------------
- documentation changes only
Changes in Version 0.15.1
-------------------------
- various performance improvements
- API CHANGE no longer need to specify direction for
:meth:`~pymongo.collection.Collection.create_index` and
:meth:`~pymongo.collection.Collection.ensure_index` when indexing a
single key
- support for encoding :class:`tuple` instances as :class:`list`
instances
Changes in Version 0.15
-----------------------
- fix string representation of :class:`~pymongo.objectid.ObjectId`
instances
- added `timeout` parameter for
:meth:`~pymongo.collection.Collection.find`
- allow scope for `reduce` function in
:meth:`~pymongo.collection.Collection.group`
Changes in Version 0.14.2
-------------------------
- minor bugfixes
Changes in Version 0.14.1
-------------------------
- :meth:`~gridfs.grid_file.GridFile.seek` and
:meth:`~gridfs.grid_file.GridFile.tell` for (read mode)
:class:`~gridfs.grid_file.GridFile` instances
Changes in Version 0.14
-----------------------
- support for long in :class:`~pymongo.bson.BSON`
- added :meth:`~pymongo.collection.Collection.rename`
- added `snapshot` parameter for
:meth:`~pymongo.collection.Collection.find`
Changes in Version 0.13
-----------------------
- better
:class:`~pymongo.master_slave_connection.MasterSlaveConnection`
support
- API CHANGE :meth:`~pymongo.collection.Collection.insert` and
:meth:`~pymongo.collection.Collection.save` both return inserted
``_id``
- DEPRECATED passing an index name to
:meth:`~pymongo.cursor.Cursor.hint`
Changes in Version 0.12
-----------------------
- improved :class:`~pymongo.objectid.ObjectId` generation
- added :class:`~pymongo.errors.AutoReconnect` exception for when
reconnection is possible
- make :mod:`gridfs` thread-safe
- fix for :mod:`gridfs` with non :class:`~pymongo.objectid.ObjectId` ``_id``
Changes in Version 0.11.3
-------------------------
- don't allow NULL bytes in string encoder
- fixes for Python 2.3
Changes in Version 0.11.2
-------------------------
- PEP 8
- updates for :meth:`~pymongo.collection.Collection.group`
- VS build
Changes in Version 0.11.1
-------------------------
- fix for connection pooling under Python 2.5
Changes in Version 0.11
-----------------------
- better build failure detection
- driver support for selecting fields in sub-documents
- disallow insertion of invalid key names
- added `timeout` parameter for :meth:`~pymongo.connection.Connection`
Changes in Version 0.10.3
-------------------------
- fix bug with large :meth:`~pymongo.cursor.Cursor.limit`
- better exception when modules get reloaded out from underneath the C
extension
- better exception messages when calling a
:class:`~pymongo.collection.Collection` or
:class:`~pymongo.database.Database` instance
Changes in Version 0.10.2
-------------------------
- support subclasses of :class:`dict` in C encoder
Changes in Version 0.10.1
-------------------------
- alias :class:`~pymongo.connection.Connection` as
:attr:`pymongo.Connection`
- raise an exception rather than silently overflowing in encoder
Changes in Version 0.10
-----------------------
- added :meth:`~pymongo.collection.Collection.ensure_index`
Changes in Version 0.9.7
------------------------
- allow sub-collections of *$cmd* as valid
:class:`~pymongo.collection.Collection` names
- add version as :attr:`pymongo.version`
- add ``--no_ext`` command line option to *setup.py*

View File

@ -46,31 +46,9 @@ minor tweaks to this documentation. To contribute, fork the project on
`github <http://github.com/mongodb/mongo-python-driver/>`_ and send a
pull request.
Changes in Version 1.2
----------------------
- `spec` parameter for :meth:`~pymongo.collection.Collection.remove` is
now optional to allow for deleting all documents in a
:class:`~pymongo.collection.Collection`
- always wrap queries with ``{query: ...}`` even when no special options -
get around some issues with queries on fields named ``query``
- enforce 4MB document limit on the client side
- added :meth:`~pymongo.collection.Collection.map_reduce` helper - see
:doc:`example <examples/map_reduce>`
- added :meth:`pymongo.cursor.Cursor.distinct` to allow distinct with
queries
- fix for :meth:`pymongo.cursor.Cursor.__getitem__` after
:meth:`~pymongo.cursor.Cursor.skip`
- allow any UTF-8 string in :class:`~pymongo.bson.BSON` encoder, not
just ASCII subset
- added :attr:`pymongo.objectid.ObjectId.generation_time`
- removed support for legacy :class:`~pymongo.objectid.ObjectId`
format - pretty sure this was never used, and is just confusing
- DEPRECATED :meth:`pymongo.objectid.ObjectId.url_encode` and
:meth:`pymongo.objectid.ObjectId.url_decode` in favor of :meth:`str`
and :meth:`pymongo.objectid.ObjectId`, respectively
- allow *oplog.$main* as a valid collection name
- some minor fixes for installation process
- added support for datetime and regex in :mod:`~pymongo.json_util`
Changes
-------
See the :doc:`changelog` list for a full list of changes to PyMongo.
Full Contents Tree
------------------
@ -85,6 +63,7 @@ Full Contents Tree
api/index
tools
contributors
changelog
Indices and tables
==================

View File

@ -170,6 +170,9 @@ class Collection(object):
- `safe` (optional): check that the insert succeeded?
- `check_keys` (optional): check if keys start with '$' or
contain '.', raising `pymongo.errors.InvalidName` in either case
.. versionchanged:: 1.1
Bulk insert works with any iterable
"""
docs = doc_or_docs
if isinstance(docs, types.DictType):
@ -272,6 +275,9 @@ class Collection(object):
The `spec_or_object_id` parameter is now optional. If it is
not specified *all* documents in the collection will be
removed.
.. versionadded:: 1.1
The `safe` parameter.
"""
spec = spec_or_object_id
if spec is None:
@ -379,6 +385,9 @@ class Collection(object):
the cursor will continue from the last document received. For
details, see the `tailable cursor documentation
<http://www.mongodb.org/display/DOCS/Tailable+Cursors>`_.
.. versionadded:: 1.1
The `tailable` parameter.
"""
if spec is None:
spec = SON()

View File

@ -107,6 +107,9 @@ class Connection(object): # TODO support auth for pooling
can be set to -1 to wait indefinitely
- `network_timeout` (optional): timeout (in seconds) to use for socket
operations - default is no timeout
.. versionadded:: 1.1
The `network_timeout` parameter.
"""
if host is None:
host = self.HOST

View File

@ -66,6 +66,8 @@ class Cursor(object):
def collection(self):
"""Get the collection for this cursor.
.. versionadded:: 1.1
"""
return self.__collection
collection = property(collection)

View File

@ -34,6 +34,9 @@ class DBRef(object):
- `collection`: name of the collection the document is stored in
- `id`: the value of the document's _id field
- `database` (optional): name of the database to reference
.. versionadded:: 1.1.1
The `database` parameter.
"""
if not isinstance(collection, types.StringTypes):
raise TypeError("collection must be an instance of (str, unicode)")
@ -60,6 +63,8 @@ class DBRef(object):
"""Get the name of this DBRef's database.
Returns None if this DBRef doesn't specify a database.
.. versionadded:: 1.1.1
"""
return self.__database
database = property(database)
@ -87,4 +92,8 @@ class DBRef(object):
return NotImplemented
def __hash__(self):
"""Get a hash value for this :class:`DBRef`.
.. versionadded:: 1.1
"""
return hash((self.__collection, self.__id, self.__database))

View File

@ -160,6 +160,10 @@ class ObjectId(object):
return NotImplemented
def __hash__(self):
"""Get a hash value for this :class:`ObjectId`.
.. versionadded:: 1.1
"""
return hash(self.__id)