Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ecederstrand committed Oct 28, 2024
1 parent 243a7cf commit 44a020e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
9 changes: 1 addition & 8 deletions docs/exchangelib/ewsdatetime.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ <h1 class="title">Module <code>exchangelib.ewsdatetime</code></h1>
</summary>
<pre><code class="python">import datetime
import logging

try:
import zoneinfo
except ImportError:
from backports import zoneinfo
import zoneinfo

import tzlocal

Expand Down Expand Up @@ -311,7 +307,6 @@ <h1 class="title">Module <code>exchangelib.ewsdatetime</code></h1>
try:
return {
cls.__module__.split(&#34;.&#34;)[0]: lambda z: z,
&#34;backports&#34;: cls.from_zoneinfo,
&#34;datetime&#34;: cls.from_datetime,
&#34;dateutil&#34;: cls.from_dateutil,
&#34;pytz&#34;: cls.from_pytz,
Expand Down Expand Up @@ -953,7 +948,6 @@ <h3>Methods</h3>
try:
return {
cls.__module__.split(&#34;.&#34;)[0]: lambda z: z,
&#34;backports&#34;: cls.from_zoneinfo,
&#34;datetime&#34;: cls.from_datetime,
&#34;dateutil&#34;: cls.from_dateutil,
&#34;pytz&#34;: cls.from_pytz,
Expand Down Expand Up @@ -1085,7 +1079,6 @@ <h3>Static methods</h3>
try:
return {
cls.__module__.split(&#34;.&#34;)[0]: lambda z: z,
&#34;backports&#34;: cls.from_zoneinfo,
&#34;datetime&#34;: cls.from_datetime,
&#34;dateutil&#34;: cls.from_dateutil,
&#34;pytz&#34;: cls.from_pytz,
Expand Down
12 changes: 8 additions & 4 deletions docs/exchangelib/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h1 class="title">Package <code>exchangelib</code></h1>
from .transport import BASIC, CBA, DIGEST, GSSAPI, NTLM, OAUTH2, SSPI
from .version import Build, Version

__version__ = &#34;5.4.3&#34;
__version__ = &#34;5.5.0&#34;

__all__ = [
&#34;AcceptItem&#34;,
Expand Down Expand Up @@ -134,9 +134,9 @@ <h1 class="title">Package <code>exchangelib</code></h1>
&#34;discover&#34;,
]

# Set a default user agent, e.g. &#34;exchangelib/3.1.1 (python-requests/2.22.0)&#34;
import requests.utils

# Set a default user agent, e.g. &#34;exchangelib/5.4.3 (python-requests/2.31.0)&#34;
BaseProtocol.USERAGENT = f&#34;{__name__}/{__version__} ({requests.utils.default_user_agent()})&#34;


Expand Down Expand Up @@ -6124,7 +6124,6 @@ <h3>Methods</h3>
try:
return {
cls.__module__.split(&#34;.&#34;)[0]: lambda z: z,
&#34;backports&#34;: cls.from_zoneinfo,
&#34;datetime&#34;: cls.from_datetime,
&#34;dateutil&#34;: cls.from_dateutil,
&#34;pytz&#34;: cls.from_pytz,
Expand Down Expand Up @@ -6256,7 +6255,6 @@ <h3>Static methods</h3>
try:
return {
cls.__module__.split(&#34;.&#34;)[0]: lambda z: z,
&#34;backports&#34;: cls.from_zoneinfo,
&#34;datetime&#34;: cls.from_datetime,
&#34;dateutil&#34;: cls.from_dateutil,
&#34;pytz&#34;: cls.from_pytz,
Expand Down Expand Up @@ -10266,6 +10264,9 @@ <h3>Inherited members</h3>
raise ValueError(&#34;&#39;start&#39; must be before &#39;end&#39;&#34;)
if self.end &lt; datetime.datetime.now(tz=UTC):
raise ValueError(&#34;&#39;end&#39; must be in the future&#34;)
# Some servers only like UTC timestamps
self.start = self.start.astimezone(UTC)
self.end = self.end.astimezone(UTC)
if self.state != self.DISABLED and (not self.internal_reply or not self.external_reply):
raise ValueError(f&#34;&#39;internal_reply&#39; and &#39;external_reply&#39; must be set when state is not {self.DISABLED!r}&#34;)

Expand Down Expand Up @@ -10420,6 +10421,9 @@ <h3>Methods</h3>
raise ValueError(&#34;&#39;start&#39; must be before &#39;end&#39;&#34;)
if self.end &lt; datetime.datetime.now(tz=UTC):
raise ValueError(&#34;&#39;end&#39; must be in the future&#34;)
# Some servers only like UTC timestamps
self.start = self.start.astimezone(UTC)
self.end = self.end.astimezone(UTC)
if self.state != self.DISABLED and (not self.internal_reply or not self.external_reply):
raise ValueError(f&#34;&#39;internal_reply&#39; and &#39;external_reply&#39; must be set when state is not {self.DISABLED!r}&#34;)</code></pre>
</details>
Expand Down
11 changes: 10 additions & 1 deletion docs/exchangelib/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ <h1 class="title">Module <code>exchangelib.settings</code></h1>
raise ValueError(&#34;&#39;start&#39; must be before &#39;end&#39;&#34;)
if self.end &lt; datetime.datetime.now(tz=UTC):
raise ValueError(&#34;&#39;end&#39; must be in the future&#34;)
# Some servers only like UTC timestamps
self.start = self.start.astimezone(UTC)
self.end = self.end.astimezone(UTC)
if self.state != self.DISABLED and (not self.internal_reply or not self.external_reply):
raise ValueError(f&#34;&#39;internal_reply&#39; and &#39;external_reply&#39; must be set when state is not {self.DISABLED!r}&#34;)

Expand Down Expand Up @@ -161,6 +164,9 @@ <h2 class="section-title" id="header-classes">Classes</h2>
raise ValueError(&#34;&#39;start&#39; must be before &#39;end&#39;&#34;)
if self.end &lt; datetime.datetime.now(tz=UTC):
raise ValueError(&#34;&#39;end&#39; must be in the future&#34;)
# Some servers only like UTC timestamps
self.start = self.start.astimezone(UTC)
self.end = self.end.astimezone(UTC)
if self.state != self.DISABLED and (not self.internal_reply or not self.external_reply):
raise ValueError(f&#34;&#39;internal_reply&#39; and &#39;external_reply&#39; must be set when state is not {self.DISABLED!r}&#34;)

Expand Down Expand Up @@ -315,6 +321,9 @@ <h3>Methods</h3>
raise ValueError(&#34;&#39;start&#39; must be before &#39;end&#39;&#34;)
if self.end &lt; datetime.datetime.now(tz=UTC):
raise ValueError(&#34;&#39;end&#39; must be in the future&#34;)
# Some servers only like UTC timestamps
self.start = self.start.astimezone(UTC)
self.end = self.end.astimezone(UTC)
if self.state != self.DISABLED and (not self.internal_reply or not self.external_reply):
raise ValueError(f&#34;&#39;internal_reply&#39; and &#39;external_reply&#39; must be set when state is not {self.DISABLED!r}&#34;)</code></pre>
</details>
Expand Down Expand Up @@ -412,4 +421,4 @@ <h4><code><a title="exchangelib.settings.OofSettings" href="#exchangelib.setting
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
</footer>
</body>
</html>
</html>
7 changes: 6 additions & 1 deletion docs/exchangelib/winzone.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ <h1 class="title">Module <code>exchangelib.winzone</code></h1>
<pre><code class="python">&#34;&#34;&#34;A dict to translate from IANA location name to Windows timezone name. Translations taken from CLDR_WINZONE_URL
&#34;&#34;&#34;

# Data taken from https://github.com/unicode-org/cldr/blob/main/common/supplemental/windowsZones.xml
# SPDX-FileCopyrightText: Copyright © 1991-2013 Unicode, Inc.
# SPDX-License-Identifier: Unicode-3.0
# See https://www.unicode.org/license.txt for the license text.

import re

import requests
Expand Down Expand Up @@ -293,7 +298,6 @@ <h1 class="title">Module <code>exchangelib.winzone</code></h1>
&#34;Asia/Brunei&#34;: (&#34;Singapore Standard Time&#34;, &#34;BN&#34;),
&#34;Asia/Calcutta&#34;: (&#34;India Standard Time&#34;, &#34;001&#34;),
&#34;Asia/Chita&#34;: (&#34;Transbaikal Standard Time&#34;, &#34;001&#34;),
&#34;Asia/Choibalsan&#34;: (&#34;Ulaanbaatar Standard Time&#34;, &#34;MN&#34;),
&#34;Asia/Colombo&#34;: (&#34;Sri Lanka Standard Time&#34;, &#34;001&#34;),
&#34;Asia/Damascus&#34;: (&#34;Syria Standard Time&#34;, &#34;001&#34;),
&#34;Asia/Dhaka&#34;: (&#34;Bangladesh Standard Time&#34;, &#34;001&#34;),
Expand Down Expand Up @@ -545,6 +549,7 @@ <h1 class="title">Module <code>exchangelib.winzone</code></h1>
&#34;Antarctica/South_Pole&#34;: CLDR_TO_MS_TIMEZONE_MAP[&#34;Pacific/Auckland&#34;],
&#34;Antarctica/Troll&#34;: CLDR_TO_MS_TIMEZONE_MAP[&#34;Europe/Oslo&#34;],
&#34;Asia/Ashkhabad&#34;: CLDR_TO_MS_TIMEZONE_MAP[&#34;Asia/Ashgabat&#34;],
&#34;Asia/Choibalsan&#34;: CLDR_TO_MS_TIMEZONE_MAP[&#34;Asia/Ulaanbaatar&#34;],
&#34;Asia/Chongqing&#34;: CLDR_TO_MS_TIMEZONE_MAP[&#34;Asia/Shanghai&#34;],
&#34;Asia/Chungking&#34;: CLDR_TO_MS_TIMEZONE_MAP[&#34;Asia/Shanghai&#34;],
&#34;Asia/Dacca&#34;: CLDR_TO_MS_TIMEZONE_MAP[&#34;Asia/Dhaka&#34;],
Expand Down

0 comments on commit 44a020e

Please sign in to comment.