GeezerVison is showing github.com — Determine desired/expected return value(s) of storage.bucket.Bucket.delete_keys · Issue #161 · googleapis/google-cloud-python
Determine desired/expected return value(s) of storage.bucket.Bucket.delete_keys #161Labels 🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged. DescriptionFrom TODO:
# TODO: What should be the return value here?
See storage.bucket.Bucket.delete_keys for relevant code and #146 for some context.
git blame output
b7f1b774 (JJ Geewax 2014-01-29 18:02:29 -0500 192) # TODO: What should be the return value here?
Activitydhermes commented on Sep 22, 2014 ContributorAuthor More actions From the code, note that in a similar situation the boto library returns a MultiDeleteResult instance. tseaver commented on Sep 22, 2014 ISTM that the "Pythonic" return would be a sequence of the deleted keys, i.e:
def delete_keys(self, keys):
deleted = []
for key in keys:
deleted.append(self.delete_key(key))
return deleted
We can't use a generator, because that would require the caller to iterate-consume it to perform any but the first deletion. dhermes commented on Sep 22, 2014 ContributorAuthor More actions tseaver commented on Sep 22, 2014 Note that the boto bit is wrapping an XML response document for a multi-delete request. Because the gcloud storage API does not support multi-delete, we would be synthesizing an entity which doesn't have a server-side analog. dhermes commented on Sep 22, 2014 ContributorAuthor More actions I see, maybe worth opening a feature request with the API team? But in the mean time, an object which tracks both deleted and errors may be useful. added this to the This milestone has been deleted milestone on Sep 24, 2014added a commit that references this issue on Nov 3, 2014This issue will close once commit f33e557 is merged into the 'main' branch.f33e557
MetadataMetadata🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged. DevelopmentNo branches or pull requestsIssue actions
|