Skip to content

Remove Linode APIv3 support#2132

Open
ChihweiLHBird wants to merge 1 commit intoapache:trunkfrom
ChihweiLHBird:zhiwei/remove-linode-v3
Open

Remove Linode APIv3 support#2132
ChihweiLHBird wants to merge 1 commit intoapache:trunkfrom
ChihweiLHBird:zhiwei/remove-linode-v3

Conversation

@ChihweiLHBird
Copy link
Copy Markdown

@ChihweiLHBird ChihweiLHBird commented Mar 29, 2026

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)

  • Code linting (required, can be done after the PR checks)
  • Documentation
  • Tests
  • ICLA (required for bigger changes)

Copilot AI review requested due to automatic review settings March 29, 2026 08:54

def __repr__(self):
return "<LinodeException '%s'>" % self.message
return "<LinodeExceptionV4 '%s'>" % self.message
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Is this change correct?

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 raises NotImplementedError.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants