-
Notifications
You must be signed in to change notification settings - Fork 835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #1258 Tuple value for blocks argument does not work for Web API calls #1259
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)
) |
@@ -16,3 +25,33 @@ def test_build_unexpected_body_error_message(self): | |||
assert message.startswith( | |||
"""Received a response in a non-JSON format: <!DOCTYPE html><html lang="en"><head><meta charset="utf-8">""" | |||
) | |||
|
|||
|
|||
@pytest.mark.parametrize("initial_blocks", [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
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 calls
Resolves #1258
Category (place an
x
in 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
x
in each[ ]
)python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh
after making the changes.