Skip to content

WebSocket streaming alignment & deprecation fixes#268

Merged
sadrasabouri merged 15 commits intodevfrom
enhance/websocket
Mar 19, 2026
Merged

WebSocket streaming alignment & deprecation fixes#268
sadrasabouri merged 15 commits intodevfrom
enhance/websocket

Conversation

@AHReccese
Copy link
Copy Markdown
Member

Reference Issues/PRs

What does this implement/fix? Explain your changes.

  • Aligned WebSocket protocol with REST API (client registration, model management, access control)
  • Added scenario4 test for access control features on both protocols
  • Fixed REST get_allowance returning 404 on empty allowances
  • Fixed numpy and datetime deprecation warnings
  • Added proper connection cleanup to PymiloClient and WebSocketClientCommunicator

Any other comments?

@AHReccese AHReccese added this to the pymilo v1.6 milestone Mar 3, 2026
@AHReccese AHReccese self-assigned this Mar 3, 2026
@AHReccese AHReccese added enhancement New feature or request test new feature labels Mar 3, 2026
…and PymiloClient

Updated the close method documentation for clarity and streamlined the destructor logic to remove unnecessary try-except blocks. This enhances readability and ensures proper resource management during object destruction.
…mments

Improved the cleanup process in the WebSocketClientCommunicator by ensuring the event loop is checked before attempting to disconnect. Additionally, clarified comments in the test file regarding the loading of JSON data for better understanding.
@AHReccese AHReccese requested a review from sadrasabouri March 3, 2026 22:36
@AHReccese AHReccese added the major major changes, to be reviewed in 10 days label Mar 3, 2026
Copy link
Copy Markdown
Member

@sadrasabouri sadrasabouri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left two comments which is applicable throughout the PR. Can you please fix them and request review me again?

Comment thread pymilo/streaming/communicator.py Outdated
Comment thread pymilo/streaming/communicator.py Outdated
Comment thread pymilo/streaming/communicator.py Outdated
@AHReccese AHReccese requested a review from sadrasabouri March 4, 2026 18:27
Copy link
Copy Markdown
Member

@sadrasabouri sadrasabouri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed it again and it required some more changes throught the PR.

Comment thread pymilo/streaming/communicator.py Outdated
Comment thread pymilo/streaming/communicator.py Outdated
Comment thread pymilo/streaming/communicator.py Outdated
Comment thread pymilo/streaming/communicator.py Outdated
Comment thread pymilo/streaming/communicator.py Outdated
Comment thread pymilo/streaming/communicator.py Outdated
Comment thread pymilo/streaming/communicator.py Outdated
…sage handling

Updated method signatures to include type hints for better clarity and maintainability. Introduced message constants for download and upload requests to improve code readability and maintainability.
@AHReccese AHReccese requested a review from sadrasabouri March 18, 2026 15:25
@AHReccese
Copy link
Copy Markdown
Member Author

Dear Sadra @sadrasabouri, I tried to address your comments as much as possible, let me know if it's good to merge.

Copy link
Copy Markdown
Member

@sadrasabouri sadrasabouri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed it but there are still some inconsistencies, such as using Dict and dict. It can be solved later.

@sadrasabouri sadrasabouri merged commit 51a9867 into dev Mar 19, 2026
48 of 49 checks passed
@sadrasabouri sadrasabouri deleted the enhance/websocket branch March 19, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request major major changes, to be reviewed in 10 days new feature test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants