Skip to content

Commit

Permalink
Replace usage of google.api.core with google.api_core (#4221)
Browse files Browse the repository at this point in the history
* Remove api.core packages from google.cloud.core, make google.cloud.core depend on api_core.

* s/google.api.core/google.api_core/g and nox updates

* Fixing core tests, addressing review feedback

* Fix bigquery
  • Loading branch information
Jon Wayne Parrott authored Oct 18, 2017
1 parent a84d6d2 commit e216637
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""A Client for interacting with the Resource Manager API."""


from google.api.core import page_iterator
from google.api_core import page_iterator
from google.cloud.client import Client as BaseClient

from google.cloud.resource_manager._http import Connection
Expand Down Expand Up @@ -151,7 +151,7 @@ def list_projects(self, filter_params=None, page_size=None):
single page. If not passed, defaults to a value set
by the API.
:rtype: :class:`~google.api.core.page_iterator.Iterator`
:rtype: :class:`~google.api_core.page_iterator.Iterator`
:returns: Iterator of all
:class:`~google.cloud.resource_manager.project.Project`.
that the current user has access to.
Expand All @@ -176,7 +176,7 @@ def list_projects(self, filter_params=None, page_size=None):
def _item_to_project(iterator, resource):
"""Convert a JSON project to the native object.
:type iterator: :class:`~google.api.core.page_iterator.Iterator`
:type iterator: :class:`~google.api_core.page_iterator.Iterator`
:param iterator: The iterator that has retrieved the item.
:type resource: dict
Expand Down
5 changes: 4 additions & 1 deletion packages/google-cloud-resource-manager/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
import nox


LOCAL_DEPS = ('../core/',)
LOCAL_DEPS = (
os.path.join('..', 'api_core'),
os.path.join('..', 'core'),
)


@nox.session
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_fetch_project(self):
self.assertEqual(project.labels, labels)

def test_list_projects_return_type(self):
from google.api.core import page_iterator
from google.api_core import page_iterator

credentials = _make_credentials()
client = self._make_one(credentials=credentials)
Expand Down Expand Up @@ -227,7 +227,7 @@ def test_list_projects_with_filter(self):
})

def test_page_empty_response(self):
from google.api.core import page_iterator
from google.api_core import page_iterator

credentials = _make_credentials()
client = self._make_one(credentials=credentials)
Expand Down

0 comments on commit e216637

Please sign in to comment.