Uh oh!
There was an error while loading. Please reload this page.
Bigtable: add 'client_info' support to client. - #7876
Conversation
Forward when constructing GAPIC API client objects.
| credentials=None, | ||
| read_only=False, | ||
| admin=False, | ||
| client_info=_CLIENT_INFO, |
There was a problem hiding this comment.
Since _CLIENT_INFO is mutable, should we be defaulting to None and making a copy of _CLIENT_INFO if not set? I guess we don't expect anyone to be mutating it, since _CLIENT_INFO and self._client_info are both private?
| client_class = mock.Mock() | ||
| credentials = _make_credentials() | ||
| client = _Client(credentials) | ||
| client_info = client._client_info = mock.Mock() |
| client = _Client( | ||
| credentials, emulator_host=emulator_host, emulator_channel=emulator_channel | ||
| ) | ||
| client_info = client._client_info = mock.Mock() |
There was a problem hiding this comment.
Ditto. We can use mock.create_autospec with instance=True to make doubly sure we don't use any properties on ClientInfo that don't exist.
| interact with the Instance Admin or Table Admin APIs. This | ||
| requires the :const:`ADMIN_SCOPE`. Defaults to :data:`False`. | ||
| :type: client_info: :class:`google.api_core.client_info.ClientInfo` |
There was a problem hiding this comment.
Does this need to be the google.api_core.gapic_v1.client_info.ClientInfo version, instead?
What happens when a google.api_core.client_info.ClientInfo is used? I imagine it might fail to populate the x-goog-api-client header?
Forward when constructing GAPIC API client objects.
Forward when constructing GAPIC API client objects.
Toward #7825.