Skip to content

Commit

Permalink
docs: regenerate
Browse files Browse the repository at this point in the history
  • Loading branch information
ecederstrand committed Aug 9, 2022
1 parent 2a1cb32 commit b72c219
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 105 deletions.
21 changes: 14 additions & 7 deletions docs/exchangelib/autodiscover/discovery.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ <h1 class="title">Module <code>exchangelib.autodiscover.discovery</code></h1>
MAX_REDIRECTS = 10 # Maximum number of URL redirects before we give up
DNS_RESOLVER_KWARGS = {}
DNS_RESOLVER_ATTRS = {
&#34;timeout&#34;: AutodiscoverProtocol.TIMEOUT,
&#34;timeout&#34;: AutodiscoverProtocol.TIMEOUT / 2.5, # Timeout for query to a single nameserver
}
DNS_RESOLVER_LIFETIME = AutodiscoverProtocol.TIMEOUT # Total timeout for a query in case of multiple nameservers

def __init__(self, email, credentials=None):
&#34;&#34;&#34;
Expand Down Expand Up @@ -392,7 +393,7 @@ <h1 class="title">Module <code>exchangelib.autodiscover.discovery</code></h1>
def _is_valid_hostname(self, hostname):
log.debug(&#34;Checking if %s can be looked up in DNS&#34;, hostname)
try:
self.resolver.resolve(f&#34;{hostname}.&#34;, &#34;A&#34;, lifetime=self.DNS_RESOLVER_ATTRS.get(&#34;timeout&#34;))
self.resolver.resolve(f&#34;{hostname}.&#34;, &#34;A&#34;, lifetime=self.DNS_RESOLVER_LIFETIME)
except DNS_LOOKUP_ERRORS as e:
log.debug(&#34;DNS A lookup failure: %s&#34;, e)
return False
Expand All @@ -414,7 +415,7 @@ <h1 class="title">Module <code>exchangelib.autodiscover.discovery</code></h1>
log.debug(&#34;Attempting to get SRV records for %s&#34;, hostname)
records = []
try:
answers = self.resolver.resolve(f&#34;{hostname}.&#34;, &#34;SRV&#34;, lifetime=self.DNS_RESOLVER_ATTRS.get(&#34;timeout&#34;))
answers = self.resolver.resolve(f&#34;{hostname}.&#34;, &#34;SRV&#34;, lifetime=self.DNS_RESOLVER_LIFETIME)
except DNS_LOOKUP_ERRORS as e:
log.debug(&#34;DNS SRV lookup failure: %s&#34;, e)
return records
Expand Down Expand Up @@ -691,8 +692,9 @@ <h2 class="section-title" id="header-classes">Classes</h2>
MAX_REDIRECTS = 10 # Maximum number of URL redirects before we give up
DNS_RESOLVER_KWARGS = {}
DNS_RESOLVER_ATTRS = {
&#34;timeout&#34;: AutodiscoverProtocol.TIMEOUT,
&#34;timeout&#34;: AutodiscoverProtocol.TIMEOUT / 2.5, # Timeout for query to a single nameserver
}
DNS_RESOLVER_LIFETIME = AutodiscoverProtocol.TIMEOUT # Total timeout for a query in case of multiple nameservers

def __init__(self, email, credentials=None):
&#34;&#34;&#34;
Expand Down Expand Up @@ -967,7 +969,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
def _is_valid_hostname(self, hostname):
log.debug(&#34;Checking if %s can be looked up in DNS&#34;, hostname)
try:
self.resolver.resolve(f&#34;{hostname}.&#34;, &#34;A&#34;, lifetime=self.DNS_RESOLVER_ATTRS.get(&#34;timeout&#34;))
self.resolver.resolve(f&#34;{hostname}.&#34;, &#34;A&#34;, lifetime=self.DNS_RESOLVER_LIFETIME)
except DNS_LOOKUP_ERRORS as e:
log.debug(&#34;DNS A lookup failure: %s&#34;, e)
return False
Expand All @@ -989,7 +991,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
log.debug(&#34;Attempting to get SRV records for %s&#34;, hostname)
records = []
try:
answers = self.resolver.resolve(f&#34;{hostname}.&#34;, &#34;SRV&#34;, lifetime=self.DNS_RESOLVER_ATTRS.get(&#34;timeout&#34;))
answers = self.resolver.resolve(f&#34;{hostname}.&#34;, &#34;SRV&#34;, lifetime=self.DNS_RESOLVER_LIFETIME)
except DNS_LOOKUP_ERRORS as e:
log.debug(&#34;DNS SRV lookup failure: %s&#34;, e)
return records
Expand Down Expand Up @@ -1166,6 +1168,10 @@ <h3>Class variables</h3>
<dd>
<div class="desc"></div>
</dd>
<dt id="exchangelib.autodiscover.discovery.Autodiscovery.DNS_RESOLVER_LIFETIME"><code class="name">var <span class="ident">DNS_RESOLVER_LIFETIME</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="exchangelib.autodiscover.discovery.Autodiscovery.INITIAL_RETRY_POLICY"><code class="name">var <span class="ident">INITIAL_RETRY_POLICY</span></code></dt>
<dd>
<div class="desc"></div>
Expand Down Expand Up @@ -1323,6 +1329,7 @@ <h4><code><a title="exchangelib.autodiscover.discovery.Autodiscovery" href="#exc
<ul class="">
<li><code><a title="exchangelib.autodiscover.discovery.Autodiscovery.DNS_RESOLVER_ATTRS" href="#exchangelib.autodiscover.discovery.Autodiscovery.DNS_RESOLVER_ATTRS">DNS_RESOLVER_ATTRS</a></code></li>
<li><code><a title="exchangelib.autodiscover.discovery.Autodiscovery.DNS_RESOLVER_KWARGS" href="#exchangelib.autodiscover.discovery.Autodiscovery.DNS_RESOLVER_KWARGS">DNS_RESOLVER_KWARGS</a></code></li>
<li><code><a title="exchangelib.autodiscover.discovery.Autodiscovery.DNS_RESOLVER_LIFETIME" href="#exchangelib.autodiscover.discovery.Autodiscovery.DNS_RESOLVER_LIFETIME">DNS_RESOLVER_LIFETIME</a></code></li>
<li><code><a title="exchangelib.autodiscover.discovery.Autodiscovery.INITIAL_RETRY_POLICY" href="#exchangelib.autodiscover.discovery.Autodiscovery.INITIAL_RETRY_POLICY">INITIAL_RETRY_POLICY</a></code></li>
<li><code><a title="exchangelib.autodiscover.discovery.Autodiscovery.MAX_REDIRECTS" href="#exchangelib.autodiscover.discovery.Autodiscovery.MAX_REDIRECTS">MAX_REDIRECTS</a></code></li>
<li><code><a title="exchangelib.autodiscover.discovery.Autodiscovery.RETRY_WAIT" href="#exchangelib.autodiscover.discovery.Autodiscovery.RETRY_WAIT">RETRY_WAIT</a></code></li>
Expand All @@ -1343,4 +1350,4 @@ <h4><code><a title="exchangelib.autodiscover.discovery.SrvRecord" href="#exchang
<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>
14 changes: 10 additions & 4 deletions docs/exchangelib/autodiscover/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,9 @@ <h3>Inherited members</h3>
MAX_REDIRECTS = 10 # Maximum number of URL redirects before we give up
DNS_RESOLVER_KWARGS = {}
DNS_RESOLVER_ATTRS = {
&#34;timeout&#34;: AutodiscoverProtocol.TIMEOUT,
&#34;timeout&#34;: AutodiscoverProtocol.TIMEOUT / 2.5, # Timeout for query to a single nameserver
}
DNS_RESOLVER_LIFETIME = AutodiscoverProtocol.TIMEOUT # Total timeout for a query in case of multiple nameservers

def __init__(self, email, credentials=None):
&#34;&#34;&#34;
Expand Down Expand Up @@ -665,7 +666,7 @@ <h3>Inherited members</h3>
def _is_valid_hostname(self, hostname):
log.debug(&#34;Checking if %s can be looked up in DNS&#34;, hostname)
try:
self.resolver.resolve(f&#34;{hostname}.&#34;, &#34;A&#34;, lifetime=self.DNS_RESOLVER_ATTRS.get(&#34;timeout&#34;))
self.resolver.resolve(f&#34;{hostname}.&#34;, &#34;A&#34;, lifetime=self.DNS_RESOLVER_LIFETIME)
except DNS_LOOKUP_ERRORS as e:
log.debug(&#34;DNS A lookup failure: %s&#34;, e)
return False
Expand All @@ -687,7 +688,7 @@ <h3>Inherited members</h3>
log.debug(&#34;Attempting to get SRV records for %s&#34;, hostname)
records = []
try:
answers = self.resolver.resolve(f&#34;{hostname}.&#34;, &#34;SRV&#34;, lifetime=self.DNS_RESOLVER_ATTRS.get(&#34;timeout&#34;))
answers = self.resolver.resolve(f&#34;{hostname}.&#34;, &#34;SRV&#34;, lifetime=self.DNS_RESOLVER_LIFETIME)
except DNS_LOOKUP_ERRORS as e:
log.debug(&#34;DNS SRV lookup failure: %s&#34;, e)
return records
Expand Down Expand Up @@ -864,6 +865,10 @@ <h3>Class variables</h3>
<dd>
<div class="desc"></div>
</dd>
<dt id="exchangelib.autodiscover.Autodiscovery.DNS_RESOLVER_LIFETIME"><code class="name">var <span class="ident">DNS_RESOLVER_LIFETIME</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="exchangelib.autodiscover.Autodiscovery.INITIAL_RETRY_POLICY"><code class="name">var <span class="ident">INITIAL_RETRY_POLICY</span></code></dt>
<dd>
<div class="desc"></div>
Expand Down Expand Up @@ -1021,6 +1026,7 @@ <h4><code><a title="exchangelib.autodiscover.Autodiscovery" href="#exchangelib.a
<ul class="">
<li><code><a title="exchangelib.autodiscover.Autodiscovery.DNS_RESOLVER_ATTRS" href="#exchangelib.autodiscover.Autodiscovery.DNS_RESOLVER_ATTRS">DNS_RESOLVER_ATTRS</a></code></li>
<li><code><a title="exchangelib.autodiscover.Autodiscovery.DNS_RESOLVER_KWARGS" href="#exchangelib.autodiscover.Autodiscovery.DNS_RESOLVER_KWARGS">DNS_RESOLVER_KWARGS</a></code></li>
<li><code><a title="exchangelib.autodiscover.Autodiscovery.DNS_RESOLVER_LIFETIME" href="#exchangelib.autodiscover.Autodiscovery.DNS_RESOLVER_LIFETIME">DNS_RESOLVER_LIFETIME</a></code></li>
<li><code><a title="exchangelib.autodiscover.Autodiscovery.INITIAL_RETRY_POLICY" href="#exchangelib.autodiscover.Autodiscovery.INITIAL_RETRY_POLICY">INITIAL_RETRY_POLICY</a></code></li>
<li><code><a title="exchangelib.autodiscover.Autodiscovery.MAX_REDIRECTS" href="#exchangelib.autodiscover.Autodiscovery.MAX_REDIRECTS">MAX_REDIRECTS</a></code></li>
<li><code><a title="exchangelib.autodiscover.Autodiscovery.RETRY_WAIT" href="#exchangelib.autodiscover.Autodiscovery.RETRY_WAIT">RETRY_WAIT</a></code></li>
Expand All @@ -1038,4 +1044,4 @@ <h4><code><a title="exchangelib.autodiscover.Autodiscovery" href="#exchangelib.a
<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>
44 changes: 26 additions & 18 deletions docs/exchangelib/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,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;4.7.4&#34;
__version__ = &#34;4.7.5&#34;

__all__ = [
&#34;__version__&#34;,
Expand Down Expand Up @@ -2870,8 +2870,12 @@ <h3>Inherited members</h3>
session = self.renew_session(session)
self._session_pool.put(session, block=False)

@staticmethod
def close_session(session):
def close_session(self, session):
if isinstance(self.credentials, OAuth2Credentials) and not isinstance(
self.credentials, OAuth2AuthorizationCodeCredentials
):
# Reset token if client is of type BackendApplicationClient
self.credentials.access_token = None
session.close()
del session

Expand Down Expand Up @@ -3051,21 +3055,6 @@ <h3>Class variables</h3>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="exchangelib.BaseProtocol.close_session"><code class="name flex">
<span>def <span class="ident">close_session</span></span>(<span>session)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@staticmethod
def close_session(session):
session.close()
del session</code></pre>
</details>
</dd>
<dt id="exchangelib.BaseProtocol.get_adapter"><code class="name flex">
<span>def <span class="ident">get_adapter</span></span>(<span>)</span>
</code></dt>
Expand Down Expand Up @@ -3208,6 +3197,25 @@ <h3>Methods</h3>
break</code></pre>
</details>
</dd>
<dt id="exchangelib.BaseProtocol.close_session"><code class="name flex">
<span>def <span class="ident">close_session</span></span>(<span>self, session)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def close_session(self, session):
if isinstance(self.credentials, OAuth2Credentials) and not isinstance(
self.credentials, OAuth2AuthorizationCodeCredentials
):
# Reset token if client is of type BackendApplicationClient
self.credentials.access_token = None
session.close()
del session</code></pre>
</details>
</dd>
<dt id="exchangelib.BaseProtocol.create_oauth2_session"><code class="name flex">
<span>def <span class="ident">create_oauth2_session</span></span>(<span>self)</span>
</code></dt>
Expand Down
56 changes: 34 additions & 22 deletions docs/exchangelib/protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,12 @@ <h1 class="title">Module <code>exchangelib.protocol</code></h1>
session = self.renew_session(session)
self._session_pool.put(session, block=False)

@staticmethod
def close_session(session):
def close_session(self, session):
if isinstance(self.credentials, OAuth2Credentials) and not isinstance(
self.credentials, OAuth2AuthorizationCodeCredentials
):
# Reset token if client is of type BackendApplicationClient
self.credentials.access_token = None
session.close()
del session

Expand Down Expand Up @@ -533,7 +537,6 @@ <h1 class="title">Module <code>exchangelib.protocol</code></h1>

tz_definition = list(self.get_timezones(timezones=[start.tzinfo], return_full_timezone_data=True))[0]
return GetUserAvailability(self).call(
timezone=TimeZone.from_server_timezone(tz_definition=tz_definition, for_year=start.year),
mailbox_data=[
MailboxData(
email=account.primary_smtp_address if isinstance(account, Account) else account,
Expand All @@ -542,6 +545,7 @@ <h1 class="title">Module <code>exchangelib.protocol</code></h1>
)
for account, attendee_type, exclude_conflicts in accounts
],
timezone=TimeZone.from_server_timezone(tz_definition=tz_definition, for_year=start.year),
free_busy_view_options=FreeBusyViewOptions(
time_window=TimeWindow(start=start, end=end),
merged_free_busy_interval=merged_free_busy_interval,
Expand Down Expand Up @@ -1054,8 +1058,12 @@ <h2 class="section-title" id="header-classes">Classes</h2>
session = self.renew_session(session)
self._session_pool.put(session, block=False)

@staticmethod
def close_session(session):
def close_session(self, session):
if isinstance(self.credentials, OAuth2Credentials) and not isinstance(
self.credentials, OAuth2AuthorizationCodeCredentials
):
# Reset token if client is of type BackendApplicationClient
self.credentials.access_token = None
session.close()
del session

Expand Down Expand Up @@ -1235,21 +1243,6 @@ <h3>Class variables</h3>
</dl>
<h3>Static methods</h3>
<dl>
<dt id="exchangelib.protocol.BaseProtocol.close_session"><code class="name flex">
<span>def <span class="ident">close_session</span></span>(<span>session)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">@staticmethod
def close_session(session):
session.close()
del session</code></pre>
</details>
</dd>
<dt id="exchangelib.protocol.BaseProtocol.get_adapter"><code class="name flex">
<span>def <span class="ident">get_adapter</span></span>(<span>)</span>
</code></dt>
Expand Down Expand Up @@ -1392,6 +1385,25 @@ <h3>Methods</h3>
break</code></pre>
</details>
</dd>
<dt id="exchangelib.protocol.BaseProtocol.close_session"><code class="name flex">
<span>def <span class="ident">close_session</span></span>(<span>self, session)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def close_session(self, session):
if isinstance(self.credentials, OAuth2Credentials) and not isinstance(
self.credentials, OAuth2AuthorizationCodeCredentials
):
# Reset token if client is of type BackendApplicationClient
self.credentials.access_token = None
session.close()
del session</code></pre>
</details>
</dd>
<dt id="exchangelib.protocol.BaseProtocol.create_oauth2_session"><code class="name flex">
<span>def <span class="ident">create_oauth2_session</span></span>(<span>self)</span>
</code></dt>
Expand Down Expand Up @@ -2103,7 +2115,6 @@ <h3>Methods</h3>

tz_definition = list(self.get_timezones(timezones=[start.tzinfo], return_full_timezone_data=True))[0]
return GetUserAvailability(self).call(
timezone=TimeZone.from_server_timezone(tz_definition=tz_definition, for_year=start.year),
mailbox_data=[
MailboxData(
email=account.primary_smtp_address if isinstance(account, Account) else account,
Expand All @@ -2112,6 +2123,7 @@ <h3>Methods</h3>
)
for account, attendee_type, exclude_conflicts in accounts
],
timezone=TimeZone.from_server_timezone(tz_definition=tz_definition, for_year=start.year),
free_busy_view_options=FreeBusyViewOptions(
time_window=TimeWindow(start=start, end=end),
merged_free_busy_interval=merged_free_busy_interval,
Expand Down Expand Up @@ -2319,7 +2331,6 @@ <h3>Methods</h3>

tz_definition = list(self.get_timezones(timezones=[start.tzinfo], return_full_timezone_data=True))[0]
return GetUserAvailability(self).call(
timezone=TimeZone.from_server_timezone(tz_definition=tz_definition, for_year=start.year),
mailbox_data=[
MailboxData(
email=account.primary_smtp_address if isinstance(account, Account) else account,
Expand All @@ -2328,6 +2339,7 @@ <h3>Methods</h3>
)
for account, attendee_type, exclude_conflicts in accounts
],
timezone=TimeZone.from_server_timezone(tz_definition=tz_definition, for_year=start.year),
free_busy_view_options=FreeBusyViewOptions(
time_window=TimeWindow(start=start, end=end),
merged_free_busy_interval=merged_free_busy_interval,
Expand Down
Loading

0 comments on commit b72c219

Please sign in to comment.