Fix #1258 Tuple value for blocks argument does not work for Web API calls#1259
Fix #1258 Tuple value for blocks argument does not work for Web API calls#1259seratch merged 2 commits intoslackapi:mainfrom tommasobertoni:fix/issue_1258
Conversation
|
💡 Additionally, the SDK could accept an messages_to_send: list[str] = ...
client.chat_postMessage(
channel="#channel",
blocks=(SectionBlock(text=some_text) for some_text in messages_to_send)
) |
| ) | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("initial_blocks", [ |
Yeah, this can be a great addition for some specific use cases but not this time! |
|
@tommasobertoni Thanks a lot for sending this PR! The changes already look great to me. Once the CI builds pass, we will merge the change into the main branch. |
Codecov Report
@@ Coverage Diff @@
## main #1259 +/- ##
==========================================
+ Coverage 86.56% 86.64% +0.07%
==========================================
Files 111 111
Lines 11026 11026
==========================================
+ Hits 9545 9553 +8
+ Misses 1481 1473 -8
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
Hi @tommasobertoni and @seratch , since the release of Is this an intended breaking change? The payload working with
|
|
Hi @ydshieh, thanks for reporting the issue. Definitely any existing code should work without any changes. I will look into this but, with given information, I am still unsure about how to reproduce your situation. If you can share the code snippet to reproduce the issue, that'd be greatly helpful for us. |
|
@seratch Thanks, I will try to give a code snippet. |
|
Hi @seratch The script to reproduce the issue under If helpful, this workflow file triggers the above script Here are the job run results: Let me know if you need more information, thanks |
|
@ydshieh Your issue should be resolved in the latest version 3.18.3. Thanks again for sharing this! |
|
Thanks a lot, @seratch! Confirmed it works again. |
Summary
Fix for
Tuple value for blocks argument does not work for Web API callsResolves #1258
Category (place an
xin each of the[ ])/docs-src(Documents, have you run./scripts/docs.sh?)/docs-src-v2(Documents, have you run./scripts/docs-v2.sh?)/tutorial(PythOnBoardingBot tutorial)tests/integration_tests(Automated tests for this library)Requirements (place an
xin each[ ])python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.shafter making the changes.