-
Notifications
You must be signed in to change notification settings - Fork 836
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: 'ClientConnection' object has no attribute 'closed' #1613
fix: 'ClientConnection' object has no attribute 'closed' #1613
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1613 +/- ##
==========================================
- Coverage 84.93% 84.88% -0.06%
==========================================
Files 113 113
Lines 12630 12639 +9
==========================================
+ Hits 10727 10728 +1
- Misses 1903 1911 +8 ☔ View full report in Codecov by Sentry. |
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.
Only one minor suggestion. As we discussed internally, let's try re-enabling the interaction tests. If it's still flaky, we can disable it again
Co-authored-by: Kazuhiro Sera <[email protected]>
…/github.com/WilliamBergamin/python-slack-sdk into websockets-adapter-fails-missing-close-func
Summary
This PR aims to resolve #1612
Followed Upgrade to the new asyncio implementation to come up with these changes. Socket mode uses
websockets.WebSocketClientProtocol
in its implementation, this class was replaced with websockets.asyncio.client.ClientConnection.These interfaces are very similar but
ClientConnection
lacks theclosed
method found inWebSocketClientProtocol
. As a workaround proposed to use.close_code is not None
to determine if a session is closed or in the process of being closed. Close code is defined in RFC 6455 sec 7.1.5Testing
scripts/build_pypi_package.sh
path/to/python-slack-sdk/dist/slack_sdk-3.33.5-py2.py3-none-any.whl
to pip install the changes in the following projectManually tested with python 3.6 and 3.12
Category
/docs
(Documents)/tutorial
(PythOnBoardingBot tutorial)tests
/integration_tests
(Automated tests for this library)Requirements
python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh
after making the changes.