-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Removing Connection.lookup in storage. #588
Conversation
return self.lookup(bucket_name) is not None | ||
try: | ||
self.get_bucket(bucket_name) | ||
return True |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Is there motivation for dropping |
Motivation for dropping
|
bebc84d
to
c506be0
Compare
I'm not sure I buy dropping 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 |
c506be0
to
c4eb080
Compare
I agree about smoother flow in calling code, but am working under the idea that The idea is to put the user-friendly type methods in a module like WDYT? |
So, do you see us adding API functions like 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.
""" |
I do, with a fallback to the implicit connection. As with |
Do you mean put the |
Nope, I meant putting the |
"Hiding" the |
Great. I'll follow this up with a creation of the |
LGTM |
Removing Connection.lookup in storage.
This was originally removed in googleapis#588.
No description provided.