Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: pass 'client_options' to base class ctor (#225)
packaging: pin 'google-cloud-core >= 1.4.0'

Closes #210
  • Loading branch information
tseaver committed Aug 5, 2020
1 parent 4c5adfa commit e1f91fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion google/cloud/storage/client.py
Expand Up @@ -79,6 +79,7 @@ class Client(ClientWithProject):
requests. If ``None``, then default info will be used. Generally,
you only need to set this if you're developing your own library
or partner tool.
:type client_options: :class:`~google.api_core.client_options.ClientOptions` or :class:`dict`
:param client_options: (Optional) Client options used to set user options on the client.
API Endpoint should be set through client_options.
Expand All @@ -100,15 +101,21 @@ def __init__(
client_options=None,
):
self._base_connection = None

if project is None:
no_project = True
project = "<none>"
else:
no_project = False

if project is _marker:
project = None

super(Client, self).__init__(
project=project, credentials=credentials, _http=_http
project=project,
credentials=credentials,
client_options=client_options,
_http=_http,
)

kw_args = {"client_info": client_info}
Expand All @@ -126,6 +133,7 @@ def __init__(

if no_project:
self.project = None

self._connection = Connection(self, **kw_args)
self._batch_stack = _LocalStack()

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -30,7 +30,7 @@
release_status = "Development Status :: 5 - Production/Stable"
dependencies = [
"google-auth >= 1.11.0, < 2.0dev",
"google-cloud-core >= 1.2.0, < 2.0dev",
"google-cloud-core >= 1.4.0, < 2.0dev",
"google-resumable-media >= 0.6.0, < 2.0dev",
]
extras = {}
Expand Down

0 comments on commit e1f91fc

Please sign in to comment.