Uh oh!
There was an error while loading. Please reload this page.
Making all Blob/Bucket getters fail gracefully if keys don't exist. - #793
Conversation
coveralls
commented
Apr 1, 2015
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
tseaver
commented
Apr 1, 2015
ISTM that returning None from the getters breaks their contract a bit: we could either change the |
dhermes
commented
Apr 1, 2015
@tseaver I imagine a future where people use their own blob.reload(fields=['generation', 'metageneration'])and then all other values are unset. I think changing the |
Also - replacing uses of dict.copy() (shallow) with copy.deepcopy(). - Making getters honor contracts (e.g. return an integer if supposed to). This is necessary because int64 -> JSON becomes a string, even though we want an integer. This is due to only one numeric type "number" in JavaScript.
873ec53 to
2971484Comparedhermes
commented
Apr 2, 2015
@tseaver I updated the docstrings and pushed again. I also coerced some values to ints, since I also wanted to convert the timestamps to datetime.datetime.strptime(value, '%Y-%m-%dT%H:%M:%S.%fZ')would be insufficient for values returned by the backend (AFAIK the only contract is that they will be valid RFC3339). |
coveralls
commented
Apr 2, 2015
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
tseaver
commented
Apr 3, 2015
Aside from the worry about PATCH w/ None, LGTM. |
dhermes
commented
Apr 3, 2015
PATCH with None effectively "unsets" the property. But we would only send None if it was explicitly set by the user. I'm AFK now but would like to test out what happens if None is sent for a required property. |
dhermes
commented
Apr 6, 2015
@tseaver What is the implication of my answer? How to move forward? |
tseaver
commented
Apr 6, 2015
We should figure out what happens when |
dhermes
commented
Apr 6, 2015
@tseaver I was already pretty sure what happened, but I verified via https://developers.google.com/apis-explorer/#p/storage/v1/storage.objects.patch by sending "metadata: null" after previously setting |
tseaver
commented
Apr 6, 2015
OK. ISTM we can just mirror that, then (the |
dhermes
commented
Apr 6, 2015
Yep, we get it for free. Remaining hangups? |
tseaver
commented
Apr 6, 2015
Nope. |
…orage Making all Blob/Bucket getters fail gracefully if keys don't exist.
* chore(python): use python 3.10 for docs build Source-Link: googleapis/synthtool@9ae0785 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:52210e0e0559f5ea8c52be148b33504022e1faef4e95fbe4b32d68022af2fa7e * use python 3.10 for docs build --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Lingqing Gan <lingqing.gan@gmail.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
…p/templates/python_library/.kokoro (#793) Source-Link: googleapis/synthtool@d0f51a0 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:240b5bcc2bafd450912d2da2be15e62bc6de2cf839823ae4bf94d4f392b451dc Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
🤖 I have created a release \*beep\* \*boop\* --- ### [0.40.12](https://www.github.com/googleapis/gapic-generator-python/compare/v0.40.11...v0.40.12) (2021-02-26) ### Bug Fixes * exclude 'input' from reserved names list ([#788](https://www.github.com/googleapis/gapic-generator-python/issues/788)) ([da2ff71](https://www.github.com/googleapis/gapic-generator-python/commit/da2ff717b82357359baeeafad9a3e48a70e194cb)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* feat: retry generates backoff value after completing on_error callbacks * added comment * use single sleep iterator for retries * fix tests * update variable name * adjusted docstring * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fixed mypy issues * added comment * added unit tests for dynamic backoff --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Defines the following classes: - `google.auth.downscoped.CredentialAccessBoundary` - `google.auth.downscoped.AccessBoundaryRule` - `google.auth.downscoped.AvailabilityCondition` This is based on [Downscoping with Credential Access Boundaries](https://cloud.google.com/iam/docs/downscoping-short-lived-credentials). These classes help define the list of access boundary rules, each of which contains information on the resource that the rule applies to, the upper bound of the permissions that are available on that resource and an optional condition to further restrict permissions.
Source-Link: googleapis/synthtool@703554a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:94961fdc5c9ca6d13530a6a414a49d2f607203168215d074cdb0a1df9ec31c0b
Source-Link: googleapis/synthtool@c4dd595 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:ce3c1686bc81145c81dd269bd12c4025c6b275b22d14641358827334fddb1d72 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Also replacing uses of dict.copy() (shallow) with copy.deepcopy().