Skip to content
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

feat: pass 'client_options' to base class ctor #225

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 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,18 @@ 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 +130,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