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

Make Bucket/Blob/_PropertyMixin have "future" functionality #775

Closed
dhermes opened this issue Mar 30, 2015 · 2 comments
Closed

Make Bucket/Blob/_PropertyMixin have "future" functionality #775

dhermes opened this issue Mar 30, 2015 · 2 comments
Assignees
Labels
api: storage Issues related to the Cloud Storage API.

Comments

@dhermes
Copy link
Contributor

dhermes commented Mar 30, 2015

This is relating to a discussion @tseaver and I just had about enabling GET in batches.

Something like

with storage.Batch():
    bucket = storage.get_bucket('foo')
    print bucket.cors
    blob = storage.Blob('bar', bucket=bucket, eager=True)  # See #761 about eager

is not possible because the actual GET which retrieves the bucket happens on the __exit__ of the batch.


We could allow _PropertyMixin objects to act as a future by setting a property (e.g. bucket._is_future = True) and then making getters and setters fail when _is_future == True.

@dhermes dhermes added the api: storage Issues related to the Cloud Storage API. label Mar 30, 2015
@dhermes dhermes added this to the Storage Future milestone Mar 30, 2015
@dhermes
Copy link
Contributor Author

dhermes commented Mar 31, 2015

Note that if we find a fix, it should address #736 too.

dhermes added a commit to dhermes/google-cloud-python that referenced this issue Apr 9, 2015
Wraps setting/getting of object _properties in custom methods.
This will allow centralized detection of a future in a response
and will also allow replacing with the value on access if it
is ready.

Towards googleapis#775
dhermes added a commit to dhermes/google-cloud-python that referenced this issue Apr 9, 2015
Wraps setting/getting of object _properties in custom methods.
This will allow centralized detection of a future in a response
and will also allow replacing with the value on access if it
is ready.

Towards googleapis#775
dhermes added a commit to dhermes/google-cloud-python that referenced this issue Apr 9, 2015
Wraps setting/getting of object _properties in custom methods.
This will allow centralized detection of a future in a response
and will also allow replacing with the value on access if it
is ready.

Towards googleapis#775
dhermes added a commit to dhermes/google-cloud-python that referenced this issue Apr 10, 2015
Wraps setting/getting of object _properties in custom methods.
This will allow centralized detection of a future in a response
and will also allow replacing with the value on access if it
is ready.

Towards googleapis#775
dhermes added a commit to dhermes/google-cloud-python that referenced this issue Apr 10, 2015
Wraps setting/getting of object _properties in custom methods.
This will allow centralized detection of a future in a response
and will also allow replacing with the value on access if it
is ready.

Towards googleapis#775
@dhermes
Copy link
Contributor Author

dhermes commented May 8, 2015

@tseaver Do you think we are safe to close this out?

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.
Projects
None yet
Development

No branches or pull requests

1 participant