Skip to content
Permalink
Browse files
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 e1f91fcca6c001bc3b0c5f759a7a003fcf60c0a6
Showing with 10 additions and 2 deletions.
  1. +9 −1 google/cloud/storage/client.py
  2. +1 −1 setup.py
@@ -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.
@@ -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}
@@ -126,6 +133,7 @@ def __init__(

if no_project:
self.project = None

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

@@ -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 = {}

0 comments on commit e1f91fc

Please sign in to comment.