|
18 | 18 | from google.cloud._helpers import _LocalStack |
19 | 19 | from google.cloud._helpers import ( |
20 | 20 | _determine_default_project as _base_default_project) |
21 | | -from google.cloud.client import _ClientProjectMixin |
22 | | -from google.cloud.client import Client as _BaseClient |
| 21 | +from google.cloud.client import ClientWithProject |
23 | 22 | from google.cloud.datastore._http import Connection |
24 | 23 | from google.cloud.datastore import helpers |
25 | 24 | from google.cloud.datastore.batch import Batch |
@@ -143,7 +142,7 @@ def _extended_lookup(connection, project, key_pbs, |
143 | 142 | return results |
144 | 143 |
|
145 | 144 |
|
146 | | -class Client(_BaseClient, _ClientProjectMixin): |
| 145 | +class Client(ClientWithProject): |
147 | 146 | """Convenience wrapper for invoking APIs/factories w/ a project. |
148 | 147 |
|
149 | 148 | .. doctest:: |
@@ -171,13 +170,14 @@ class Client(_BaseClient, _ClientProjectMixin): |
171 | 170 | ``credentials`` for the current object. |
172 | 171 | """ |
173 | 172 |
|
| 173 | + SCOPE = ('https://www.googleapis.com/auth/datastore',) |
| 174 | + """The scopes required for authenticating as a Cloud Datastore consumer.""" |
| 175 | + |
174 | 176 | def __init__(self, project=None, namespace=None, |
175 | 177 | credentials=None, http=None): |
176 | | - _ClientProjectMixin.__init__(self, project=project) |
177 | | - _BaseClient.__init__(self, credentials=credentials, http=http) |
178 | | - self._connection = Connection( |
179 | | - credentials=self._credentials, http=self._http) |
180 | | - |
| 178 | + super(Client, self).__init__( |
| 179 | + project=project, credentials=credentials, http=http) |
| 180 | + self._connection = Connection(self) |
181 | 181 | self.namespace = namespace |
182 | 182 | self._batch_stack = _LocalStack() |
183 | 183 |
|
|
0 commit comments