Skip to content

Conversation

@ewanek1
Copy link
Contributor

@ewanek1 ewanek1 commented Sep 4, 2025

Summary

Remove Python 3.6 support by updating all references to reflect the minimum of Python 3.7+.

Testing

n/a

Category

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs (Documents)
  • [] /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

@ewanek1 ewanek1 added the dependencies Pull requests that update a dependency file label Sep 4, 2025
@codecov
Copy link

codecov bot commented Sep 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.88%. Comparing base (d4fc142) to head (25ba174).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1735      +/-   ##
==========================================
- Coverage   84.91%   84.88%   -0.04%     
==========================================
  Files         113      113              
  Lines       12895    12895              
==========================================
- Hits        10950    10946       -4     
- Misses       1945     1949       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 💯 thanks for putting this together

I left a few comments they are mainly minor ones 🚀 these dependency support version type changes are always more complicated then expected

README.md Outdated
---

This library requires Python 3.6 and above. If you require Python 2, please use our [SlackClient - v1.x][slackclientv1]. If you're unsure how to check what version of Python you're on, you can check it using the following:
This library requires Python 3.7 and above. If you require Python 2, please use our [SlackClient - v1.x][slackclientv1]. If you're unsure how to check what version of Python you're on, you can check it using the following:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also remove the python 2 sentence 😅 the slackClient - v1.x is deprecated

Suggested change
This library requires Python 3.7 and above. If you require Python 2, please use our [SlackClient - v1.x][slackclientv1]. If you're unsure how to check what version of Python you're on, you can check it using the following:
This library requires Python 3.7 and above. If you're unsure how to check what version of Python you're on, you can check it using the following:

Slack APIs allow anyone to build full featured integrations that extend and expand the capabilities of your Slack workspace. These APIs allow you to build applications that interact with Slack just like the people on your team. They can post messages, respond to events that happen, and build complex UIs for getting work done.

To make it easier for Python programmers to build Slack applications, we've provided this open source SDK that will help you get started building Python apps as quickly as possible. The current version is built for Python 3.6 and higher — if you need to target Python 2.x, you might consider using v1 of the SDK.
To make it easier for Python programmers to build Slack applications, we've provided this open source SDK that will help you get started building Python apps as quickly as possible. The current version is built for Python 3.7 and higher — if you need to target Python 2.x, you might consider using v1 of the SDK.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Suggested change
To make it easier for Python programmers to build Slack applications, we've provided this open source SDK that will help you get started building Python apps as quickly as possible. The current version is built for Python 3.7 and higher — if you need to target Python 2.x, you might consider using v1 of the SDK.
To make it easier for Python programmers to build Slack applications, we've provided this open source SDK that will help you get started building Python apps as quickly as possible. The current version is built for Python 3.7 and higher.

### Minimum Python versions {#minimum-versions}

`slackclient` v2.x requires Python 3.6 (or higher). Support for Python 2.7 is maintained in the existing `slackclient` v1.x.
`slackclient` v2.x requires Python 3.7 (or higher). Support for Python 2.7 is maintained in the existing `slackclient` v1.x.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Suggested change
`slackclient` v2.x requires Python 3.7 (or higher). Support for Python 2.7 is maintained in the existing `slackclient` v1.x.
`slackclient` v2.x requires Python 3.7 (or higher).

self.assertEqual(0, after - before)

# fails with Python 3.6
# fails with Python 3.6 (no longer supported)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove this comment entirely 💯

self.assertEqual(0, after - before)

# fails with Python 3.6
# fails with Python 3.6 (no longer supported)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one also 🚀

Comment on lines 11 to 12
black>=22.8.0; python_version=="3.7"
black==22.10.0; python_version>="3.8"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be the reason why the CI tests are failing 🤔
Since we aren't supporting 3.6 anymore we can remove the special case and just keep a global one, like black==22.10.0, but let me know what you think?

Suggested change
black>=22.8.0; python_version=="3.7"
black==22.10.0; python_version>="3.8"
black==22.10.0;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes I agree. Black v22.10.0 supports python 3.7 so the split requirement doesn’t seem to be needed anymore!

Returns:
The user agent string.
e.g. 'Python/3.6.7 slackclient/2.0.0 Darwin/17.7.0'
e.g. 'Python/3.7.0 slackclient/2.0.0 Darwin/17.7.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: lets use 3.7.17 since its the latest 3.7 version and a security release

'Content-Type': 'application/json;charset=utf-8',
'Authorization': 'Bearer xoxb-1234-1243',
'User-Agent': 'Python/3.6.8 slack/2.1.0 Darwin/17.7.0'
'User-Agent': 'Python/3.7.0 slack/2.1.0 Darwin/17.7.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: lets use 3.7.17 since its the latest 3.7 version and a security release

validate_aiohttp_version("2.1.3", print)
self.assertEqual(state["counter"], 1)
validate_aiohttp_version("3.6.3", print)
validate_aiohttp_version("3.7.0", print)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to keep this since this test covers "not recommended versions"

```
$ python3 --version
-> Python 3.6.7
-> Python 3.7.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: lets use 3.7.17 since its the latest 3.7 version and a security release

Copy link
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing all the comments 💯 🚀

There are 2 minor ones left that related to code comments, once addressed, we should be all clear and ready to merge 🚢

'Content-Type': 'application/json;charset=utf-8',
'Authorization': 'Bearer xoxb-1234-1243',
'User-Agent': 'Python/3.6.8 slack/2.1.0 Darwin/17.7.0'
'User-Agent': 'Python/3.7.0 slack/2.1.0 Darwin/17.7.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: what do you think about keeping this consistent with slack_sdk/web/internal_utils.py

Suggested change
'User-Agent': 'Python/3.7.0 slack/2.1.0 Darwin/17.7.0'
'User-Agent': 'Python/3.7.17 slack/2.1.0 Darwin/17.7.0'

@WilliamBergamin WilliamBergamin added this to the 3.37.0 milestone Sep 5, 2025
@WilliamBergamin WilliamBergamin added semver:minor Version: 3x python Pull requests that update Python code labels Sep 5, 2025
Copy link
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢 Nice work 💯

@WilliamBergamin
Copy link
Contributor

WilliamBergamin commented Sep 8, 2025

Once slackapi/bolt-python#1359 is merged and release we can merge and release these changes 🚀

@WilliamBergamin WilliamBergamin merged commit 64e1f30 into main Sep 9, 2025
12 checks passed
@WilliamBergamin WilliamBergamin deleted the remove-python36 branch September 9, 2025 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code semver:minor Version: 3x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants