Skip to content

Deprecate xen from SDKs and Tools#648

Open
mgwoj wants to merge 3 commits intolinode:devfrom
mgwoj:feature/TPT-2851-deprecate-xen-from-sdks-and-tools
Open

Deprecate xen from SDKs and Tools#648
mgwoj wants to merge 3 commits intolinode:devfrom
mgwoj:feature/TPT-2851-deprecate-xen-from-sdks-and-tools

Conversation

@mgwoj
Copy link

@mgwoj mgwoj commented Feb 16, 2026

📝 Description

The xen field has been removed from the kernel API response. We can deprecate this field from SDKs and tools. https://www.linode.com/docs/api/linode-instances/#kernel-view

✔️ How to Test

No changes to the tests.

@mgwoj mgwoj requested a review from a team as a code owner February 16, 2026 11:52
@mgwoj mgwoj requested review from ezilber-akamai and yec-akamai and removed request for a team February 16, 2026 11:52
Copy link
Contributor

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

This PR deprecates the xen field from the Kernel class in the Python SDK. The field has been removed from the Linode API response and is no longer returned by the API, so this change aligns the SDK with the current API behavior while maintaining backward compatibility.

Changes:

  • Added inline documentation to the xen property indicating it's deprecated and no longer returned by the API
  • Fixed a grammatical issue in the Kernel class docstring (added comma after "hardware")

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"version": Property(),
"architecture": Property(),
"xen": Property(),
"xen": Property(), # deprecated and not returned by the API anymore, but left here for backward compatibility
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

The inline comment documents that the xen property is deprecated, but users accessing this property won't receive any deprecation warning. Unlike other deprecations in this codebase (e.g., in linode_api4/groups/object_storage.py:35-37 and linode_api4/objects/database.py:396-398), which use the @deprecated decorator for methods, there's no runtime warning mechanism for deprecated properties.

Consider one of these approaches:

  1. Add a note in the class docstring documenting that the xen property is deprecated and no longer returned by the API
  2. Implement a property accessor with a deprecation warning using Python's warnings module
  3. Document this deprecation in release notes or migration guides

This would help users understand that they should remove any code that depends on this property.

Copilot uses AI. Check for mistakes.

Choose a reason for hiding this comment

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

Don't know what's the practice here, but having this info in docstring might be a good option as it will be visible somewhere at least. Having only a comment in a source code won't inform the actual users.

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

Comments