Skip to content

Commit 7e614fb

Browse files
authored
Merge pull request #299 from IlyaSkriblovsky/master
New Cursor() stuff added to NEWS.rst
2 parents 58f13c0 + d353dcc commit 7e614fb

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/source/NEWS.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ API Changes
1919
- `as_class` argument of `find()`, `find_with_cursor()` and `find_one()`
2020
- old-style parameters of `find*()` methods: `spec`, `fields`, `cursor`
2121
- `find()`, `find_one()` and `find_with_cursor()` now supports `allow_partial_results` argument.
22+
- `find()` method now returns `Cursor()` instance that can be used as async generator to
23+
asynchronously iterate over results. It can still be used as Deferred too, so this change
24+
is backward-compatible.
25+
- `find_with_cursor()` is deprecated and will be removed in the next release.
2226

2327

2428

txmongo/collection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,8 @@ def find_with_cursor(
600600
):
601601
"""find_with_cursor(filter=None, projection=None, skip=0, limit=0, sort=None, batch_size=0, allow_partial_results=False)
602602
603+
This method is deprecated. Please use :meth:`find()` method which now returns :class:`Cursor` instance.
604+
603605
Find documents in a collection and return them in one batch at a time.
604606
605607
Arguments are the same as for :meth:`find()`.

0 commit comments

Comments
 (0)