Skip to content

Commit 1dc6471

Browse files
authored
Merge branch 'main' into v3.33.4-loop
2 parents 7b0254e + cc070d3 commit 1dc6471

File tree

76 files changed

+4356
-3212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+4356
-3212
lines changed

.github/workflows/ci-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
- '3.6'
2525
- 'pypy3.10'
2626
env:
27-
PYTHON_SLACK_SDK_MOCK_SERVER_MODE: 'threading'
2827
CI_LARGE_SOCKET_MODE_PAYLOAD_TESTING_DISABLED: '1'
2928
CI_UNSTABLE_TESTS_SKIP_ENABLED: '1'
3029
FORCE_COLOR: '1'
@@ -54,8 +53,9 @@ jobs:
5453
python setup.py unit_tests --test-target tests/slack_sdk/oauth/state_store/test_sqlalchemy.py
5554
- name: Run codecov (only 3.9)
5655
if: startsWith(matrix.python-version, '3.9')
57-
uses: codecov/codecov-action@v4
56+
uses: codecov/codecov-action@v5
5857
with:
5958
token: ${{ secrets.CODECOV_TOKEN }}
6059
# python setup.py validate generates the coverage file
6160
files: ./coverage.xml
61+

docs/package-lock.json

Lines changed: 3480 additions & 1422 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"write-heading-ids": "docusaurus write-heading-ids"
1515
},
1616
"dependencies": {
17-
"@docusaurus/core": "^3.5.2",
18-
"@docusaurus/plugin-client-redirects": "^3.5.2",
19-
"@docusaurus/preset-classic": "^3.5.2",
17+
"@docusaurus/core": "^3.6.3",
18+
"@docusaurus/plugin-client-redirects": "^3.6.3",
19+
"@docusaurus/preset-classic": "^3.6.3",
2020
"@mdx-js/react": "^3.1.0",
2121
"clsx": "^2.0.0",
2222
"docusaurus-theme-github-codeblock": "^2.0.2",

requirements/documentation.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
docutils==0.21.2
2-
pdoc3==0.11.1
2+
pdoc3==0.11.3

requirements/optional.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ boto3<=2
1212
SQLAlchemy>=1.4,<3
1313
# Socket Mode
1414
# websockets 9 is not compatible with Python 3.10
15-
websockets>=9.1,<14
15+
websockets>=9.1,<15
1616
websocket-client>=1,<2

slack_sdk/web/async_base_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def __init__(
4646
):
4747
self.token = None if token is None else token.strip()
4848
"""A string specifying an `xoxp-*` or `xoxb-*` token."""
49+
if not base_url.endswith("/"):
50+
base_url += "/"
4951
self.base_url = base_url
5052
"""A string representing the Slack API base URL.
5153
Default is `'https://slack.com/api/'`."""

slack_sdk/web/base_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ def __init__(
5959
):
6060
self.token = None if token is None else token.strip()
6161
"""A string specifying an `xoxp-*` or `xoxb-*` token."""
62+
if not base_url.endswith("/"):
63+
base_url += "/"
6264
self.base_url = base_url
6365
"""A string representing the Slack API base URL.
6466
Default is `'https://slack.com/api/'`."""

slack_sdk/web/internal_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ def _get_url(base_url: str, api_method: str) -> str:
6767
The absolute API URL.
6868
e.g. 'https://slack.com/api/chat.postMessage'
6969
"""
70+
# Ensure no leading slash in api_method to prevent double slashes
71+
api_method = api_method.lstrip("/")
7072
return urljoin(base_url, api_method)
7173

7274

slack_sdk/web/legacy_base_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ def __init__(
6262
):
6363
self.token = None if token is None else token.strip()
6464
"""A string specifying an `xoxp-*` or `xoxb-*` token."""
65+
if not base_url.endswith("/"):
66+
base_url += "/"
6567
self.base_url = base_url
6668
"""A string representing the Slack API base URL.
6769
Default is `'https://slack.com/api/'`."""

tests/helpers.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,5 @@ def restore_os_env(old_env: dict) -> None:
2626
os.environ.update(old_env)
2727

2828

29-
def get_mock_server_mode() -> str:
30-
"""Returns a str representing the mode.
31-
32-
:return: threading/multiprocessing
33-
"""
34-
mode = os.environ.get("PYTHON_SLACK_SDK_MOCK_SERVER_MODE")
35-
if mode is None:
36-
# We used to use "multiprocessing"" for macOS until Big Sur 11.1
37-
# Since 11.1, the "multiprocessing" mode started failing a lot...
38-
# Therefore, we switched the default mode back to "threading".
39-
return "threading"
40-
else:
41-
return mode
42-
43-
4429
def is_ci_unstable_test_skip_enabled() -> bool:
4530
return os.environ.get("CI_UNSTABLE_TESTS_SKIP_ENABLED") == "1"

0 commit comments

Comments
 (0)