Skip to content

Commit 7ac8e14

Browse files
fix: Allow protobuf 5.x (#972)
* chore: Update gapic-generator-python to v1.18.0 PiperOrigin-RevId: 638650618 Source-Link: googleapis/googleapis@6330f03 Source-Link: googleapis/googleapis-gen@44fa4f1 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDRmYTRmMTk3OWRjNDVjMTc3OGZkN2NhZjEzZjhlNjFjNmQxY2FlOCJ9 * feat(spanner): Add support for Cloud Spanner Scheduled Backups PiperOrigin-RevId: 649277844 Source-Link: googleapis/googleapis@fd7efa2 Source-Link: googleapis/googleapis-gen@50be251 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTBiZTI1MTMyOWQ4ZGI1YjU1NTYyNmViZDQ4ODY3MjFmNTQ3ZDNjYyJ9 * feat: publish the Cloud Bigtable ExecuteQuery API The ExecuteQuery API will allow users to query Bigtable using SQL PiperOrigin-RevId: 650660213 Source-Link: googleapis/googleapis@f681f79 Source-Link: googleapis/googleapis-gen@3180845 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzE4MDg0NTQ4NzEzNjc5NDk1MmI4ZjM2NWZlNmM2ODY4OTk5ZDljMCJ9 * feat: publish ProtoRows Message This is needed to parse ExecuteQuery responses PiperOrigin-RevId: 651386373 Source-Link: googleapis/googleapis@a5be6fa Source-Link: googleapis/googleapis-gen@d467ce8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDQ2N2NlODkzYTA0YzQxZTUwNDk4MzM0NmMyMTVkNDFmZDI2MzY1MCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update setup.py to match googleapis/gapic-generator-python/blob/main/gapic/templates/setup.py.j2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update constraints --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 481c8d6 commit 7ac8e14

File tree

27 files changed

+2935
-1072
lines changed

27 files changed

+2935
-1072
lines changed

google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
from google.auth import credentials as ga_credentials # type: ignore
3939
from google.oauth2 import service_account # type: ignore
4040

41+
4142
try:
4243
OptionalRetry = Union[retries.AsyncRetry, gapic_v1.method._MethodDefault, None]
4344
except AttributeError: # pragma: NO COVER

google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ def __init__(
9696

9797
# Save the scopes.
9898
self._scopes = scopes
99+
if not hasattr(self, "_ignore_credentials"):
100+
self._ignore_credentials: bool = False
99101

100102
# If no credentials are provided, then determine the appropriate
101103
# defaults.
@@ -108,7 +110,7 @@ def __init__(
108110
credentials, _ = google.auth.load_credentials_from_file(
109111
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
110112
)
111-
elif credentials is None:
113+
elif credentials is None and not self._ignore_credentials:
112114
credentials, _ = google.auth.default(
113115
**scopes_kwargs, quota_project_id=quota_project_id
114116
)

google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ def __init__(
132132

133133
if isinstance(channel, grpc.Channel):
134134
# Ignore credentials if a channel was passed.
135-
credentials = False
135+
credentials = None
136+
self._ignore_credentials = True
136137
# If a channel was explicitly provided, set it.
137138
self._grpc_channel = channel
138139
self._ssl_channel_credentials = None

google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc_asyncio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ def __init__(
179179

180180
if isinstance(channel, aio.Channel):
181181
# Ignore credentials if a channel was passed.
182-
credentials = False
182+
credentials = None
183+
self._ignore_credentials = True
183184
# If a channel was explicitly provided, set it.
184185
self._grpc_channel = channel
185186
self._ssl_channel_credentials = None

google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
from google.auth import credentials as ga_credentials # type: ignore
3939
from google.oauth2 import service_account # type: ignore
4040

41+
4142
try:
4243
OptionalRetry = Union[retries.AsyncRetry, gapic_v1.method._MethodDefault, None]
4344
except AttributeError: # pragma: NO COVER

google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ def __init__(
9696

9797
# Save the scopes.
9898
self._scopes = scopes
99+
if not hasattr(self, "_ignore_credentials"):
100+
self._ignore_credentials: bool = False
99101

100102
# If no credentials are provided, then determine the appropriate
101103
# defaults.
@@ -108,7 +110,7 @@ def __init__(
108110
credentials, _ = google.auth.load_credentials_from_file(
109111
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
110112
)
111-
elif credentials is None:
113+
elif credentials is None and not self._ignore_credentials:
112114
credentials, _ = google.auth.default(
113115
**scopes_kwargs, quota_project_id=quota_project_id
114116
)

google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ def __init__(
134134

135135
if isinstance(channel, grpc.Channel):
136136
# Ignore credentials if a channel was passed.
137-
credentials = False
137+
credentials = None
138+
self._ignore_credentials = True
138139
# If a channel was explicitly provided, set it.
139140
self._grpc_channel = channel
140141
self._ssl_channel_credentials = None

google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ def __init__(
181181

182182
if isinstance(channel, aio.Channel):
183183
# Ignore credentials if a channel was passed.
184-
credentials = False
184+
credentials = None
185+
self._ignore_credentials = True
185186
# If a channel was explicitly provided, set it.
186187
self._grpc_channel = channel
187188
self._ssl_channel_credentials = None

google/cloud/bigtable_v2/__init__.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
from .types.bigtable import CheckAndMutateRowRequest
2525
from .types.bigtable import CheckAndMutateRowResponse
26+
from .types.bigtable import ExecuteQueryRequest
27+
from .types.bigtable import ExecuteQueryResponse
2628
from .types.bigtable import GenerateInitialChangeStreamPartitionsRequest
2729
from .types.bigtable import GenerateInitialChangeStreamPartitionsResponse
2830
from .types.bigtable import MutateRowRequest
@@ -40,12 +42,20 @@
4042
from .types.bigtable import ReadRowsResponse
4143
from .types.bigtable import SampleRowKeysRequest
4244
from .types.bigtable import SampleRowKeysResponse
45+
from .types.data import ArrayValue
4346
from .types.data import Cell
4447
from .types.data import Column
48+
from .types.data import ColumnMetadata
4549
from .types.data import ColumnRange
4650
from .types.data import Family
4751
from .types.data import Mutation
52+
from .types.data import PartialResultSet
53+
from .types.data import ProtoFormat
54+
from .types.data import ProtoRows
55+
from .types.data import ProtoRowsBatch
56+
from .types.data import ProtoSchema
4857
from .types.data import ReadModifyWriteRule
58+
from .types.data import ResultSetMetadata
4959
from .types.data import Row
5060
from .types.data import RowFilter
5161
from .types.data import RowRange
@@ -62,15 +72,20 @@
6272
from .types.request_stats import RequestLatencyStats
6373
from .types.request_stats import RequestStats
6474
from .types.response_params import ResponseParams
75+
from .types.types import Type
6576

6677
__all__ = (
6778
"BigtableAsyncClient",
79+
"ArrayValue",
6880
"BigtableClient",
6981
"Cell",
7082
"CheckAndMutateRowRequest",
7183
"CheckAndMutateRowResponse",
7284
"Column",
85+
"ColumnMetadata",
7386
"ColumnRange",
87+
"ExecuteQueryRequest",
88+
"ExecuteQueryResponse",
7489
"Family",
7590
"FeatureFlags",
7691
"FullReadStatsView",
@@ -81,8 +96,13 @@
8196
"MutateRowsRequest",
8297
"MutateRowsResponse",
8398
"Mutation",
99+
"PartialResultSet",
84100
"PingAndWarmRequest",
85101
"PingAndWarmResponse",
102+
"ProtoFormat",
103+
"ProtoRows",
104+
"ProtoRowsBatch",
105+
"ProtoSchema",
86106
"RateLimitInfo",
87107
"ReadChangeStreamRequest",
88108
"ReadChangeStreamResponse",
@@ -95,6 +115,7 @@
95115
"RequestLatencyStats",
96116
"RequestStats",
97117
"ResponseParams",
118+
"ResultSetMetadata",
98119
"Row",
99120
"RowFilter",
100121
"RowRange",
@@ -105,6 +126,7 @@
105126
"StreamContinuationTokens",
106127
"StreamPartition",
107128
"TimestampRange",
129+
"Type",
108130
"Value",
109131
"ValueRange",
110132
)

google/cloud/bigtable_v2/gapic_metadata.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
"check_and_mutate_row"
1616
]
1717
},
18+
"ExecuteQuery": {
19+
"methods": [
20+
"execute_query"
21+
]
22+
},
1823
"GenerateInitialChangeStreamPartitions": {
1924
"methods": [
2025
"generate_initial_change_stream_partitions"
@@ -65,6 +70,11 @@
6570
"check_and_mutate_row"
6671
]
6772
},
73+
"ExecuteQuery": {
74+
"methods": [
75+
"execute_query"
76+
]
77+
},
6878
"GenerateInitialChangeStreamPartitions": {
6979
"methods": [
7080
"generate_initial_change_stream_partitions"
@@ -115,6 +125,11 @@
115125
"check_and_mutate_row"
116126
]
117127
},
128+
"ExecuteQuery": {
129+
"methods": [
130+
"execute_query"
131+
]
132+
},
118133
"GenerateInitialChangeStreamPartitions": {
119134
"methods": [
120135
"generate_initial_change_stream_partitions"

0 commit comments

Comments
 (0)