Skip to content

Add warnings to deprecated OBJ API usage #410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

yec-akamai
Copy link
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
@@ -463,8 +465,14 @@ def access(self, cluster, bucket_name, permissions):
}


@deprecated(
Copy link
Contributor Author

@yec-akamai yec-akamai May 29, 2024

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
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
Copy link
Contributor

@ykim-akamai ykim-akamai left a comment

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
Copy link
Member

zliang-akamai commented Jun 3, 2024

deferred to project GA

Copy link
Collaborator

@jriddle-linode jriddle-linode left a comment

Choose a reason for hiding this comment

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

LGTM

@zliang-akamai
Copy link
Member

zliang-akamai commented Jun 6, 2024

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
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
16 checks passed
@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 <[email protected]>
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