Skip to content

Commit 2014fd2

Browse files
author
Jon Wayne Parrott
authored
Replace usage of google.api.core with google.api_core (#4221)
* 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
1 parent 5b97ed6 commit 2014fd2

File tree

5 files changed

+23
-20
lines changed

5 files changed

+23
-20
lines changed

google/cloud/logging/_gax.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import functools
1818

19-
from google.api.core import page_iterator
19+
from google.api_core import page_iterator
2020
from google.cloud.gapic.logging.v2.config_service_v2_client import (
2121
ConfigServiceV2Client)
2222
from google.cloud.gapic.logging.v2.logging_service_v2_client import (
@@ -84,7 +84,7 @@ def list_entries(self, projects, filter_='', order_by='',
8484
passed, the API will return the first page of
8585
entries.
8686
87-
:rtype: :class:`~google.api.core.page_iterator.Iterator`
87+
:rtype: :class:`~google.api_core.page_iterator.Iterator`
8888
:returns: Iterator of :class:`~google.cloud.logging.entries._BaseEntry`
8989
accessible to the current API.
9090
"""
@@ -332,7 +332,7 @@ def list_metrics(self, project, page_size=0, page_token=None):
332332
passed, the API will return the first page of
333333
metrics.
334334
335-
:rtype: :class:`~google.api.core.page_iterator.Iterator`
335+
:rtype: :class:`~google.api_core.page_iterator.Iterator`
336336
:returns: Iterator of
337337
:class:`~google.cloud.logging.metric.Metric`
338338
accessible to the current API.
@@ -510,12 +510,12 @@ def _item_to_entry(iterator, entry_pb, loggers):
510510
511511
This method does not have the correct signature to be used as
512512
the ``item_to_value`` argument to
513-
:class:`~google.api.core.page_iterator.Iterator`. It is intended to be
513+
:class:`~google.api_core.page_iterator.Iterator`. It is intended to be
514514
patched with a mutable ``loggers`` argument that can be updated
515515
on subsequent calls. For an example, see how the method is
516516
used above in :meth:`_LoggingAPI.list_entries`.
517517
518-
:type iterator: :class:`~google.api.core.page_iterator.Iterator`
518+
:type iterator: :class:`~google.api_core.page_iterator.Iterator`
519519
:param iterator: The iterator that is currently in use.
520520
521521
:type entry_pb: :class:`.log_entry_pb2.LogEntry`
@@ -537,7 +537,7 @@ def _item_to_entry(iterator, entry_pb, loggers):
537537
def _item_to_sink(iterator, log_sink_pb):
538538
"""Convert a sink protobuf to the native object.
539539
540-
:type iterator: :class:`~google.api.core.page_iterator.Iterator`
540+
:type iterator: :class:`~google.api_core.page_iterator.Iterator`
541541
:param iterator: The iterator that is currently in use.
542542
543543
:type log_sink_pb:
@@ -556,7 +556,7 @@ def _item_to_sink(iterator, log_sink_pb):
556556
def _item_to_metric(iterator, log_metric_pb):
557557
"""Convert a metric protobuf to the native object.
558558
559-
:type iterator: :class:`~google.api.core.page_iterator.Iterator`
559+
:type iterator: :class:`~google.api_core.page_iterator.Iterator`
560560
:param iterator: The iterator that is currently in use.
561561
562562
:type log_metric_pb:

google/cloud/logging/_http.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import functools
1818

19-
from google.api.core import page_iterator
19+
from google.api_core import page_iterator
2020
from google.cloud import _http
2121

2222
from google.cloud.logging import __version__
@@ -93,7 +93,7 @@ def list_entries(self, projects, filter_=None, order_by=None,
9393
passed, the API will return the first page of
9494
entries.
9595
96-
:rtype: :class:`~google.api.core.page_iterator.Iterator`
96+
:rtype: :class:`~google.api_core.page_iterator.Iterator`
9797
:returns: Iterator of :class:`~google.cloud.logging.entries._BaseEntry`
9898
accessible to the current API.
9999
"""
@@ -209,7 +209,7 @@ def list_sinks(self, project, page_size=None, page_token=None):
209209
passed, the API will return the first page of
210210
sinks.
211211
212-
:rtype: :class:`~google.api.core.page_iterator.Iterator`
212+
:rtype: :class:`~google.api_core.page_iterator.Iterator`
213213
:returns: Iterator of
214214
:class:`~google.cloud.logging.sink.Sink`
215215
accessible to the current API.
@@ -353,7 +353,7 @@ def list_metrics(self, project, page_size=None, page_token=None):
353353
passed, the API will return the first page of
354354
metrics.
355355
356-
:rtype: :class:`~google.api.core.page_iterator.Iterator`
356+
:rtype: :class:`~google.api_core.page_iterator.Iterator`
357357
:returns: Iterator of
358358
:class:`~google.cloud.logging.metric.Metric`
359359
accessible to the current API.
@@ -471,12 +471,12 @@ def _item_to_entry(iterator, resource, loggers):
471471
472472
This method does not have the correct signature to be used as
473473
the ``item_to_value`` argument to
474-
:class:`~google.api.core.page_iterator.Iterator`. It is intended to be
474+
:class:`~google.api_core.page_iterator.Iterator`. It is intended to be
475475
patched with a mutable ``loggers`` argument that can be updated
476476
on subsequent calls. For an example, see how the method is
477477
used above in :meth:`_LoggingAPI.list_entries`.
478478
479-
:type iterator: :class:`~google.api.core.page_iterator.Iterator`
479+
:type iterator: :class:`~google.api_core.page_iterator.Iterator`
480480
:param iterator: The iterator that is currently in use.
481481
482482
:type resource: dict
@@ -497,7 +497,7 @@ def _item_to_entry(iterator, resource, loggers):
497497
def _item_to_sink(iterator, resource):
498498
"""Convert a sink resource to the native object.
499499
500-
:type iterator: :class:`~google.api.core.page_iterator.Iterator`
500+
:type iterator: :class:`~google.api_core.page_iterator.Iterator`
501501
:param iterator: The iterator that is currently in use.
502502
503503
:type resource: dict
@@ -512,7 +512,7 @@ def _item_to_sink(iterator, resource):
512512
def _item_to_metric(iterator, resource):
513513
"""Convert a metric resource to the native object.
514514
515-
:type iterator: :class:`~google.api.core.page_iterator.Iterator`
515+
:type iterator: :class:`~google.api_core.page_iterator.Iterator`
516516
:param iterator: The iterator that is currently in use.
517517
518518
:type resource: dict

google/cloud/logging/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def list_entries(self, projects=None, filter_=None, order_by=None,
195195
passed, the API will return the first page of
196196
entries.
197197
198-
:rtype: :class:`~google.api.core.page_iterator.Iterator`
198+
:rtype: :class:`~google.api_core.page_iterator.Iterator`
199199
:returns: Iterator of :class:`~google.cloud.logging.entries._BaseEntry`
200200
accessible to the current client.
201201
"""
@@ -244,7 +244,7 @@ def list_sinks(self, page_size=None, page_token=None):
244244
passed, the API will return the first page of
245245
sinks.
246246
247-
:rtype: :class:`~google.api.core.page_iterator.Iterator`
247+
:rtype: :class:`~google.api_core.page_iterator.Iterator`
248248
:returns: Iterator of
249249
:class:`~google.cloud.logging.sink.Sink`
250250
accessible to the current client.
@@ -289,7 +289,7 @@ def list_metrics(self, page_size=None, page_token=None):
289289
passed, the API will return the first page of
290290
metrics.
291291
292-
:rtype: :class:`~google.api.core.page_iterator.Iterator`
292+
:rtype: :class:`~google.api_core.page_iterator.Iterator`
293293
:returns: Iterator of :class:`~google.cloud.logging.metric.Metric`
294294
accessible to the current client.
295295
"""

google/cloud/logging/logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def list_entries(self, projects=None, filter_=None, order_by=None,
344344
passed, the API will return the first page of
345345
entries.
346346
347-
:rtype: :class:`~google.api.core.page_iterator.Iterator`
347+
:rtype: :class:`~google.api_core.page_iterator.Iterator`
348348
:returns: Iterator of :class:`~google.cloud.logging.entries._BaseEntry`
349349
accessible to the current logger.
350350
"""

nox.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
import nox
2020

2121

22-
LOCAL_DEPS = ('../core/',)
22+
LOCAL_DEPS = (
23+
os.path.join('..', 'api_core'),
24+
os.path.join('..', 'core'),
25+
)
2326

2427

2528
@nox.session

0 commit comments

Comments
 (0)