You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
STORAGE: Does a connection need to be bound to anything other than a Batch or Iterator? #728
I think we could easily change the metadata-updating methods to drop the call (and require calling patch()). Maybe ACL updates should also require an explict patch or save call?
@tseaver I agree. Being more declarative was the original goal of #545. I tried to sketch a way (in #761) to make these properties, but some of them are a bit involved (i.e. have multiple values associated).
We could look into using apitools generated clients at some point?
@tseaver Removing __iter__ and __contains__ is impossible if no Connection is bound to a Bucket. As I mention in #761, using __iter__ is pretty scary for large applications / buckets.
Activity
dhermes commentedon Mar 14, 2015
I'm going to start this work in a series of small changes (I'm guessing there will be a lot of test re-factoring).
Please protest if there are any issues.
UPDATE: After starting this, it seems quite daunting.
After checking
blob.pyandbucket.pyit seems the following methods all use a connection.From
git grep -e '^ def' -- gcloud/storage/blob.py(edited by me):From
git grep -e '^ def' -- gcloud/storage/bucket.py(edited by me):(Updated March 31, 2015)
dhermes commentedon Mar 23, 2015
@tseaver We have some methods which make HTTP requests for historical reasons only:
Bucket.update_cors(Making cors a property instead of having two separate methods. #768)Bucket.get_default_object_acl(Removing Bucket.get_default_object_acl. #772)Bucket.update_lifecycle(Adding Bucket.lifecycle_rules property to replace methods. #774)Bucket.get_logging(Removing HTTP requests from Bucket logging methods. #769)Bucket.enable_logging(Removing HTTP requests from Bucket logging methods. #769)Bucket.disable_logging(Removing HTTP requests from Bucket logging methods. #769)Bucket.configure_website(Removing patch() from Bucket.configure_website. #773)Bucket.disable_website(Removing patch() from Bucket.configure_website. #773)Bucket.make_publicAlso
Blob.make_publicdoesn't really fit the rest of methods, but that makes an HTTP request via theObjectACL. It seems hairier to unwind this.tseaver commentedon Mar 26, 2015
I think we could easily change the metadata-updating methods to drop the call (and require calling
patch()). Maybe ACL updates should also require an explictpatchorsavecall?dhermes commentedon Mar 27, 2015
@tseaver I agree. Being more declarative was the original goal of #545. I tried to sketch a way (in #761) to make these properties, but some of them are a bit involved (i.e. have multiple values associated).
We could look into using
apitoolsgenerated clients at some point?Removing patch() from Bucket.configure_website.
dhermes commentedon Mar 31, 2015
@tseaver Removing
__iter__and__contains__is impossible if noConnectionis bound to aBucket. As I mention in #761, using__iter__is pretty scary for large applications / buckets.Making Bucket.(exists|create) have an optional connection.
feat: add ability to request compressed ReadRowsResponse rows (#728)
feat: add ability to request compressed ReadRowsResponse rows (#728)
chore: Update gapic-generator-python to v1.8.2 (#728)
chore: add template README and tweak setup.py (#728)
chore(python): upgrade gcp-releasetool in .kokoro [autoapprove] (#728)
fix: increase cache lock expiration time (#740)
chore(python): upgrade gcp-releasetool in .kokoro [autoapprove] (#728)
fix: inserting non-finite floats with insert_rows() (#728)
chore: release 2.21.0 (#753)
chore: release 2.21.0 (#760)
tests: cleanup and remove duplicate tests (#728)