Skip to content
Open
Changes from all 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
8 changes: 6 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 All @@ -237,6 +237,10 @@ class Kernel(Base):
to compile the kernel from source than to download it from your package manager. For more
information on custom compiled kernels, review our guides for Debian, Ubuntu, and CentOS.

.. note::
The ``xen`` property is deprecated and is no longer returned by the API.
It is maintained for backward compatibility only.

API Documentation: https://techdocs.akamai.com/linode-api/reference/get-kernel
"""

Expand All @@ -251,7 +255,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
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.

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