Skip to content

Add warnings to deprecated OBJ API usage - #410

Merged
zliang-akamai merged 3 commits into
proj/multicluster-objfrom
TPT-2594/add-obj-deprecated-warning
Jun 10, 2024
Merged

Add warnings to deprecated OBJ API usage#410
zliang-akamai merged 3 commits into
proj/multicluster-objfrom
TPT-2594/add-obj-deprecated-warning

Conversation

@yec-akamai

Copy link
Copy Markdown
Contributor

📝 Description

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

@yec-akamai
yec-akamai requested a review from a team as a code owner May 29, 2024 20:29
@yec-akamai
yec-akamai requested review from jriddle-linode and ykim-akamai and removed request for a team May 29, 2024 20:29
}


@deprecated(

@yec-akamai yec-akamai May 29, 2024

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.

Since we need to deprecate the cluster-view, I assume that we want to deprecate the ObjectStorageCluster class. I'm also wondering if we should move the function buckets_in_cluster from here to the obj_storage group.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it's a good idea 👍

@yec-akamai yec-akamai added the improvement for improvements in existing functionality in the changelog. label May 29, 2024

@ykim-akamai ykim-akamai left a comment

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.

Nice thanks for updating this

@zliang-akamai

zliang-akamai commented Jun 3, 2024

Copy link
Copy Markdown
Member

deferred to project GA

@jriddle-linode jriddle-linode left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@zliang-akamai

zliang-akamai commented Jun 6, 2024

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member

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/

@zliang-akamai
zliang-akamai changed the base branch from dev to proj/multicluster-obj June 10, 2024 20:39
@zliang-akamai
zliang-akamai merged commit d4fb19a into proj/multicluster-obj Jun 10, 2024
@zliang-akamai
zliang-akamai deleted the TPT-2594/add-obj-deprecated-warning branch June 10, 2024 20:51
zliang-akamai added a commit that referenced this pull request Jul 5, 2024
* Add warnings to deprecated OBJ API usage (#410)

* add deprecated

* add dependency

* fix deprecated

* Update OBJ Group and Objects for MultiCluster Object Storage API Changes (#426)

---------

Co-authored-by: Ye Chen <127243817+yec-akamai@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement for improvements in existing functionality in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants