linode / linode_api4-python

Official Python bindings for the Linode API
https://linode-api4.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
135 stars 75 forks source link

Add warnings to deprecated OBJ API usage #410

Closed yec-akamai closed 3 months ago

yec-akamai commented 3 months ago

📝 Description

Add warnings in docs and to related functions to deprecate two endpoints: cluster-view and cluster-list.

zliang-akamai commented 3 months ago

deferred to project GA

zliang-akamai commented 3 months ago

Should we use warnings from the standard library to avoid adding a third-party dependency?

import warnings

def deprecated_feature():
    warnings.warn("deprecated", DeprecationWarning)

Never mind, now I think deprecated package should be fine, but let's discuss it with the team.

zliang-akamai commented 3 months ago

There will also be a deprecated decorator the standard library of Python 3.13, but we probably can't use it during these years since it's not available in earlier versions of Python.

https://peps.python.org/pep-0702/