Conversation
There was a problem hiding this comment.
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
xenproperty 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 |
There was a problem hiding this comment.
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:
- Add a note in the class docstring documenting that the
xenproperty is deprecated and no longer returned by the API - Implement a property accessor with a deprecation warning using Python's warnings module
- 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.
There was a problem hiding this comment.
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.
📝 Description
The
xenfield 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.