Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

build(deps): bump slack-sdk from 3.18.3 to 3.19.1 #2112

Merged
merged 2 commits into from
Oct 10, 2022

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 6, 2022

Bumps slack-sdk from 3.18.3 to 3.19.1.

Release notes

Sourced from slack-sdk's releases.

version 3.19.1

Changes

  • Improve WebClient#files_upload_v2() to use given filename as the default title value - Thanks @​seratch @​mattpr

version 3.19.0

New Features

files.upload v2 in WebClient / AsyncWebClient

We've received many reports on the performance issue of the existing files.upload API (refer to #1191 #1165 for details). So, to cope with the problem, our platform team decided to unlock a new way to upload files to Slack via public APIs. To utilize the new approach, developers need to implement the following steps on their code side:

  1. Call WebClient#files_getUploadURLExternal() method to receive a URL to use for each file
  2. Perform an HTTP POST request to the URL you received in step 1 for each file
  3. Call WebClient#files_completeUploadExternal() method with the pairs of file ID and title to complete the whole process, plus share the files in a channel
  4. If you need the full metadata of the files, call WebClient#files_info() method for each file

We do understand that writing the above code requires many lines of code. Also, the existing WebClient#files_upload() users have to take a certain amount of time for migration. To mitigate the pain, we've added a wrapper method named WebClient#files_upload_v2() on the SDK side.

Also, in addition to the performance improvements, another good news is that 3rd party apps can now upload multiple files at a time!

See the following code examples demonstrating how the wrapper method works:

import os
from slack_sdk import WebClient
client = WebClient(token=os.environ["SLACK_BOT_TOKEN"])
Legacy way
response = client.files_upload(
file="./logo.png",
title="New company logo",
channels=["C12345"],
initial_comment="Here is the latest version of our new company logo :wave:",
)
response.get("file")  # returns the full metadata of the uploaded file
New way - the same parameters works in most cases
response = client.files_upload_v2(
file="./logo.png",
title="New company logo",
# Note that channels still works but going with channel="C12345" is recommended
# channels=["C111", "C222"] is no longer supported. In this case, an exception can be thrown
channels=["C12345"],
initial_comment="Here is the latest version of our new company logo :wave:",
)
response.get("file")  # returns the full metadata of the uploaded file
</tr></table>

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Oct 6, 2022
kodiakhq[bot]
kodiakhq bot previously approved these changes Oct 6, 2022
kodiakhq[bot]
kodiakhq bot previously approved these changes Oct 7, 2022
@dependabot dependabot bot force-pushed the dependabot/pip/slack-sdk-3.19.1 branch from bfbb10a to 7966dbf Compare October 7, 2022 11:27
kodiakhq[bot]
kodiakhq bot previously approved these changes Oct 7, 2022
Bumps [slack-sdk](https://github.com/slackapi/python-slack-sdk) from 3.18.3 to 3.19.1.
- [Release notes](https://github.com/slackapi/python-slack-sdk/releases)
- [Changelog](https://github.com/slackapi/python-slack-sdk/blob/main/docs-v2/changelog.html)
- [Commits](slackapi/python-slack-sdk@v3.18.3...v3.19.1)

---
updated-dependencies:
- dependency-name: slack-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@kodiakhq kodiakhq bot merged commit cc78a52 into master Oct 10, 2022
@kodiakhq kodiakhq bot deleted the dependabot/pip/slack-sdk-3.19.1 branch October 10, 2022 05:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Development

Successfully merging this pull request may close these issues.

0 participants