Drop use of Monitor._ws.open and Connection._ws.closed#1208
Closed
Drop use of Monitor._ws.open and Connection._ws.closed#1208
Conversation
The websockets library has dropped the properties "open" and "closed" since websockets-13.0[0], this patch makes the changes needed to check for the connection's state as suggested by the documentation. [0] python-websockets/websockets@7c8e0b9
Contributor
|
I imagine that would allow us to upgrade to websockets 14 or remove the dependency upper bound, wouldn’t it? |
Contributor
|
Pls reword commit messages to follow conventional commits |
Contributor
|
The websockets library defines 4 values for This PR references only two. I wonder what about the other two. |
dimaqq
reviewed
Nov 25, 2024
| self._debug_log_task.cancel() | ||
|
|
||
| if self._ws and not self._ws.closed: | ||
| if self._ws and self._ws.state is not State.CLOSED: |
Contributor
There was a problem hiding this comment.
Looking through websockets code, the library already handles the corner cases and we should close the connection unconditionally.
Closed
freyes
added a commit
to freyes/zaza
that referenced
this pull request
Nov 25, 2024
Set upper bound for websockets until libjuju is compatible with newer versions. See juju/python-libjuju#1208
Contributor
|
Continued in #1216 |
javacruft
pushed a commit
to openstack-charmers/zaza
that referenced
this pull request
Nov 26, 2024
* Pin websockets library Set upper bound for websockets until libjuju is compatible with newer versions. See juju/python-libjuju#1208 * Migrate to actions/upload-artifact@v4
freyes
added a commit
to freyes/zaza
that referenced
this pull request
Nov 26, 2024
* Pin websockets library Set upper bound for websockets until libjuju is compatible with newer versions. See juju/python-libjuju#1208 * Migrate to actions/upload-artifact@v4 (cherry picked from commit d758d6d)
freyes
added a commit
to freyes/zaza
that referenced
this pull request
Nov 26, 2024
* Pin websockets library Set upper bound for websockets until libjuju is compatible with newer versions. See juju/python-libjuju#1208 * Migrate to actions/upload-artifact@v4 (cherry picked from commit d758d6d)
freyes
added a commit
to freyes/zaza
that referenced
this pull request
Nov 26, 2024
* Pin websockets library Set upper bound for websockets until libjuju is compatible with newer versions. See juju/python-libjuju#1208 * Migrate to actions/upload-artifact@v4 (cherry picked from commit d758d6d) (cherry picked from commit e8d72f4)
freyes
added a commit
to freyes/zaza
that referenced
this pull request
Nov 26, 2024
* Pin websockets library Set upper bound for websockets until libjuju is compatible with newer versions. See juju/python-libjuju#1208 * Migrate to actions/upload-artifact@v4 (cherry picked from commit d758d6d) (cherry picked from commit e8d72f4) (cherry picked from commit 9b5291c)
freyes
added a commit
to freyes/zaza
that referenced
this pull request
Nov 26, 2024
* Pin websockets library Set upper bound for websockets until libjuju is compatible with newer versions. See juju/python-libjuju#1208 * Migrate to actions/upload-artifact@v4 (cherry picked from commit d758d6d) (cherry picked from commit e8d72f4) (cherry picked from commit 9b5291c)
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.
The websockets library has dropped the properties "open" and "closed" since websockets-13.0[0], this patch makes the changes needed to check for the connection's state as suggested by the documentation.
[0] python-websockets/websockets@7c8e0b9
Fixes #1207