Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
ecederstrand committed Nov 19, 2021
1 parent 264704d commit 0757658
Show file tree
Hide file tree
Showing 13 changed files with 197 additions and 92 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Change Log
HEAD
----

4.6.1
-----

- Support `tzlocal>=4.1`
- Bug fixes for paging in multi-folder requests.

4.6.0
-----
Expand Down
35 changes: 32 additions & 3 deletions docs/exchangelib/ewsdatetime.html
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@ <h1 class="title">Module <code>exchangelib.ewsdatetime</code></h1>
def from_pytz(cls, tz):
return cls(tz.zone)

@classmethod
def from_datetime(cls, tz):
&#34;&#34;&#34;Convert from a standard library `datetime.timezone` instance.&#34;&#34;&#34;
return cls(tz.tzname(None))

@classmethod
def from_dateutil(cls, tz):
# Objects returned by dateutil.tz.tzlocal() and dateutil.tz.gettz() are not supported. They
Expand All @@ -300,10 +305,11 @@ <h1 class="title">Module <code>exchangelib.ewsdatetime</code></h1>
return {
cls.__module__.split(&#39;.&#39;)[0]: lambda z: z,
&#39;backports&#39;: cls.from_zoneinfo,
&#39;datetime&#39;: cls.from_datetime,
&#39;dateutil&#39;: cls.from_dateutil,
&#39;pytz&#39;: cls.from_pytz,
&#39;zoneinfo&#39;: cls.from_zoneinfo,
&#39;pytz_deprecation_shim&#39;: lambda z: cls.from_zoneinfo(z.unwrap_shim())
&#39;pytz_deprecation_shim&#39;: lambda z: cls.from_timezone(z.unwrap_shim())
}[tz_module](tz)
except KeyError:
raise TypeError(&#39;Unsupported tzinfo type: %r&#39; % tz)
Expand Down Expand Up @@ -919,6 +925,11 @@ <h3>Methods</h3>
def from_pytz(cls, tz):
return cls(tz.zone)

@classmethod
def from_datetime(cls, tz):
&#34;&#34;&#34;Convert from a standard library `datetime.timezone` instance.&#34;&#34;&#34;
return cls(tz.tzname(None))

@classmethod
def from_dateutil(cls, tz):
# Objects returned by dateutil.tz.tzlocal() and dateutil.tz.gettz() are not supported. They
Expand All @@ -941,10 +952,11 @@ <h3>Methods</h3>
return {
cls.__module__.split(&#39;.&#39;)[0]: lambda z: z,
&#39;backports&#39;: cls.from_zoneinfo,
&#39;datetime&#39;: cls.from_datetime,
&#39;dateutil&#39;: cls.from_dateutil,
&#39;pytz&#39;: cls.from_pytz,
&#39;zoneinfo&#39;: cls.from_zoneinfo,
&#39;pytz_deprecation_shim&#39;: lambda z: cls.from_zoneinfo(z.unwrap_shim())
&#39;pytz_deprecation_shim&#39;: lambda z: cls.from_timezone(z.unwrap_shim())
}[tz_module](tz)
except KeyError:
raise TypeError(&#39;Unsupported tzinfo type: %r&#39; % tz)
Expand Down Expand Up @@ -1009,6 +1021,21 @@ <h3>Class variables</h3>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="exchangelib.ewsdatetime.EWSTimeZone.from_datetime"><code class="name flex">
<span>def <span class="ident">from_datetime</span></span>(<span>tz)</span>
</code></dt>
<dd>
<div class="desc"><p>Convert from a standard library <code>datetime.timezone</code> instance.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@classmethod
def from_datetime(cls, tz):
&#34;&#34;&#34;Convert from a standard library `datetime.timezone` instance.&#34;&#34;&#34;
return cls(tz.tzname(None))</code></pre>
</details>
</dd>
<dt id="exchangelib.ewsdatetime.EWSTimeZone.from_dateutil"><code class="name flex">
<span>def <span class="ident">from_dateutil</span></span>(<span>tz)</span>
</code></dt>
Expand Down Expand Up @@ -1083,10 +1110,11 @@ <h3>Static methods</h3>
return {
cls.__module__.split(&#39;.&#39;)[0]: lambda z: z,
&#39;backports&#39;: cls.from_zoneinfo,
&#39;datetime&#39;: cls.from_datetime,
&#39;dateutil&#39;: cls.from_dateutil,
&#39;pytz&#39;: cls.from_pytz,
&#39;zoneinfo&#39;: cls.from_zoneinfo,
&#39;pytz_deprecation_shim&#39;: lambda z: cls.from_zoneinfo(z.unwrap_shim())
&#39;pytz_deprecation_shim&#39;: lambda z: cls.from_timezone(z.unwrap_shim())
}[tz_module](tz)
except KeyError:
raise TypeError(&#39;Unsupported tzinfo type: %r&#39; % tz)</code></pre>
Expand Down Expand Up @@ -1252,6 +1280,7 @@ <h4><code><a title="exchangelib.ewsdatetime.EWSTimeZone" href="#exchangelib.ewsd
<ul class="two-column">
<li><code><a title="exchangelib.ewsdatetime.EWSTimeZone.IANA_TO_MS_MAP" href="#exchangelib.ewsdatetime.EWSTimeZone.IANA_TO_MS_MAP">IANA_TO_MS_MAP</a></code></li>
<li><code><a title="exchangelib.ewsdatetime.EWSTimeZone.MS_TO_IANA_MAP" href="#exchangelib.ewsdatetime.EWSTimeZone.MS_TO_IANA_MAP">MS_TO_IANA_MAP</a></code></li>
<li><code><a title="exchangelib.ewsdatetime.EWSTimeZone.from_datetime" href="#exchangelib.ewsdatetime.EWSTimeZone.from_datetime">from_datetime</a></code></li>
<li><code><a title="exchangelib.ewsdatetime.EWSTimeZone.from_dateutil" href="#exchangelib.ewsdatetime.EWSTimeZone.from_dateutil">from_dateutil</a></code></li>
<li><code><a title="exchangelib.ewsdatetime.EWSTimeZone.from_ms_id" href="#exchangelib.ewsdatetime.EWSTimeZone.from_ms_id">from_ms_id</a></code></li>
<li><code><a title="exchangelib.ewsdatetime.EWSTimeZone.from_pytz" href="#exchangelib.ewsdatetime.EWSTimeZone.from_pytz">from_pytz</a></code></li>
Expand Down
12 changes: 6 additions & 6 deletions docs/exchangelib/folders/collections.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ <h1 class="title">Module <code>exchangelib.folders.collections</code></h1>
query_string = None
log.debug(
&#39;Finding %s items in folders %s (shape: %s, depth: %s, additional_fields: %s, restriction: %s)&#39;,
self.folders,
self.account,
self.folders,
shape,
depth,
additional_fields,
Expand Down Expand Up @@ -287,7 +287,7 @@ <h1 class="title">Module <code>exchangelib.folders.collections</code></h1>
restriction = Restriction(q, folders=[folder], applies_to=Restriction.ITEMS)
query_string = None
yield from FindPeople(account=self.account, chunk_size=page_size).call(
folder=[folder],
folder=folder,
additional_fields=additional_fields,
restriction=restriction,
order_fields=order_fields,
Expand Down Expand Up @@ -698,8 +698,8 @@ <h2 class="section-title" id="header-classes">Classes</h2>
query_string = None
log.debug(
&#39;Finding %s items in folders %s (shape: %s, depth: %s, additional_fields: %s, restriction: %s)&#39;,
self.folders,
self.account,
self.folders,
shape,
depth,
additional_fields,
Expand Down Expand Up @@ -771,7 +771,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
restriction = Restriction(q, folders=[folder], applies_to=Restriction.ITEMS)
query_string = None
yield from FindPeople(account=self.account, chunk_size=page_size).call(
folder=[folder],
folder=folder,
additional_fields=additional_fields,
restriction=restriction,
order_fields=order_fields,
Expand Down Expand Up @@ -1271,8 +1271,8 @@ <h2 id="examples">Examples</h2>
query_string = None
log.debug(
&#39;Finding %s items in folders %s (shape: %s, depth: %s, additional_fields: %s, restriction: %s)&#39;,
self.folders,
self.account,
self.folders,
shape,
depth,
additional_fields,
Expand Down Expand Up @@ -1356,7 +1356,7 @@ <h2 id="examples">Examples</h2>
restriction = Restriction(q, folders=[folder], applies_to=Restriction.ITEMS)
query_string = None
yield from FindPeople(account=self.account, chunk_size=page_size).call(
folder=[folder],
folder=folder,
additional_fields=additional_fields,
restriction=restriction,
order_fields=order_fields,
Expand Down
10 changes: 6 additions & 4 deletions docs/exchangelib/folders/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4663,8 +4663,8 @@ <h3>Inherited members</h3>
query_string = None
log.debug(
&#39;Finding %s items in folders %s (shape: %s, depth: %s, additional_fields: %s, restriction: %s)&#39;,
self.folders,
self.account,
self.folders,
shape,
depth,
additional_fields,
Expand Down Expand Up @@ -4736,7 +4736,7 @@ <h3>Inherited members</h3>
restriction = Restriction(q, folders=[folder], applies_to=Restriction.ITEMS)
query_string = None
yield from FindPeople(account=self.account, chunk_size=page_size).call(
folder=[folder],
folder=folder,
additional_fields=additional_fields,
restriction=restriction,
order_fields=order_fields,
Expand Down Expand Up @@ -5236,8 +5236,8 @@ <h2 id="examples">Examples</h2>
query_string = None
log.debug(
&#39;Finding %s items in folders %s (shape: %s, depth: %s, additional_fields: %s, restriction: %s)&#39;,
self.folders,
self.account,
self.folders,
shape,
depth,
additional_fields,
Expand Down Expand Up @@ -5321,7 +5321,7 @@ <h2 id="examples">Examples</h2>
restriction = Restriction(q, folders=[folder], applies_to=Restriction.ITEMS)
query_string = None
yield from FindPeople(account=self.account, chunk_size=page_size).call(
folder=[folder],
folder=folder,
additional_fields=additional_fields,
restriction=restriction,
order_fields=order_fields,
Expand Down Expand Up @@ -5734,6 +5734,7 @@ <h3>Inherited members</h3>
from .base import Folder
# Subfolders will always be of class Folder
all_fields = self.folder_collection.get_folder_fields(target_cls=Folder, is_complex=None)
all_fields.update(Folder.attribute_fields())
only_fields = []
for arg in args:
for field_path in all_fields:
Expand Down Expand Up @@ -5943,6 +5944,7 @@ <h3>Methods</h3>
from .base import Folder
# Subfolders will always be of class Folder
all_fields = self.folder_collection.get_folder_fields(target_cls=Folder, is_complex=None)
all_fields.update(Folder.attribute_fields())
only_fields = []
for arg in args:
for field_path in all_fields:
Expand Down
3 changes: 3 additions & 0 deletions docs/exchangelib/folders/queryset.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ <h1 class="title">Module <code>exchangelib.folders.queryset</code></h1>
from .base import Folder
# Subfolders will always be of class Folder
all_fields = self.folder_collection.get_folder_fields(target_cls=Folder, is_complex=None)
all_fields.update(Folder.attribute_fields())
only_fields = []
for arg in args:
for field_path in all_fields:
Expand Down Expand Up @@ -246,6 +247,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
from .base import Folder
# Subfolders will always be of class Folder
all_fields = self.folder_collection.get_folder_fields(target_cls=Folder, is_complex=None)
all_fields.update(Folder.attribute_fields())
only_fields = []
for arg in args:
for field_path in all_fields:
Expand Down Expand Up @@ -455,6 +457,7 @@ <h3>Methods</h3>
from .base import Folder
# Subfolders will always be of class Folder
all_fields = self.folder_collection.get_folder_fields(target_cls=Folder, is_complex=None)
all_fields.update(Folder.attribute_fields())
only_fields = []
for arg in args:
for field_path in all_fields:
Expand Down
37 changes: 30 additions & 7 deletions docs/exchangelib/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h1 class="title">Package <code>exchangelib</code></h1>
from .transport import BASIC, DIGEST, NTLM, GSSAPI, SSPI, OAUTH2, CBA
from .version import Build, Version

__version__ = &#39;4.6.0&#39;
__version__ = &#39;4.6.1&#39;

__all__ = [
&#39;__version__&#39;,
Expand Down Expand Up @@ -5576,6 +5576,11 @@ <h3>Methods</h3>
def from_pytz(cls, tz):
return cls(tz.zone)

@classmethod
def from_datetime(cls, tz):
&#34;&#34;&#34;Convert from a standard library `datetime.timezone` instance.&#34;&#34;&#34;
return cls(tz.tzname(None))

@classmethod
def from_dateutil(cls, tz):
# Objects returned by dateutil.tz.tzlocal() and dateutil.tz.gettz() are not supported. They
Expand All @@ -5598,10 +5603,11 @@ <h3>Methods</h3>
return {
cls.__module__.split(&#39;.&#39;)[0]: lambda z: z,
&#39;backports&#39;: cls.from_zoneinfo,
&#39;datetime&#39;: cls.from_datetime,
&#39;dateutil&#39;: cls.from_dateutil,
&#39;pytz&#39;: cls.from_pytz,
&#39;zoneinfo&#39;: cls.from_zoneinfo,
&#39;pytz_deprecation_shim&#39;: lambda z: cls.from_zoneinfo(z.unwrap_shim())
&#39;pytz_deprecation_shim&#39;: lambda z: cls.from_timezone(z.unwrap_shim())
}[tz_module](tz)
except KeyError:
raise TypeError(&#39;Unsupported tzinfo type: %r&#39; % tz)
Expand Down Expand Up @@ -5666,6 +5672,21 @@ <h3>Class variables</h3>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="exchangelib.EWSTimeZone.from_datetime"><code class="name flex">
<span>def <span class="ident">from_datetime</span></span>(<span>tz)</span>
</code></dt>
<dd>
<div class="desc"><p>Convert from a standard library <code>datetime.timezone</code> instance.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@classmethod
def from_datetime(cls, tz):
&#34;&#34;&#34;Convert from a standard library `datetime.timezone` instance.&#34;&#34;&#34;
return cls(tz.tzname(None))</code></pre>
</details>
</dd>
<dt id="exchangelib.EWSTimeZone.from_dateutil"><code class="name flex">
<span>def <span class="ident">from_dateutil</span></span>(<span>tz)</span>
</code></dt>
Expand Down Expand Up @@ -5740,10 +5761,11 @@ <h3>Static methods</h3>
return {
cls.__module__.split(&#39;.&#39;)[0]: lambda z: z,
&#39;backports&#39;: cls.from_zoneinfo,
&#39;datetime&#39;: cls.from_datetime,
&#39;dateutil&#39;: cls.from_dateutil,
&#39;pytz&#39;: cls.from_pytz,
&#39;zoneinfo&#39;: cls.from_zoneinfo,
&#39;pytz_deprecation_shim&#39;: lambda z: cls.from_zoneinfo(z.unwrap_shim())
&#39;pytz_deprecation_shim&#39;: lambda z: cls.from_timezone(z.unwrap_shim())
}[tz_module](tz)
except KeyError:
raise TypeError(&#39;Unsupported tzinfo type: %r&#39; % tz)</code></pre>
Expand Down Expand Up @@ -7481,8 +7503,8 @@ <h3>Inherited members</h3>
query_string = None
log.debug(
&#39;Finding %s items in folders %s (shape: %s, depth: %s, additional_fields: %s, restriction: %s)&#39;,
self.folders,
self.account,
self.folders,
shape,
depth,
additional_fields,
Expand Down Expand Up @@ -7554,7 +7576,7 @@ <h3>Inherited members</h3>
restriction = Restriction(q, folders=[folder], applies_to=Restriction.ITEMS)
query_string = None
yield from FindPeople(account=self.account, chunk_size=page_size).call(
folder=[folder],
folder=folder,
additional_fields=additional_fields,
restriction=restriction,
order_fields=order_fields,
Expand Down Expand Up @@ -8054,8 +8076,8 @@ <h2 id="examples">Examples</h2>
query_string = None
log.debug(
&#39;Finding %s items in folders %s (shape: %s, depth: %s, additional_fields: %s, restriction: %s)&#39;,
self.folders,
self.account,
self.folders,
shape,
depth,
additional_fields,
Expand Down Expand Up @@ -8139,7 +8161,7 @@ <h2 id="examples">Examples</h2>
restriction = Restriction(q, folders=[folder], applies_to=Restriction.ITEMS)
query_string = None
yield from FindPeople(account=self.account, chunk_size=page_size).call(
folder=[folder],
folder=folder,
additional_fields=additional_fields,
restriction=restriction,
order_fields=order_fields,
Expand Down Expand Up @@ -12765,6 +12787,7 @@ <h4><code><a title="exchangelib.EWSTimeZone" href="#exchangelib.EWSTimeZone">EWS
<ul class="two-column">
<li><code><a title="exchangelib.EWSTimeZone.IANA_TO_MS_MAP" href="#exchangelib.EWSTimeZone.IANA_TO_MS_MAP">IANA_TO_MS_MAP</a></code></li>
<li><code><a title="exchangelib.EWSTimeZone.MS_TO_IANA_MAP" href="#exchangelib.EWSTimeZone.MS_TO_IANA_MAP">MS_TO_IANA_MAP</a></code></li>
<li><code><a title="exchangelib.EWSTimeZone.from_datetime" href="#exchangelib.EWSTimeZone.from_datetime">from_datetime</a></code></li>
<li><code><a title="exchangelib.EWSTimeZone.from_dateutil" href="#exchangelib.EWSTimeZone.from_dateutil">from_dateutil</a></code></li>
<li><code><a title="exchangelib.EWSTimeZone.from_ms_id" href="#exchangelib.EWSTimeZone.from_ms_id">from_ms_id</a></code></li>
<li><code><a title="exchangelib.EWSTimeZone.from_pytz" href="#exchangelib.EWSTimeZone.from_pytz">from_pytz</a></code></li>
Expand Down
4 changes: 2 additions & 2 deletions docs/exchangelib/properties.html
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ <h1 class="title">Module <code>exchangelib.properties</code></h1>

time_window = EWSElementField(value_cls=TimeWindow, is_required=True)
# Interval value is in minutes
merged_free_busy_interval = IntegerField(field_uri=&#39;MergedFreeBusyIntervalInMinutes&#39;, min=6, max=1440, default=30,
merged_free_busy_interval = IntegerField(field_uri=&#39;MergedFreeBusyIntervalInMinutes&#39;, min=5, max=1440, default=30,
is_required=True)
requested_view = ChoiceField(field_uri=&#39;RequestedView&#39;, choices={Choice(c) for c in REQUESTED_VIEWS},
is_required=True) # Choice(&#39;None&#39;) is also valid, but only for responses
Expand Down Expand Up @@ -5258,7 +5258,7 @@ <h3>Inherited members</h3>

time_window = EWSElementField(value_cls=TimeWindow, is_required=True)
# Interval value is in minutes
merged_free_busy_interval = IntegerField(field_uri=&#39;MergedFreeBusyIntervalInMinutes&#39;, min=6, max=1440, default=30,
merged_free_busy_interval = IntegerField(field_uri=&#39;MergedFreeBusyIntervalInMinutes&#39;, min=5, max=1440, default=30,
is_required=True)
requested_view = ChoiceField(field_uri=&#39;RequestedView&#39;, choices={Choice(c) for c in REQUESTED_VIEWS},
is_required=True) # Choice(&#39;None&#39;) is also valid, but only for responses</code></pre>
Expand Down
Loading

0 comments on commit 0757658

Please sign in to comment.