Open
Conversation
ChihweiLHBird
commented
Mar 29, 2026
|
|
||
| def __repr__(self): | ||
| return "<LinodeException '%s'>" % self.message | ||
| return "<LinodeExceptionV4 '%s'>" % self.message |
There was a problem hiding this comment.
Pull request overview
Removes the retired Linode API v3 implementation and associated test coverage, leaving only Linode API v4 support.
Changes:
- Removed Linode API v3 DNS/Compute driver implementations and common API v3 helpers/constants.
- Deleted API v3 unit tests and JSON fixtures.
- Added regression tests asserting
api_version="3.0"now raisesNotImplementedError.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| libcloud/test/dns/test_linode_v4.py | Adds coverage to ensure API v3 selection is rejected. |
| libcloud/test/dns/test_linode.py | Removes API v3 DNS driver tests. |
| libcloud/test/dns/fixtures/linode/update_resource.json | Removes API v3 DNS fixture. |
| libcloud/test/dns/fixtures/linode/update_domain.json | Removes API v3 DNS fixture. |
| libcloud/test/dns/fixtures/linode/resource_list_does_not_exist.json | Removes API v3 DNS fixture. |
| libcloud/test/dns/fixtures/linode/resource_list.json | Removes API v3 DNS fixture. |
| libcloud/test/dns/fixtures/linode/get_zone_does_not_exist.json | Removes API v3 DNS fixture. |
| libcloud/test/dns/fixtures/linode/get_zone.json | Removes API v3 DNS fixture. |
| libcloud/test/dns/fixtures/linode/get_record_does_not_exist.json | Removes API v3 DNS fixture. |
| libcloud/test/dns/fixtures/linode/get_record.json | Removes API v3 DNS fixture. |
| libcloud/test/dns/fixtures/linode/domain_list.json | Removes API v3 DNS fixture. |
| libcloud/test/dns/fixtures/linode/delete_resource_does_not_exist.json | Removes API v3 DNS fixture. |
| libcloud/test/dns/fixtures/linode/delete_resource.json | Removes API v3 DNS fixture. |
| libcloud/test/dns/fixtures/linode/delete_domain_does_not_exist.json | Removes API v3 DNS fixture. |
| libcloud/test/dns/fixtures/linode/delete_domain.json | Removes API v3 DNS fixture. |
| libcloud/test/dns/fixtures/linode/create_resource.json | Removes API v3 DNS fixture. |
| libcloud/test/dns/fixtures/linode/create_domain_validation_error.json | Removes API v3 DNS fixture. |
| libcloud/test/dns/fixtures/linode/create_domain.json | Removes API v3 DNS fixture. |
| libcloud/test/compute/test_linode_v4.py | Adds coverage to ensure API v3 selection is rejected. |
| libcloud/test/compute/test_linode.py | Removes API v3 compute driver tests. |
| libcloud/test/compute/fixtures/linode/_linode_list.json | Removes API v3 compute fixture. |
| libcloud/test/compute/fixtures/linode/_linode_ip_list.json | Removes API v3 compute fixture. |
| libcloud/test/compute/fixtures/linode/_linode_disk_list.json | Removes API v3 compute fixture. |
| libcloud/test/compute/fixtures/linode/_batch.json | Removes API v3 compute fixture. |
| libcloud/test/compute/fixtures/linode/_avail_linodeplans.json | Removes API v3 compute fixture. |
| libcloud/test/compute/fixtures/linode/_avail_kernels.json | Removes API v3 compute fixture. |
| libcloud/test/compute/fixtures/linode/_avail_distributions.json | Removes API v3 compute fixture. |
| libcloud/test/compute/fixtures/linode/_avail_datacenters.json | Removes API v3 compute fixture. |
| libcloud/dns/drivers/linode.py | Removes API v3 DNS driver/connection/response implementation and selection logic. |
| libcloud/compute/drivers/linode.py | Removes API v3 compute driver implementation and selection logic. |
| libcloud/common/linode.py | Removes API v3 common connection/response/exception/constants; keeps only v4. |
Comments suppressed due to low confidence (2)
libcloud/compute/drivers/linode.py:82
- This change removes support for Linode API v3 (api_version="3.0" now raises NotImplementedError), which is a backward-incompatible behavior change for users who were still instantiating the v3 driver. Please add an entry to the user-facing changelog / upgrade notes (e.g., CHANGES.rst and/or docs/upgrade_notes.rst) calling out the removal and the required migration to API v4 so upgrades don’t fail unexpectedly at runtime.
def __new__(
cls,
key,
secret=None,
secure=True,
host=None,
port=None,
api_version=DEFAULT_API_VERSION,
region=None,
**kwargs,
):
if cls is LinodeNodeDriver:
if api_version == "4.0":
cls = LinodeNodeDriverV4
else:
raise NotImplementedError(
"No Linode driver found for API version: %s" % (api_version)
)
libcloud/common/linode.py:29
- This module previously exposed API v3 helpers (e.g., API_ROOT / LinodeConnection / LinodeResponse / LinodeException) which have now been removed. Since these were importable public symbols, please add a note in the changelog / upgrade notes about the removal so downstream users who imported them directly know what changed and how to migrate.
__all__ = [
"API_HOST",
"DEFAULT_API_VERSION",
"LinodeResponseV4",
"LinodeConnectionV4",
"LinodeExceptionV4",
"LinodeDisk",
"LinodeIPAddress",
]
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
47cefca to
e9aba33
Compare
4 tasks
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.
Remove Linode APIv3 support
Description
Linode API v3 has been fully retired, so relevant modules can be cleaned up.
Status
done, ready for review
Checklist (tick everything that applies)