feat(api)!: Remove original Cloud and Local APIs#713
feat(api)!: Remove original Cloud and Local APIs#713allenporter merged 1 commit intoPython-roborock:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the legacy Cloud and Local APIs (version_1_apis and version_a01_apis modules) as part of a breaking change, transitioning to the new device manager API that uses a single shared MQTT session across all devices.
Key Changes:
- Removes version_1_apis module including RoborockClientV1, RoborockMqttClientV1, and RoborockLocalClientV1
- Removes version_a01_apis module including RoborockClientA01 and RoborockMqttClientA01
- Removes supporting infrastructure: cloud_api.py, api.py, roborock_future.py, and command_cache.py
- Removes utility functions from util.py (RepeatableTask, parse_time_to_datetime, parse_datetime_to_roborock_datetime)
- Deletes associated test files and snapshot files
- Updates fixtures and module imports
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_util.py | Removed tests for parse_time_to_datetime utility function |
| tests/test_queue.py | Removed tests for RoborockFuture class |
| tests/test_local_api_v1.py | Removed tests for local API v1 client |
| tests/test_api.py | Removed tests for MQTT API v1 client |
| tests/test_a01_api.py | Removed tests for A01 API client |
| tests/snapshots/test_local_api_v1.ambr | Removed snapshot for local API v1 tests |
| tests/snapshots/test_api.ambr | Removed snapshot for API tests |
| tests/snapshots/test_a01_api.ambr | Removed snapshot for A01 API tests |
| roborock/version_a01_apis/roborock_mqtt_client_a01.py | Removed A01 MQTT client implementation |
| roborock/version_a01_apis/roborock_client_a01.py | Removed A01 client base class |
| roborock/version_a01_apis/init.py | Removed A01 APIs module exports |
| roborock/version_1_apis/roborock_mqtt_client_v1.py | Removed v1 MQTT client implementation |
| roborock/version_1_apis/roborock_local_client_v1.py | Removed v1 local client implementation |
| roborock/version_1_apis/roborock_client_v1.py | Removed v1 client base class and caching infrastructure |
| roborock/version_1_apis/init.py | Removed v1 APIs module exports |
| roborock/util.py | Removed utility functions used by legacy APIs |
| roborock/roborock_future.py | Removed RoborockFuture class for async request handling |
| roborock/command_cache.py | Removed command caching infrastructure |
| roborock/cloud_api.py | Removed MQTT cloud API base class |
| roborock/api.py | Removed RoborockClient base class |
| roborock/init.py | Updated to remove imports for deleted modules |
| tests/fixtures/logging_fixtures.py | Removed patches for deleted modules |
Comments suppressed due to low confidence (1)
roborock/version_1_apis/init.py:1
- The removal of version_1_apis module will break roborock/cli.py which imports and uses RoborockMqttClientV1. Line 56 of cli.py imports "from roborock.version_1_apis.roborock_mqtt_client_v1 import RoborockMqttClientV1" and line 835 uses it to create a client. This file needs to be updated to use the new device manager API or removed/updated as part of this breaking change.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Remove the old Cloud / Local APIs, and associated tests and shapshots. These APIs have been replaced by the device manager API that creates a single single MQTT session shared across all devices. See example/ for how to use the new API. BREAKING CHANGE: Removes older cloud and local APIs.
8c1c778 to
a27f7c8
Compare
Lash-L
left a comment
There was a problem hiding this comment.
Awesome! This should be merged in last likely in case it causes any conflicts.
There was a problem hiding this comment.
Note that currently the CLI still depends on this subpackage
There was a problem hiding this comment.
Thanks, good catch. I'll remove from there also.
Remove the old Cloud / Local APIs, and associated tests and shapshots.
These APIs have been replaced by the device manager API that createsa single single MQTT session shared across all devices.
See example/ for how to use the new API.
BREAKING CHANGE: Removes older cloud and local APIs.