Skip to content

Commit d1dc479

Browse files
committed
Migrate to slack_sdk 3.0.0a5 and fix builds
1 parent 2eb0925 commit d1dc479

8 files changed

Lines changed: 29 additions & 13 deletions

File tree

scripts/build_pypi_package.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22

3+
script_dir=`dirname $0`
4+
cd ${script_dir}/..
5+
rm -rf ./slack_bolt.egg-info
6+
37
pip install -U pip && \
48
python setup.py test && \
59
pip install twine wheel && \

scripts/deploy_to_prod_pypi_org.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22

3+
script_dir=`dirname $0`
4+
cd ${script_dir}/..
5+
rm -rf ./slack_bolt.egg-info
6+
37
pip install -U pip && \
48
python setup.py test && \
59
pip install twine wheel && \

scripts/deploy_to_test_pypi_org.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22

3+
script_dir=`dirname $0`
4+
cd ${script_dir}/..
5+
rm -rf ./slack_bolt.egg-info
6+
37
pip install -U pip && \
48
python setup.py test && \
59
pip install twine wheel && \

scripts/install_all_and_run_tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
script_dir=`dirname $0`
77
cd ${script_dir}/..
8+
rm -rf ./slack_bolt.egg-info
89

910
test_target="$1"
1011

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
exclude=["samples", "integration_tests", "tests", "tests.*",]
3535
),
3636
include_package_data=True, # MANIFEST.in
37-
install_requires=["slack_sdk==3.0.0a4",],
37+
install_requires=["slack_sdk>=3.0.0a5",],
3838
setup_requires=["pytest-runner==5.2"],
3939
tests_require=test_dependencies,
4040
test_suite="tests",

slack_bolt/oauth/async_oauth_settings.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,12 @@ def __init__(
106106
cookie_name=self.state_cookie_name,
107107
expiration_seconds=self.state_expiration_seconds,
108108
)
109-
# TODO: add authorization_url support on the slack-sdk side
110109
self.authorize_url_generator = AuthorizeUrlGenerator(
111110
client_id=self.client_id,
112-
client_secret=self.client_secret,
113111
redirect_uri=self.redirect_uri,
114112
scopes=self.scopes,
115113
user_scopes=self.user_scopes,
114+
authorization_url=self.authorization_url,
116115
)
117116
self.redirect_uri_page_renderer = RedirectUriPageRenderer(
118117
install_path=self.install_path,

slack_bolt/oauth/oauth_settings.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,12 @@ def __init__(
103103
cookie_name=self.state_cookie_name,
104104
expiration_seconds=self.state_expiration_seconds,
105105
)
106-
# TODO: add authorization_url support on the slack-sdk side
107106
self.authorize_url_generator = AuthorizeUrlGenerator(
108107
client_id=self.client_id,
109-
client_secret=self.client_secret,
110108
redirect_uri=self.redirect_uri,
111109
scopes=self.scopes,
112110
user_scopes=self.user_scopes,
111+
authorization_url=self.authorization_url,
113112
)
114113
self.redirect_uri_page_renderer = RedirectUriPageRenderer(
115114
install_path=self.install_path,

tests/adapter_tests/test_aws_chalice.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,19 @@ def say_it(say):
232232
headers["x-slack-bolt-lazy-function-name"] = "say_it"
233233

234234
request: Request = Request(
235-
method="NONE",
236-
query_params={},
237-
uri_params={},
238-
context={},
239-
stage_vars=None,
240-
is_base64_encoded=False,
241-
body=body,
242-
headers=headers,
235+
{
236+
"requestContext": {
237+
"httpMethod": "NONE",
238+
"resourcePath": "/slack/events",
239+
},
240+
"multiValueQueryStringParameters": {},
241+
"pathParameters": {},
242+
"context": {},
243+
"stageVariables": None,
244+
"isBase64Encoded": False,
245+
"body": body,
246+
"headers": headers,
247+
}
243248
)
244249
response: Response = slack_handler.handle(request)
245250
assert response.status_code == 200

0 commit comments

Comments
 (0)