Skip to content

Commit

Permalink
Indent and clarifications
Browse files Browse the repository at this point in the history
  • Loading branch information
ecederstrand committed Aug 17, 2016
1 parent a23af20 commit 801f13e
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,27 @@ Change Log
``__startswith``, ``__istartswith``, plus an additional ``__not`` which translates to ``!=``.
Additionally, *all* fields on the item are now supported in ``Folder.find_items()``.

WARNING: This change is backwards-incompatible! Old uses of ``Folder.find_items()`` like this:
**WARNING**: This change is backwards-incompatible! Old uses of ``Folder.find_items()`` like this:

.. code-block:: python
.. code-block:: python
ids = account.calendar.find_items(
start=tz.localize(EWSDateTime(year, month, day)),
end=tz.localize(EWSDateTime(year, month, day + 1)),
categories=['foo', 'bar'],
)
ids = account.calendar.find_items(
start=tz.localize(EWSDateTime(year, month, day)),
end=tz.localize(EWSDateTime(year, month, day + 1)),
categories=['foo', 'bar'],
)
should be rewritten like this:
must be rewritten like this:

.. code-block:: python
.. code-block:: python
ids = account.calendar.find_items(
start__lt=tz.localize(EWSDateTime(year, month, day + 1)),
end__gt=tz.localize(EWSDateTime(year, month, day)),
categories__contains=['foo', 'bar'],
)
ids = account.calendar.find_items(
start__lt=tz.localize(EWSDateTime(year, month, day + 1)),
end__gt=tz.localize(EWSDateTime(year, month, day)),
categories__contains=['foo', 'bar'],
)
failing to do so will most likely result in empty or wrong results.

* Added a ``exchangelib.restrictions.Q`` class much like Django Q objects that can be used to
create even more complex filtering. Q objects must be passed directly to ``exchangelib.services.FindItem``.
Expand Down

0 comments on commit 801f13e

Please sign in to comment.