-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Implementing umbrella Blob.download(). #605
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
Conversation
Handles 3 previously supported cases in single method.
|
I still think this simplification would be smoother if we required the caller to pass in a file-like object (readable for |
|
This feels backwards: e.g., the |
|
@tseaver OK We can close out for now. I did (and still do somewhat) feel icky having 3 methods named |
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* feat: add estimated physical file sizes to ReadAPI v1 PiperOrigin-RevId: 542350532 Source-Link: googleapis/googleapis@a4ff1c2 Source-Link: googleapis/googleapis-gen@b5b5fe5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjViNWZlNWRjZDRiY2UxNWI3YjkwMzViOTI1NDUyZWU3Y2FmNDg5YiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
* feat: add estimated physical file sizes to ReadAPI v1 PiperOrigin-RevId: 542350532 Source-Link: googleapis/googleapis@a4ff1c2 Source-Link: googleapis/googleapis-gen@b5b5fe5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjViNWZlNWRjZDRiY2UxNWI3YjkwMzViOTI1NDUyZWU3Y2FmNDg5YiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
Allow warehouse name (package name in `setup.py`) to be customized via a CLI option.
This is a pretty common reason for a `synth.py` regex replace:
- One repo has more than one API (e.g., Bigtable and Bigtable Admin) but the package name should always be `google-cloud-bigtable`
- We want an extra `-` in the repo name and package name to make it easier to read and type. (`google-cloud-binaryauthorization` -> `google-cloud-binary-authorization`)
- Package name constructed from the namespace doesn't match the `google-cloud-{API}` convention (`google-cloud-devtools-containeranalysis` -> `google-cloud-containeranalysis`)
Fixes #605
🤖 I have created a release \*beep\* \*boop\* --- ## [0.39.0](https://www.github.com/googleapis/gapic-generator-python/compare/v0.38.0...v0.39.0) (2020-12-22) ### Features * allow warehouse name to be customized ([#717](https://www.github.com/googleapis/gapic-generator-python/issues/717)) ([7c185e8](https://www.github.com/googleapis/gapic-generator-python/commit/7c185e87cb4252b1f99ed121515814595f9492c4)), closes [#605](https://www.github.com/googleapis/gapic-generator-python/issues/605) ### Bug Fixes * fix sphinx identifiers ([#714](https://www.github.com/googleapis/gapic-generator-python/issues/714)) ([39be474](https://www.github.com/googleapis/gapic-generator-python/commit/39be474b4419dfa521ef51927fd36dbf257d68e3)), closes [#625](https://www.github.com/googleapis/gapic-generator-python/issues/625) [#604](https://www.github.com/googleapis/gapic-generator-python/issues/604) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
* chore(python): remove CONTRIBUTING.rst from templates Source-Link: googleapis/synthtool@c96fb11 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:710b70faff81151657d89db6e028c23a1051787598c8276bdd8eef25c92da8ab * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Remove replacement in owlbot.py --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
Handles 3 previously supported cases in single method.
@tseaver I wanted to see what you think of this before
download_(to_file|to_filename|as_string)Blob.download()is only indirectly covered)upload_from_(file|filename|string)I also only performed
buffer_obj.close()in the filename case because buffers may need to perform more actions after the download and one of the tests assumed this behavior. (Could also close theBytesIOcreated.)