Skip to content

Commit 0fedf4f

Browse files
committed
version 3.19.5
1 parent 14c2582 commit 0fedf4f

File tree

6 files changed

+139
-25
lines changed

6 files changed

+139
-25
lines changed

docs/api-docs/slack_sdk/audit_logs/v1/logs.html

Lines changed: 110 additions & 2 deletions
Large diffs are not rendered by default.

docs/api-docs/slack_sdk/socket_mode/aiohttp/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ <h1 class="title">Module <code>slack_sdk.socket_mode.aiohttp</code></h1>
387387
autoping=False,
388388
heartbeat=self.ping_interval,
389389
proxy=self.proxy,
390+
ssl=self.web_client.ssl,
390391
)
391392
session_id: str = await self.session_id()
392393
self.auto_reconnect_enabled = self.default_auto_reconnect_enabled
@@ -842,6 +843,7 @@ <h2 id="args">Args</h2>
842843
autoping=False,
843844
heartbeat=self.ping_interval,
844845
proxy=self.proxy,
846+
ssl=self.web_client.ssl,
845847
)
846848
session_id: str = await self.session_id()
847849
self.auto_reconnect_enabled = self.default_auto_reconnect_enabled
@@ -1091,6 +1093,7 @@ <h3>Methods</h3>
10911093
autoping=False,
10921094
heartbeat=self.ping_interval,
10931095
proxy=self.proxy,
1096+
ssl=self.web_client.ssl,
10941097
)
10951098
session_id: str = await self.session_id()
10961099
self.auto_reconnect_enabled = self.default_auto_reconnect_enabled

docs/api-docs/slack_sdk/version.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h1 class="title">Module <code>slack_sdk.version</code></h1>
2828
<span>Expand source code</span>
2929
</summary>
3030
<pre><code class="python">&#34;&#34;&#34;Check the latest version at https://pypi.org/project/slack-sdk/&#34;&#34;&#34;
31-
__version__ = &#34;3.19.4&#34;</code></pre>
31+
__version__ = &#34;3.19.5&#34;</code></pre>
3232
</details>
3333
</section>
3434
<section>

docs/api-docs/slack_sdk/web/async_slack_response.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ <h1 class="title">Module <code>slack_sdk.web.async_slack_response</code></h1>
174174
params = self.req_args.get(&#34;params&#34;, {})
175175
if params is None:
176176
params = {}
177-
params.update({&#34;cursor&#34;: self.data[&#34;response_metadata&#34;][&#34;next_cursor&#34;]})
177+
next_cursor = self.data.get(&#34;response_metadata&#34;, {}).get(&#34;next_cursor&#34;) or self.data.get(&#34;next_cursor&#34;)
178+
params.update({&#34;cursor&#34;: next_cursor})
178179
self.req_args.update({&#34;params&#34;: params})
179180

180181
response = await self._client._request( # skipcq: PYL-W0212
@@ -423,7 +424,8 @@ <h2 id="note">Note</h2>
423424
params = self.req_args.get(&#34;params&#34;, {})
424425
if params is None:
425426
params = {}
426-
params.update({&#34;cursor&#34;: self.data[&#34;response_metadata&#34;][&#34;next_cursor&#34;]})
427+
next_cursor = self.data.get(&#34;response_metadata&#34;, {}).get(&#34;next_cursor&#34;) or self.data.get(&#34;next_cursor&#34;)
428+
params.update({&#34;cursor&#34;: next_cursor})
427429
self.req_args.update({&#34;params&#34;: params})
428430

429431
response = await self._client._request( # skipcq: PYL-W0212

docs/api-docs/slack_sdk/web/internal_utils.html

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -283,38 +283,39 @@ <h1 class="title">Module <code>slack_sdk.web.internal_utils</code></h1>
283283
if skip_deprecation:
284284
return
285285

286-
# At this point, at a minimum, text argument is missing. Warn the user about this.
287-
message = (
286+
# if text argument is missing, Warn the user about this.
287+
# However, do not warn if a fallback field exists for all attachments, since this can be substituted.
288+
missing_text_message = (
288289
f&#34;The top-level `text` argument is missing in the request payload for a {endpoint} call - &#34;
289290
f&#34;It&#39;s a best practice to always provide a `text` argument when posting a message. &#34;
290291
f&#34;The `text` argument is used in places where content cannot be rendered such as: &#34;
291292
&#34;system push notifications, assistive technology such as screen readers, etc.&#34;
292293
)
293-
warnings.warn(message, UserWarning)
294+
295+
# https://api.slack.com/reference/messaging/attachments
296+
# Check if the fallback field exists for all the attachments
297+
# Not all attachments have a fallback property; warn about this too!
298+
missing_fallback_message = (
299+
f&#34;Additionally, the attachment-level `fallback` argument is missing in the request payload for a {endpoint} call&#34;
300+
&#34; - To avoid this warning, it is recommended to always provide a top-level `text` argument when posting a&#34;
301+
&#34; message. Alternatively you can provide an attachment-level `fallback` argument, though this is now considered&#34;
302+
&#34; a legacy field (see https://api.slack.com/reference/messaging/attachments#legacy_fields for more details).&#34;
303+
)
294304

295305
# Additionally, specifically for attachments, there is a legacy field available at the attachment level called `fallback`
296306
# Even with a missing text, one can provide a `fallback` per attachment.
297307
# More details here: https://api.slack.com/reference/messaging/attachments#legacy_fields
298308
attachments = kwargs.get(&#34;attachments&#34;)
299309
# Note that this method does not verify attachments
300310
# if the value is already serialized as a single str value.
301-
if (
302-
attachments is not None
303-
and isinstance(attachments, list)
304-
and not all(
311+
if attachments is not None and isinstance(attachments, list):
312+
if not all(
305313
[isinstance(attachment, dict) and len(attachment.get(&#34;fallback&#34;, &#34;&#34;).strip()) &gt; 0 for attachment in attachments]
306-
)
307-
):
308-
# https://api.slack.com/reference/messaging/attachments
309-
# Check if the fallback field exists for all the attachments
310-
# Not all attachments have a fallback property; warn about this too!
311-
message = (
312-
f&#34;Additionally, the attachment-level `fallback` argument is missing in the request payload for a {endpoint} call&#34;
313-
f&#34; - To avoid this warning, it is recommended to always provide a top-level `text` argument when posting a&#34;
314-
f&#34; message. Alternatively you can provide an attachment-level `fallback` argument, though this is now considered&#34;
315-
f&#34; a legacy field (see https://api.slack.com/reference/messaging/attachments#legacy_fields for more details).&#34;
316-
)
317-
warnings.warn(message, UserWarning)
314+
):
315+
warnings.warn(missing_text_message, UserWarning)
316+
warnings.warn(missing_fallback_message, UserWarning)
317+
else:
318+
warnings.warn(missing_text_message, UserWarning)
318319

319320

320321
def _build_unexpected_body_error_message(body: str) -&gt; str:

slack_sdk/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""Check the latest version at https://pypi.org/project/slack-sdk/"""
2-
__version__ = "3.19.4"
2+
__version__ = "3.19.5"

0 commit comments

Comments
 (0)