| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Is there motivation for dropping lookup? |
Sorry, something went wrong.
|
Motivation for dropping lookup is that
|
Sorry, something went wrong.
|
I'm not sure I buy dropping lookup(): like dict.get(), it makes for smoother flow in calling code than always having to try: ... except: ... around KeyErrors/NotFound. How likely is it that we will have applications dealing with multiple, non-default buckets? The more likely such cases, the less I'd be inclined to drop lookup(). |
Sorry, something went wrong.
|
I agree about smoother flow in calling code, but am working under the idea that Connection should not be the surface that users deal with (hence not in calling code). The idea is to put the user-friendly type methods in a module like datastore.api and surface in the same way (like datastore.get, datastore.put and datastore.delete). WDYT? |
Sorry, something went wrong.
|
So, do you see us adding API functions like storage.lookup(): def lookup(bucket_name, connection=None):
"""Look up a bucket by name.
:type bucket_name: string
:param bucket_name: the name of the bucket being looked up.
:type connection: :class:`gcloud.storage.connection.Connection`, or None.
:param connection: the connection to use. If None, use the connection
inferred from the environment.
:rtype: :class:`gcloud.storage.bucket.Bucket`, or None
;returns: the bucket, if it exists, or None if not.
""" |
Sorry, something went wrong.
|
I do, with a fallback to the implicit connection. As with datastore, we should put it out of view for most users to reduce complexity / surface area. |
Sorry, something went wrong.
|
Do you mean put the storage.lookup API out of sight? |
Sorry, something went wrong.
|
Nope, I meant putting the Connection out of sight. |
Sorry, something went wrong.
|
"Hiding" the Connection class SGTM. |
Sorry, something went wrong.
|
Great. I'll follow this up with a creation of the storage.api module or you want me to do it here before an LGTM? |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
Removing Connection.lookup in storage.
This was originally removed in googleapis#588.
Add documentation about the EncryptionInfo object. The doc is autogenerated from docstrings.
* chore: updated CHANGELOG.md [ci skip] * chore: updated setup.py Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Part of #579 This helper is used with '?recursive=true' in one place, and can now be used by IDTokenCredentials for requests with query parameters to the metadata identity end-point. This change will allow making requests to the token end-point with '?scopes=..' query parameters.
…bled (#588) * Add receive_messages_with_exactly_once_delivery_enabled sample with its own region tag * Address Tianzi and Mahesh's comments. * Add code for arg parsing / integrate sample with infra * Add sample test * Reformat and remove min lease extension period setting from sample * Address Tianzi's comments. * Fix import of subscriber exceptions.
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
No description provided.