From 07da9c152b5e012987cb991110c5c254a08b9a05 Mon Sep 17 00:00:00 2001 From: Eva Wanek Date: Thu, 4 Sep 2025 14:03:18 -0700 Subject: [PATCH 1/6] Remove Python 3.6 refs. --- README.md | 2 +- docs/english/installation.md | 2 +- docs/english/legacy/index.md | 2 +- docs/english/tutorial/uploading-files.md | 2 +- docs/english/v3-migration.md | 2 +- integration_tests/web/test_issue_480.py | 4 ++-- pyproject.toml | 3 +-- requirements/testing.txt | 6 +++--- slack/web/async_internal_utils.py | 2 +- slack_sdk/web/internal_utils.py | 4 ++-- tests/test_aiohttp_version_checker.py | 2 +- tutorial/README.md | 6 +++--- 12 files changed, 18 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index c1dabbab9..e8a8867d0 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Are you looking for [slackclient](https://pypi.org/project/slackclient/)? The sl --- -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: > **Note:** You may need to use `python3` before your commands to ensure you use the correct Python path. e.g. `python3 --version` diff --git a/docs/english/installation.md b/docs/english/installation.md index 9c8bfec23..bf818fe22 100644 --- a/docs/english/installation.md +++ b/docs/english/installation.md @@ -1,6 +1,6 @@ # Installation -This package supports Python 3.6 and higher. We recommend using [PyPI](https://pypi.python.org/pypi) for installation. Run the following command: +This package supports Python 3.7 and higher. We recommend using [PyPI](https://pypi.python.org/pypi) for installation. Run the following command: ```bash pip install slack-sdk diff --git a/docs/english/legacy/index.md b/docs/english/legacy/index.md index eec165816..35e0dbfb2 100644 --- a/docs/english/legacy/index.md +++ b/docs/english/legacy/index.md @@ -10,7 +10,7 @@ Refer to the [migration guide](/tools/python-slack-sdk/v3-migration) to learn ho 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. ## Slack platform basics {#platform-basics} diff --git a/docs/english/tutorial/uploading-files.md b/docs/english/tutorial/uploading-files.md index 70cc6e1c1..a9a624758 100644 --- a/docs/english/tutorial/uploading-files.md +++ b/docs/english/tutorial/uploading-files.md @@ -56,7 +56,7 @@ With this, all your Slack app configuration is done. Let's start coding. ### Creating a new project {#create-new-project} -First, ensure you're using Python version 3.6 or above. While the current standard is for the `python3` and `pip3` commands to use Python 3.6 or above, it's best to ensure your runtime is always using the latest version of Python. [pyenv](https://github.com/pyenv/pyenv) is a handy tool that can do this for you. +First, ensure you're using Python version 3.7 or above. While the current standard is for the `python3` and `pip3` commands to use Python 3.7 or above, it's best to ensure your runtime is always using the latest version of Python. [pyenv](https://github.com/pyenv/pyenv) is a handy tool that can do this for you. We'll create a brand new virtual environment and install the required library dependencies using the following commands. diff --git a/docs/english/v3-migration.md b/docs/english/v3-migration.md index 67199c2be..1b95505f0 100644 --- a/docs/english/v3-migration.md +++ b/docs/english/v3-migration.md @@ -69,7 +69,7 @@ If you don't wish to upgrade yet, be sure to pin your module for the Python `sla ### 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. Client v1 support: - Python 2: Python 2.7 was supported in the 1.x version of the client up until Dec 31st, 2019. diff --git a/integration_tests/web/test_issue_480.py b/integration_tests/web/test_issue_480.py index d3b2a95b9..053c0a99f 100644 --- a/integration_tests/web/test_issue_480.py +++ b/integration_tests/web/test_issue_480.py @@ -43,7 +43,7 @@ async def test_issue_480_processes_async(self): after = len(multiprocessing.active_children()) self.assertEqual(0, after - before) - # fails with Python 3.6 + # fails with Python 3.6 (no longer supported) def test_issue_480_threads(self): client = self.sync_client before = threading.active_count() @@ -53,7 +53,7 @@ def test_issue_480_threads(self): after = threading.active_count() self.assertEqual(0, after - before) - # fails with Python 3.6 + # fails with Python 3.6 (no longer supported) @async_test async def test_issue_480_threads_async(self): client = self.async_client diff --git a/pyproject.toml b/pyproject.toml index 9eb6201b7..cb2e28d11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "slack_sdk" dynamic = ["version", "readme", "authors", "optional-dependencies"] description = "The Slack API Platform SDK for Python" license = { text = "MIT" } -requires-python = ">=3.6" +requires-python = ">=3.7" keywords = [ "slack", "slack-api", @@ -27,7 +27,6 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", diff --git a/requirements/testing.txt b/requirements/testing.txt index 984af2f4a..284606124 100644 --- a/requirements/testing.txt +++ b/requirements/testing.txt @@ -4,12 +4,12 @@ pytest>=7.0.1,<9 pytest-asyncio<2 # for async pytest-cov>=2,<7 # while flake8 5.x have issues with Python 3.12, flake8 6.x requires Python >= 3.8.1, -# so 5.x should be kept in order to stay compatible with Python 3.6/3.7 +# so 5.x should be kept in order to stay compatible with Python 3.7/3.8 flake8>=5.0.4,<8 # Don't change this version without running CI builds; # The latest version may not be available for older Python runtime -black>=22.8.0; python_version=="3.6" -black==22.10.0; python_version>"3.6" +black>=22.8.0; python_version=="3.7" +black==22.10.0; python_version>"3.7" click==8.0.4 # black is affected by https://github.com/pallets/click/issues/2225 psutil>=6.0.0,<8 # used only under slack_sdk/*_store diff --git a/slack/web/async_internal_utils.py b/slack/web/async_internal_utils.py index 10c6c2fdf..2fcbe0bf7 100644 --- a/slack/web/async_internal_utils.py +++ b/slack/web/async_internal_utils.py @@ -56,7 +56,7 @@ def _get_headers( e.g. { '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' } """ final_headers = { diff --git a/slack_sdk/web/internal_utils.py b/slack_sdk/web/internal_utils.py index 41a870c5c..f3c4c391a 100644 --- a/slack_sdk/web/internal_utils.py +++ b/slack_sdk/web/internal_utils.py @@ -44,7 +44,7 @@ def get_user_agent(prefix: Optional[str] = None, suffix: Optional[str] = None): 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' """ # __name__ returns all classes, we only want the client client = "{0}/{1}".format("slackclient", version.__version__) @@ -91,7 +91,7 @@ def _get_headers( e.g. { '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' } """ final_headers = { diff --git a/tests/test_aiohttp_version_checker.py b/tests/test_aiohttp_version_checker.py index ee1998992..a42c1ed24 100644 --- a/tests/test_aiohttp_version_checker.py +++ b/tests/test_aiohttp_version_checker.py @@ -19,7 +19,7 @@ def print(message: str): 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) self.assertEqual(state["counter"], 2) validate_aiohttp_version("3.7.0", print) self.assertEqual(state["counter"], 3) diff --git a/tutorial/README.md b/tutorial/README.md index 0d4cc2e4b..404af6964 100644 --- a/tutorial/README.md +++ b/tutorial/README.md @@ -21,14 +21,14 @@ As you complete each task you'll see the message update with a green checkmark. 1. A Slack team. Before anything else you'll need a Slack team. You can [Sign into an existing Slack workspace](https://get.slack.help/hc/en-us/articles/212681477-Sign-in-to-Slack) or you can [create a new Slack workspace](https://get.slack.help/hc/en-us/articles/206845317-Create-a-Slack-workspace) to test your app first. -2. A terminal with Python 3.6+ installed. +2. A terminal with Python 3.7+ installed. Check your installation by running the following command in your terminal: ``` $ python3 --version --> Python 3.6.7 +-> Python 3.7.0 ``` -You'll need to install Python 3.6 if you receive the following error: +You'll need to install Python 3.7 if you receive the following error: ``` -> bash: python3: command not found ``` From 73bffb02cca73a9e114f885409b49369d3f9fa70 Mon Sep 17 00:00:00 2001 From: Eva Wanek Date: Thu, 4 Sep 2025 15:28:37 -0700 Subject: [PATCH 2/6] Fix Black version for Python 3.7. --- requirements/testing.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/testing.txt b/requirements/testing.txt index 284606124..1b38f0e93 100644 --- a/requirements/testing.txt +++ b/requirements/testing.txt @@ -9,7 +9,7 @@ flake8>=5.0.4,<8 # Don't change this version without running CI builds; # The latest version may not be available for older Python runtime black>=22.8.0; python_version=="3.7" -black==22.10.0; python_version>"3.7" +black==22.10.0; python_version>="3.8" click==8.0.4 # black is affected by https://github.com/pallets/click/issues/2225 psutil>=6.0.0,<8 # used only under slack_sdk/*_store @@ -18,5 +18,5 @@ boto3<=2 moto>=4.0.13,<6 mypy<=1.15.0 # For AsyncSQLAlchemy tests -greenlet<=4 +greenlet<= aiosqlite<=1 \ No newline at end of file From 863c41ad9dc75d93b939a3e9f69cc3e5eb690a9e Mon Sep 17 00:00:00 2001 From: Eva Wanek Date: Thu, 4 Sep 2025 15:32:23 -0700 Subject: [PATCH 3/6] Fix greenlet removal. --- requirements/testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/testing.txt b/requirements/testing.txt index 1b38f0e93..7fea0a7e0 100644 --- a/requirements/testing.txt +++ b/requirements/testing.txt @@ -18,5 +18,5 @@ boto3<=2 moto>=4.0.13,<6 mypy<=1.15.0 # For AsyncSQLAlchemy tests -greenlet<= +greenlet<=4git aiosqlite<=1 \ No newline at end of file From 91fa4780cf8ee60c625754c0a660abaef69ca4c3 Mon Sep 17 00:00:00 2001 From: Eva Wanek Date: Thu, 4 Sep 2025 15:34:01 -0700 Subject: [PATCH 4/6] Fix greenlet removal. --- requirements/testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/testing.txt b/requirements/testing.txt index 7fea0a7e0..f87572f49 100644 --- a/requirements/testing.txt +++ b/requirements/testing.txt @@ -18,5 +18,5 @@ boto3<=2 moto>=4.0.13,<6 mypy<=1.15.0 # For AsyncSQLAlchemy tests -greenlet<=4git +greenlet<=4 aiosqlite<=1 \ No newline at end of file From 26ba1315aad69670e4a0df8d4e26bcb9e39e5917 Mon Sep 17 00:00:00 2001 From: Eva Wanek Date: Fri, 5 Sep 2025 08:56:50 -0700 Subject: [PATCH 5/6] Address comments and simplify black versioning. --- README.md | 2 +- docs/english/legacy/index.md | 2 +- docs/english/v3-migration.md | 2 +- integration_tests/web/test_issue_480.py | 4 ++-- requirements/testing.txt | 3 +-- slack_sdk/web/internal_utils.py | 2 +- tests/test_aiohttp_version_checker.py | 2 +- tutorial/README.md | 2 +- 8 files changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e8a8867d0..7defbbccb 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Are you looking for [slackclient](https://pypi.org/project/slackclient/)? The sl --- -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: > **Note:** You may need to use `python3` before your commands to ensure you use the correct Python path. e.g. `python3 --version` diff --git a/docs/english/legacy/index.md b/docs/english/legacy/index.md index 35e0dbfb2..e2ca20613 100644 --- a/docs/english/legacy/index.md +++ b/docs/english/legacy/index.md @@ -10,7 +10,7 @@ Refer to the [migration guide](/tools/python-slack-sdk/v3-migration) to learn ho 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.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. ## Slack platform basics {#platform-basics} diff --git a/docs/english/v3-migration.md b/docs/english/v3-migration.md index 1b95505f0..d599ac28a 100644 --- a/docs/english/v3-migration.md +++ b/docs/english/v3-migration.md @@ -69,7 +69,7 @@ If you don't wish to upgrade yet, be sure to pin your module for the Python `sla ### Minimum Python versions {#minimum-versions} -`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). Client v1 support: - Python 2: Python 2.7 was supported in the 1.x version of the client up until Dec 31st, 2019. diff --git a/integration_tests/web/test_issue_480.py b/integration_tests/web/test_issue_480.py index 053c0a99f..d3b2a95b9 100644 --- a/integration_tests/web/test_issue_480.py +++ b/integration_tests/web/test_issue_480.py @@ -43,7 +43,7 @@ async def test_issue_480_processes_async(self): after = len(multiprocessing.active_children()) self.assertEqual(0, after - before) - # fails with Python 3.6 (no longer supported) + # fails with Python 3.6 def test_issue_480_threads(self): client = self.sync_client before = threading.active_count() @@ -53,7 +53,7 @@ def test_issue_480_threads(self): after = threading.active_count() self.assertEqual(0, after - before) - # fails with Python 3.6 (no longer supported) + # fails with Python 3.6 @async_test async def test_issue_480_threads_async(self): client = self.async_client diff --git a/requirements/testing.txt b/requirements/testing.txt index f87572f49..4ee8403c1 100644 --- a/requirements/testing.txt +++ b/requirements/testing.txt @@ -8,8 +8,7 @@ pytest-cov>=2,<7 flake8>=5.0.4,<8 # Don't change this version without running CI builds; # The latest version may not be available for older Python runtime -black>=22.8.0; python_version=="3.7" -black==22.10.0; python_version>="3.8" +black==22.10.0; click==8.0.4 # black is affected by https://github.com/pallets/click/issues/2225 psutil>=6.0.0,<8 # used only under slack_sdk/*_store diff --git a/slack_sdk/web/internal_utils.py b/slack_sdk/web/internal_utils.py index f3c4c391a..8d8dc3370 100644 --- a/slack_sdk/web/internal_utils.py +++ b/slack_sdk/web/internal_utils.py @@ -44,7 +44,7 @@ def get_user_agent(prefix: Optional[str] = None, suffix: Optional[str] = None): Returns: The user agent string. - e.g. 'Python/3.7.0 slackclient/2.0.0 Darwin/17.7.0' + e.g. 'Python/3.7.17 slackclient/2.0.0 Darwin/17.7.0' """ # __name__ returns all classes, we only want the client client = "{0}/{1}".format("slackclient", version.__version__) diff --git a/tests/test_aiohttp_version_checker.py b/tests/test_aiohttp_version_checker.py index a42c1ed24..ee1998992 100644 --- a/tests/test_aiohttp_version_checker.py +++ b/tests/test_aiohttp_version_checker.py @@ -19,7 +19,7 @@ def print(message: str): validate_aiohttp_version("2.1.3", print) self.assertEqual(state["counter"], 1) - validate_aiohttp_version("3.7.0", print) + validate_aiohttp_version("3.6.3", print) self.assertEqual(state["counter"], 2) validate_aiohttp_version("3.7.0", print) self.assertEqual(state["counter"], 3) diff --git a/tutorial/README.md b/tutorial/README.md index 404af6964..12d99c89c 100644 --- a/tutorial/README.md +++ b/tutorial/README.md @@ -25,7 +25,7 @@ Before anything else you'll need a Slack team. You can [Sign into an existing Sl Check your installation by running the following command in your terminal: ``` $ python3 --version --> Python 3.7.0 +-> Python 3.7.17 ``` You'll need to install Python 3.7 if you receive the following error: From 25ba1743b1a84f49c8217754fde97cc76eed71c0 Mon Sep 17 00:00:00 2001 From: Eva Wanek Date: Fri, 5 Sep 2025 11:11:33 -0700 Subject: [PATCH 6/6] Specifying version 3.7.17. --- slack/web/async_internal_utils.py | 2 +- slack_sdk/web/internal_utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/slack/web/async_internal_utils.py b/slack/web/async_internal_utils.py index 2fcbe0bf7..1148dc9e7 100644 --- a/slack/web/async_internal_utils.py +++ b/slack/web/async_internal_utils.py @@ -56,7 +56,7 @@ def _get_headers( e.g. { 'Content-Type': 'application/json;charset=utf-8', 'Authorization': 'Bearer xoxb-1234-1243', - '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' } """ final_headers = { diff --git a/slack_sdk/web/internal_utils.py b/slack_sdk/web/internal_utils.py index 8d8dc3370..a76980f4a 100644 --- a/slack_sdk/web/internal_utils.py +++ b/slack_sdk/web/internal_utils.py @@ -91,7 +91,7 @@ def _get_headers( e.g. { 'Content-Type': 'application/json;charset=utf-8', 'Authorization': 'Bearer xoxb-1234-1243', - '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' } """ final_headers = {