Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Commit 00c8d7e

Browse files
committed
Bump to v0.3
1 parent 0d89e96 commit 00c8d7e

File tree

8 files changed

+65
-10
lines changed

8 files changed

+65
-10
lines changed

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
include MANIFEST.in
12
include README.rst
23
include LICENSE
4+
include AUTHORS
35
recursive-include docs *
46
prune docs/_build
5-
recursive-include tests *
6-
recursive-exclude * *.pyc *.swp

README.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ a `tutorial <http://hmarr.com/mongoengine/tutorial.html>`_, a `user guide
1515
Installation
1616
============
1717
If you have `setuptools <http://peak.telecommunity.com/DevCenter/setuptools>`_
18-
you can use ``easy_install mongoengine``. Otherwise, you can download the
18+
you can use ``easy_install -U mongoengine``. Otherwise, you can download the
1919
source from `GitHub <http://github.com/hmarr/mongoengine>`_ and run ``python
2020
setup.py install``.
2121

@@ -82,6 +82,14 @@ Tests
8282
To run the test suite, ensure you are running a local instance of MongoDB on
8383
the standard port, and run ``python setup.py test``.
8484

85+
Community
86+
=========
87+
- `MongoEngine Users mailing list
88+
<http://groups.google.com/group/mongoengine-users>`_
89+
- `MongoEngine Developers mailing list
90+
<http://groups.google.com/group/mongoengine-dev>`_
91+
- `#mongoengine IRC channel <irc://irc.freenode.net/mongoengine>`_
92+
8593
Contributing
8694
============
8795
The source is available on `GitHub <http://github.com/hmarr/mongoengine>`_ - to

docs/changelog.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,40 @@
22
Changelog
33
=========
44

5+
Changes in v0.3
6+
===============
7+
- Added MapReduce support
8+
- Added ``contains``, ``startswith`` and ``endswith`` query operators (and
9+
case-insensitive versions that are prefixed with 'i')
10+
- Deprecated fields' ``name`` parameter, replaced with ``db_field``
11+
- Added ``QuerySet.only`` for only retrieving specific fields
12+
- Added ``QuerySet.in_bulk()`` for bulk querying using ids
13+
- ``QuerySet``\ s now have a ``rewind()`` method, which is called automatically
14+
when the iterator is exhausted, allowing ``QuerySet``\ s to be reused
15+
- Added ``DictField``
16+
- Added ``URLField``
17+
- Added ``DecimalField``
18+
- Added ``BinaryField``
19+
- Added ``GenericReferenceField``
20+
- Added ``get()`` and ``get_or_create()`` methods to ``QuerySet``
21+
- ``ReferenceField``\ s may now reference the document they are defined on
22+
(recursive references) and documents that have not yet been defined
23+
- ``Document`` objects may now be compared for equality (equal if _ids are
24+
equal and documents are of same type)
25+
- ``QuerySet`` update methods now have an ``upsert`` parameter
26+
- Added field name substitution for Javascript code (allows the user to use the
27+
Python names for fields in JS, which are later substituted for the real field
28+
names)
29+
- ``Q`` objects now support regex querying
30+
- Fixed bug where referenced documents within lists weren't properly
31+
dereferenced
32+
- ``ReferenceField``\ s may now be queried using their _id
33+
- Fixed bug where ``EmbeddedDocuments`` couldn't be non-polymorphic
34+
- ``queryset_manager`` functions now accept two arguments -- the document class
35+
as the first and the queryset as the second
36+
- Fixed bug where ``QuerySet.exec_js`` ignored ``Q`` objects
37+
- Other minor fixes
38+
539
Changes in v0.2.2
640
=================
741
- Fixed bug that prevented indexes from being used on ``ListField``\ s

docs/guide/querying.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ expressions:
8585
* ``endswith`` -- string field ends with value
8686
* ``iendswith`` -- string field ends with value (case insensitive)
8787

88+
.. versionadded:: 0.3
89+
8890
Limiting and skipping results
8991
=============================
9092
Just as with traditional ORMs, you may limit the number of results returned, or

docs/index.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ MongoDB. To install it, simply run
77

88
.. code-block:: console
99
10-
# easy_install mongoengine
10+
# easy_install -U mongoengine
1111
1212
The source is available on `GitHub <http://github.com/hmarr/mongoengine>`_.
1313

14-
If you are interested in contributing, join the developers' `mailing list
15-
<http://groups.google.com/group/mongoengine-dev>`_. Some of us also like to
16-
hang out at `#mongoengine IRC channel <irc://irc.freenode.net/mongoengine>`_.
14+
To get help with using MongoEngine, use the `MongoEngine Users mailing list
15+
<http://groups.google.com/group/mongoengine-users>`_ or come chat on the
16+
`#mongoengine IRC channel <irc://irc.freenode.net/mongoengine>`_.
1717

18+
If you are interested in contributing, join the developers' `mailing list
19+
<http://groups.google.com/group/mongoengine-dev>`_.
1820

1921
.. toctree::
2022
:maxdepth: 2

mongoengine/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
__author__ = 'Harry Marr'
1414

15-
VERSION = (0, 2, 2)
15+
VERSION = (0, 3, 0)
1616

1717
def get_version():
1818
version = '%s.%s' % (VERSION[0], VERSION[1])

mongoengine/queryset.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,8 @@ def get(self, *q_objs, **query):
343343
:class:`~mongoengine.queryset.MultipleObjectsReturned` or
344344
:class:`~mongoengine.queryset.DoesNotExist` exceptions if multiple or
345345
no results are found.
346+
347+
.. versionadded:: 0.3
346348
"""
347349
self.__call__(*q_objs, **query)
348350
count = self.count()
@@ -360,6 +362,8 @@ def get_or_create(self, *q_objs, **query):
360362
results are found. A new document will be created if the document
361363
doesn't exists; a dictionary of default values for the new document
362364
may be provided as a keyword argument called :attr:`defaults`.
365+
366+
.. versionadded:: 0.3
363367
"""
364368
defaults = query.get('defaults', {})
365369
if 'defaults' in query:
@@ -406,6 +410,8 @@ def in_bulk(self, object_ids):
406410
:param object_ids: a list or tuple of ``ObjectId``\ s
407411
:rtype: dict of ObjectIds as keys and collection-specific
408412
Document subclasses as values.
413+
414+
.. versionadded:: 0.3
409415
"""
410416
doc_map = {}
411417

@@ -428,6 +434,8 @@ def next(self):
428434

429435
def rewind(self):
430436
"""Rewind the cursor to its unevaluated state.
437+
438+
.. versionadded:: 0.3
431439
"""
432440
self._cursor.rewind()
433441

@@ -470,7 +478,6 @@ def map_reduce(self, map_f, reduce_f, finalize_f=None, limit=None,
470478
PyMongo version **>= 1.2**.
471479
472480
.. versionadded:: 0.3
473-
474481
"""
475482
from document import MapReduceDocument
476483

@@ -572,6 +579,8 @@ def only(self, *fields):
572579
post = BlogPost.objects(...).only("title")
573580
574581
:param fields: fields to include
582+
583+
.. versionadded:: 0.3
575584
"""
576585
self._loaded_fields = []
577586
for field in fields:

tests/queryset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ class BlogPost(Document):
696696
post2.save()
697697
post3.save()
698698

699-
self.assertEqual(BlogPost._fields['title'].name, '_id')
699+
self.assertEqual(BlogPost._fields['title'].db_field, '_id')
700700
self.assertEqual(BlogPost._meta['id_field'], 'title')
701701

702702
map_f = """

0 commit comments

Comments
 (0)