Skip to content
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

Refactor the samples of list_blobs and download_blob_to_file and related files. #5031

Closed
HemangChothani opened this issue Dec 3, 2020 · 5 comments
Assignees
Labels
api: storage Issues related to the Cloud Storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. type: cleanup An internal cleanup or hygiene concern.

Comments

@HemangChothani
Copy link
Contributor

In which file did you encounter the issue?

  • In the storage PR 311 blob.list_blobs() and blob.download_blob_to_file() methods is going to deprecate, so change the sample files accordingly.

Solution

  • Use the methods client.list_blobs() and client.download_blob_to_file() instead of blob.list_blobs() and blob.download_blob_to_file() .
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Dec 3, 2020
@tmatsuo tmatsuo added api: storage Issues related to the Cloud Storage API. type: cleanup An internal cleanup or hygiene concern. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Dec 3, 2020
@HemangChothani
Copy link
Contributor Author

As the related PR merged, I have started working on this issue and will open a PR soon.

@frankyn
Copy link
Member

frankyn commented Dec 16, 2020

Hi @HemangChothani

For list_blobs, I updated samples to reflect the changes.

I think you mean updating this usage:

blob.download_to_filename(destination_file_name)

@HemangChothani
Copy link
Contributor Author

@frankyn we have moved download_to_file into the client class, download_to_filename is still in the blob class so i think there is no need to update any sample here.

@frankyn
Copy link
Member

frankyn commented Dec 17, 2020

Should this just be closed then?

@HemangChothani
Copy link
Contributor Author

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

4 participants