Fix #611 - stop propagating user exceptions to the connection management layer#665
Closed
seratch wants to merge 12 commits intoslackapi:masterfrom
Closed
Fix #611 - stop propagating user exceptions to the connection management layer#665seratch wants to merge 12 commits intoslackapi:masterfrom
seratch wants to merge 12 commits intoslackapi:masterfrom
Conversation
* slackapi#530 Fixed by changing _execute_in_thread to be a coroutine * slackapi#569 Resolved by removing a blocking loop (while future.running()) * slackapi#645 WebClient(run_async=False) no longer depends on asyncio by default * slackapi#633 WebClient(run_async=False) doesn't internally depend on aiohttp * slackapi#631 When run_async=True, RTM listner can be a normal function and WebClient is free from the event loop * slackapi#630 WebClient no longer depends on aiohttp when run_async=False * slackapi#497 Fixed when run_async=False / can be closed as we don't support run_async=True for this use case (in Flask)
Codecov Report
@@ Coverage Diff @@
## master #665 +/- ##
==========================================
- Coverage 87.17% 85.13% -2.04%
==========================================
Files 15 17 +2
Lines 1824 2025 +201
Branches 100 145 +45
==========================================
+ Hits 1590 1724 +134
- Misses 202 244 +42
- Partials 32 57 +25
Continue to review full report at Codecov.
|
469a52b to
48c6799
Compare
2 tasks
2 tasks
Contributor
Author
|
This PR is outdated and hard to review. Check #679 instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
As this pull request depends on #662, it has large diff but the change here is only 469a52b
This pull request fixes #611 by stopping the propagation of user exceptions to
_connect_and_read()method. Raised exceptions to_connect_and_read()results in WebSocket connection closure. That is not intended in the scenarios where developers don't handle (or forget handling) exceptions in their methods decorated by@RTMClient.run_on.If you'd like to add comments smoothly (I know loading the diff on GitHub for this takes a bit long and it's very slow to browse), please leave comments to seratch#1
Requirements (place an
xin each[ ])