Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions linode_api4/objects/linode.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def resize(self, new_size):
class Kernel(Base):
"""
The primary component of every Linux system. The kernel interfaces
with the system’s hardware and it controls the operating system’s core functionality.
with the system’s hardware, and it controls the operating system’s core functionality.

Your Compute Instance is capable of running one of three kinds of kernels:

Expand Down Expand Up @@ -251,7 +251,7 @@ class Kernel(Base):
"updates": Property(),
"version": Property(),
"architecture": Property(),
"xen": Property(),
"xen": Property(), # deprecated and not returned by the API anymore, but left here for backward compatibility

Copilot AI Feb 16, 2026

Copy link

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.

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have added also option 2 in addition to existing note in the class comment

"built": Property(),
"pvops": Property(),
}
Expand Down