From 4d8e749279f1c94257a80b70e5fff4b512480074 Mon Sep 17 00:00:00 2001 From: Kazuhiro Sera Date: Sun, 17 Oct 2021 14:18:46 +0900 Subject: [PATCH 1/3] Add Python 3.10 to the supported versions --- .github/workflows/ci-build.yml | 2 +- setup.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 44463ccb3..795e202e1 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -13,7 +13,7 @@ jobs: timeout-minutes: 15 strategy: matrix: - python-version: ['3.6', '3.7', '3.8', '3.9'] + python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] env: # default: multiprocessing # threading is more stable on GitHub Actions diff --git a/setup.py b/setup.py index 8d5e65851..76e817313 100755 --- a/setup.py +++ b/setup.py @@ -92,6 +92,7 @@ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Programming Language :: Python :: Implementation :: CPython", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", From 744a6cb8914eba936831849f28b6c30ae0ae40d4 Mon Sep 17 00:00:00 2001 From: Kazuhiro Sera Date: Sun, 17 Oct 2021 14:40:05 +0900 Subject: [PATCH 2/3] Upgrade pytest to run tests in Python 3.10 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 76e817313..451a76b82 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ long_description = fh.read() test_dependencies = [ - "pytest>=5,<6", + "pytest>=6.2.5,<7", "pytest-cov>=2,<3", "pytest-asyncio<1", # for async "aiohttp>=3,<4", # for async From ab71d2db8e8a83f7654ba1b1e34bf136bd35748a Mon Sep 17 00:00:00 2001 From: Kazuhiro Sera Date: Sun, 17 Oct 2021 14:49:13 +0900 Subject: [PATCH 3/3] refactor --- .github/workflows/ci-build.yml | 2 +- setup.py | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 795e202e1..5b0bc0484 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -28,7 +28,7 @@ jobs: run: | python setup.py install pip install -U pip - pip install "pytest>=5,<6" "pytest-cov>=2,<3" "flask_sockets>0.2,<1" + pip install -e ".[testing_without_asyncio]" - name: Run tests without aiohttp run: | pytest tests/slack_bolt/ diff --git a/setup.py b/setup.py index 451a76b82..0ea7278ee 100755 --- a/setup.py +++ b/setup.py @@ -15,13 +15,16 @@ test_dependencies = [ "pytest>=6.2.5,<7", "pytest-cov>=2,<3", - "pytest-asyncio<1", # for async - "aiohttp>=3,<4", # for async "Flask-Sockets>=0.2,<1", "Werkzeug<2", # TODO: support Flask 2.x "black==21.9b0", ] +async_test_dependencies = test_dependencies + [ + "pytest-asyncio<1", # for async + "aiohttp>=3,<4", # for async +] + setuptools.setup( name="slack_bolt", version=__version__, @@ -45,7 +48,7 @@ "slack_sdk>=3.9.0,<4", ], setup_requires=["pytest-runner==5.2"], - tests_require=test_dependencies, + tests_require=async_test_dependencies, test_suite="tests", extras_require={ # pip install -e ".[async]" @@ -84,8 +87,10 @@ # Socket Mode 3rd party implementation "websocket_client>=1,<2", ], + # pip install -e ".[testing_without_asyncio]" + "testing_without_asyncio": test_dependencies, # pip install -e ".[testing]" - "testing": test_dependencies, + "testing": async_test_dependencies, }, classifiers=[ "Programming Language :: Python :: 3.6",