This commit is contained in:
Mike Dirolf 2010-09-28 10:48:46 -04:00
parent 2559966001
commit 1992b6cd29
21 changed files with 31 additions and 31 deletions

View File

@ -366,7 +366,7 @@ if _use_c:
def _to_dicts(data, as_class=dict, tz_aware=True):
"""DEPRECATED - `_to_dicts` has been renamed to `decode_all`.
.. versionchanged:: 1.8.1+
.. versionchanged:: 1.9
Deprecated in favor of :meth:`decode_all`.
.. versionadded:: 1.7
The `as_class` parameter.
@ -389,7 +389,7 @@ def decode_all(data, as_class=dict, tz_aware=True):
- `tz_aware` (optional): if ``True``, return timezone-aware
:class:`~datetime.datetime` instances
.. versionadded:: 1.8.1+
.. versionadded:: 1.9
"""
docs = []
while len(data):
@ -432,7 +432,7 @@ class BSON(str):
def from_dict(cls, dct, check_keys=False):
"""DEPRECATED - `from_dict` has been renamed to `encode`.
.. versionchanged:: 1.8.1+
.. versionchanged:: 1.9
Deprecated in favor of :meth:`encode`
"""
warnings.warn("`from_dict` has been renamed to `encode`",
@ -457,14 +457,14 @@ class BSON(str):
contain '.', raising :class:`~bson.errors.InvalidDocument` in
either case
.. versionadded:: 1.8.1+
.. versionadded:: 1.9
"""
return cls(_dict_to_bson(document, check_keys))
def to_dict(self, as_class=dict, tz_aware=False):
"""DEPRECATED - `to_dict` has been renamed to `decode`.
.. versionchanged:: 1.8.1+
.. versionchanged:: 1.9
Deprecated in favor of :meth:`decode`
.. versionadded:: 1.8
The `tz_aware` parameter.
@ -496,7 +496,7 @@ class BSON(str):
- `tz_aware` (optional): if ``True``, return timezone-aware
:class:`~datetime.datetime` instances
.. versionadded:: 1.8.1+
.. versionadded:: 1.9
"""
(document, _) = _bson_to_dict(self, as_class, tz_aware)
return document
@ -505,7 +505,7 @@ class BSON(str):
def has_c():
"""Is the C extension installed?
.. versionadded:: 1.8.1+
.. versionadded:: 1.9
"""
try:
from bson import _cbson

View File

@ -36,7 +36,7 @@ class Code(str):
- `**kwargs` (optional): scope variables can also be passed as
keyword arguments
.. versionadded:: 1.8.1+
.. versionadded:: 1.9
Ability to pass scope values using keyword arguments.
"""

View File

@ -34,7 +34,7 @@ Example usage (deserialization)::
Currently this does not handle special encoding and decoding for
:class:`~bson.binary.Binary` and :class:`~bson.code.Code` instances.
.. versionchanged:: 1.8.1+
.. versionchanged:: 1.9
Handle :class:`uuid.UUID` instances, whenever possible.
.. versionchanged:: 1.8

View File

@ -6,5 +6,5 @@
This module has been deprecated in favor of :mod:`bson.binary`. Please
use that module instead.
.. versionchanged:: 1.8.1+
.. versionchanged:: 1.9
Deprecated.

View File

@ -6,5 +6,5 @@
This module has been deprecated in favor of :mod:`bson`. Please use
that module instead.
.. versionchanged:: 1.8.1+
.. versionchanged:: 1.9
Deprecated.

View File

@ -6,5 +6,5 @@
This module has been deprecated in favor of :mod:`bson.code`. Please
use that module instead.
.. versionchanged:: 1.8.1+
.. versionchanged:: 1.9
Deprecated.

View File

@ -6,5 +6,5 @@
This module has been deprecated in favor of :mod:`bson.dbref`. Please
use that module instead.
.. versionchanged:: 1.8.1+
.. versionchanged:: 1.9
Deprecated.

View File

@ -6,5 +6,5 @@
This module has been deprecated in favor of
:mod:`bson.json_util`. Please use that module instead.
.. versionchanged:: 1.8.1+
.. versionchanged:: 1.9
Deprecated.

View File

@ -6,5 +6,5 @@
This module has been deprecated in favor of
:mod:`bson.max_key`. Please use that module instead.
.. versionchanged:: 1.8.1+
.. versionchanged:: 1.9
Deprecated.

View File

@ -6,5 +6,5 @@
This module has been deprecated in favor of
:mod:`bson.min_key`. Please use that module instead.
.. versionchanged:: 1.8.1+
.. versionchanged:: 1.9
Deprecated.

View File

@ -6,5 +6,5 @@
This module has been deprecated in favor of
:mod:`bson.objectid`. Please use that module instead.
.. versionchanged:: 1.8.1+
.. versionchanged:: 1.9
Deprecated.

View File

@ -6,5 +6,5 @@
This module has been deprecated in favor of :mod:`bson.son`. Please
use that module instead.
.. versionchanged:: 1.8.1+
.. versionchanged:: 1.9
Deprecated.

View File

@ -6,5 +6,5 @@
This module has been deprecated in favor of
:mod:`bson.timestamp`. Please use that module instead.
.. versionchanged:: 1.8.1+
.. versionchanged:: 1.9
Deprecated.

View File

@ -6,5 +6,5 @@
This module has been deprecated in favor of
:mod:`bson.tz_util`. Please use that module instead.
.. versionchanged:: 1.8.1+
.. versionchanged:: 1.9
Deprecated.

View File

@ -1,10 +1,10 @@
Changelog
=========
Changes in Version 1.8.1+
Changes in Version 1.9
-------------------------
Version 1.8.1+ adds a new package to the PyMongo distribution,
Version 1.9 adds a new package to the PyMongo distribution,
:mod:`bson`. :mod:`bson` contains all of the `BSON
<http://bsonspec.org>`_ encoding and decoding logic, and the BSON
types that were formerly in the :mod:`pymongo` package. The following

View File

@ -103,7 +103,7 @@ class GridFS(object):
- `data`: data to be written as a file.
- `**kwargs` (optional): keyword arguments for file creation
.. versionadded:: 1.8.1+
.. versionadded:: 1.9
The ability to write :class:`unicode`, if an `encoding` has
been specified as a keyword argument.
@ -154,7 +154,7 @@ class GridFS(object):
- `version` (optional): version of the file to get (defualts
to -1, the most recent version uploaded)
.. versionadded:: 1.8.1+
.. versionadded:: 1.9
"""
self.__files.ensure_index([("filename", ASCENDING),
("uploadDate", DESCENDING)])

View File

@ -241,7 +241,7 @@ class GridIn(object):
- `data`: string of bytes or file-like object to be written
to the file
.. versionadded:: 1.8.1+
.. versionadded:: 1.9
The ability to write :class:`unicode`, if the file has an
:attr:`encoding` attribute.
"""
@ -326,7 +326,7 @@ class GridOut(object):
- `file_id`: value of ``"_id"`` for the file to read
- `file_document`: file document from `root_collection.files`
.. versionadded:: 1.8.1+
.. versionadded:: 1.9
The `file_document` parameter.
"""
if not isinstance(root_collection, Collection):
@ -416,7 +416,7 @@ class GridOut(object):
:Parameters:
- `size` (optional): the maximum number of bytes to read
.. versionadded:: 1.8.1+
.. versionadded:: 1.9
"""
bytes = ""
while len(bytes) != size:

View File

@ -39,7 +39,7 @@ ALL = 2
"""Profile all operations."""
# Remember to change in setup.py as well!
version = "1.8.1+"
version = "1.9"
"""Current version of PyMongo."""
Connection = PyMongo_Connection

View File

@ -238,7 +238,7 @@ class Cursor(object):
:Parameters:
- `batch_size`: The size of each batch of results requested.
.. versionadded:: 1.8.1+
.. versionadded:: 1.9
"""
if not isinstance(batch_size, int):
raise TypeError("batch_size must be an int")

View File

@ -623,6 +623,6 @@ class SystemJS(object):
def list(self):
"""Get a list of the names of the functions stored in this database.
.. versionadded:: 1.8.1+
.. versionadded:: 1.9
"""
return [x["_id"] for x in self._db.system.js.find(fields=["_id"])]

View File

@ -20,7 +20,7 @@ from distutils.errors import DistutilsPlatformError, DistutilsExecError
from distutils.core import Extension
# Remember to change in pymongo/__init__.py as well!
version = "1.8.1+"
version = "1.9"
f = open("README.rst")
try: