From a4b28dfcc4faef6ab648b2e2a018a5635667d64d Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Wed, 16 Dec 2015 10:42:29 -0800 Subject: [PATCH] Explicitly using API_BASE_URL from current connection in datastore. This can be seen as a bug-fix where a sub-class may not be able to impact the URIs generated. In addition, we added the (repeated) value of the base connection's API_BASE_URL in advance of swapping it out for v1beta3. --- gcloud/datastore/connection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcloud/datastore/connection.py b/gcloud/datastore/connection.py index 95f78f4ca168..13ab49474683 100644 --- a/gcloud/datastore/connection.py +++ b/gcloud/datastore/connection.py @@ -39,6 +39,9 @@ class Connection(connection.Connection): from :mod:`gcloud.connection`. """ + API_BASE_URL = 'https://www.googleapis.com' + """The base of the API call URL.""" + API_VERSION = 'v1beta2' """The version of the API, used in building the API call's URL.""" @@ -54,7 +57,7 @@ def __init__(self, credentials=None, http=None, api_base_url=None): super(Connection, self).__init__(credentials=credentials, http=http) if api_base_url is None: api_base_url = os.getenv(GCD_HOST, - connection.API_BASE_URL) + self.__class__.API_BASE_URL) self.api_base_url = api_base_url def _request(self, dataset_id, method, data):