Skip to content

Commit 1c1c4d2

Browse files
chore: use gapic-generator-python 0.56.2 (#94)
* chore: update Java and Python dependencies PiperOrigin-RevId: 408420890 Source-Link: googleapis/googleapis@2921f9f Source-Link: googleapis/googleapis-gen@6598ca8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjU5OGNhOGNiYmY1MjI2NzMzYTA5OWM0NTA2NTE4YTVhZjZmZjc0YyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 4ceae96 commit 1c1c4d2

File tree

21 files changed

+537
-210
lines changed

21 files changed

+537
-210
lines changed

packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/services/dataproc_metastore/async_client.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@
1919
from typing import Dict, Sequence, Tuple, Type, Union
2020
import pkg_resources
2121

22-
from google.api_core.client_options import ClientOptions # type: ignore
23-
from google.api_core import exceptions as core_exceptions # type: ignore
24-
from google.api_core import gapic_v1 # type: ignore
25-
from google.api_core import retry as retries # type: ignore
22+
from google.api_core.client_options import ClientOptions
23+
from google.api_core import exceptions as core_exceptions
24+
from google.api_core import gapic_v1
25+
from google.api_core import retry as retries
2626
from google.auth import credentials as ga_credentials # type: ignore
2727
from google.oauth2 import service_account # type: ignore
2828

29-
OptionalRetry = Union[retries.Retry, object]
29+
try:
30+
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
31+
except AttributeError: # pragma: NO COVER
32+
OptionalRetry = Union[retries.Retry, object] # type: ignore
3033

3134
from google.api_core import operation # type: ignore
3235
from google.api_core import operation_async # type: ignore

packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/services/dataproc_metastore/client.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,25 @@
1414
# limitations under the License.
1515
#
1616
from collections import OrderedDict
17-
from distutils import util
1817
import os
1918
import re
2019
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2120
import pkg_resources
2221

23-
from google.api_core import client_options as client_options_lib # type: ignore
24-
from google.api_core import exceptions as core_exceptions # type: ignore
25-
from google.api_core import gapic_v1 # type: ignore
26-
from google.api_core import retry as retries # type: ignore
22+
from google.api_core import client_options as client_options_lib
23+
from google.api_core import exceptions as core_exceptions
24+
from google.api_core import gapic_v1
25+
from google.api_core import retry as retries
2726
from google.auth import credentials as ga_credentials # type: ignore
2827
from google.auth.transport import mtls # type: ignore
2928
from google.auth.transport.grpc import SslCredentials # type: ignore
3029
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3130
from google.oauth2 import service_account # type: ignore
3231

33-
OptionalRetry = Union[retries.Retry, object]
32+
try:
33+
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
34+
except AttributeError: # pragma: NO COVER
35+
OptionalRetry = Union[retries.Retry, object] # type: ignore
3436

3537
from google.api_core import operation # type: ignore
3638
from google.api_core import operation_async # type: ignore
@@ -364,8 +366,15 @@ def __init__(
364366
client_options = client_options_lib.ClientOptions()
365367

366368
# Create SSL credentials for mutual TLS if needed.
367-
use_client_cert = bool(
368-
util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"))
369+
if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in (
370+
"true",
371+
"false",
372+
):
373+
raise ValueError(
374+
"Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`"
375+
)
376+
use_client_cert = (
377+
os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true"
369378
)
370379

371380
client_cert_source_func = None

packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/services/dataproc_metastore/transports/base.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
import pkg_resources
1919

2020
import google.auth # type: ignore
21-
import google.api_core # type: ignore
22-
from google.api_core import exceptions as core_exceptions # type: ignore
23-
from google.api_core import gapic_v1 # type: ignore
24-
from google.api_core import retry as retries # type: ignore
25-
from google.api_core import operations_v1 # type: ignore
21+
import google.api_core
22+
from google.api_core import exceptions as core_exceptions
23+
from google.api_core import gapic_v1
24+
from google.api_core import retry as retries
25+
from google.api_core import operations_v1
2626
from google.auth import credentials as ga_credentials # type: ignore
2727
from google.oauth2 import service_account # type: ignore
2828

packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/services/dataproc_metastore/transports/grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
import warnings
1717
from typing import Callable, Dict, Optional, Sequence, Tuple, Union
1818

19-
from google.api_core import grpc_helpers # type: ignore
20-
from google.api_core import operations_v1 # type: ignore
21-
from google.api_core import gapic_v1 # type: ignore
19+
from google.api_core import grpc_helpers
20+
from google.api_core import operations_v1
21+
from google.api_core import gapic_v1
2222
import google.auth # type: ignore
2323
from google.auth import credentials as ga_credentials # type: ignore
2424
from google.auth.transport.grpc import SslCredentials # type: ignore

packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/services/dataproc_metastore/transports/grpc_asyncio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
import warnings
1717
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
1818

19-
from google.api_core import gapic_v1 # type: ignore
20-
from google.api_core import grpc_helpers_async # type: ignore
21-
from google.api_core import operations_v1 # type: ignore
19+
from google.api_core import gapic_v1
20+
from google.api_core import grpc_helpers_async
21+
from google.api_core import operations_v1
2222
from google.auth import credentials as ga_credentials # type: ignore
2323
from google.auth.transport.grpc import SslCredentials # type: ignore
2424

packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1/types/metastore.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class Service(proto.Message):
6969
Configuration information specific to running
7070
Hive metastore software as the metastore
7171
service.
72+
7273
This field is a member of `oneof`_ ``metastore_config``.
7374
name (str):
7475
Immutable. The relative resource name of the metastore
@@ -256,6 +257,7 @@ class Secret(proto.Message):
256257
version, in the following form:
257258
258259
``projects/{project_number}/secrets/{secret_id}/versions/{version_id}``.
260+
259261
This field is a member of `oneof`_ ``value``.
260262
"""
261263

@@ -289,6 +291,7 @@ class MetadataImport(proto.Message):
289291
database_dump (google.cloud.metastore_v1.types.MetadataImport.DatabaseDump):
290292
Immutable. A database dump from a pre-
291293
xisting metastore's database.
294+
292295
This field is a member of `oneof`_ ``metadata``.
293296
name (str):
294297
Immutable. The relative resource name of the metadata
@@ -368,6 +371,7 @@ class MetadataExport(proto.Message):
368371
are exported to, in the form of
369372
``gs://<bucket_name>/<path_inside_bucket>/<export_folder>``,
370373
where ``<export_folder>`` is automatically generated.
374+
371375
This field is a member of `oneof`_ ``destination``.
372376
start_time (google.protobuf.timestamp_pb2.Timestamp):
373377
Output only. The time when the export
@@ -1041,6 +1045,7 @@ class ExportMetadataRequest(proto.Message):
10411045
``gs://<bucket_name>/<path_inside_bucket>``. A sub-folder
10421046
``<export_folder>`` containing exported files will be
10431047
created below it.
1048+
10441049
This field is a member of `oneof`_ ``destination``.
10451050
service (str):
10461051
Required. The relative resource name of the metastore

packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/services/dataproc_metastore/async_client.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@
1919
from typing import Dict, Sequence, Tuple, Type, Union
2020
import pkg_resources
2121

22-
from google.api_core.client_options import ClientOptions # type: ignore
23-
from google.api_core import exceptions as core_exceptions # type: ignore
24-
from google.api_core import gapic_v1 # type: ignore
25-
from google.api_core import retry as retries # type: ignore
22+
from google.api_core.client_options import ClientOptions
23+
from google.api_core import exceptions as core_exceptions
24+
from google.api_core import gapic_v1
25+
from google.api_core import retry as retries
2626
from google.auth import credentials as ga_credentials # type: ignore
2727
from google.oauth2 import service_account # type: ignore
2828

29-
OptionalRetry = Union[retries.Retry, object]
29+
try:
30+
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
31+
except AttributeError: # pragma: NO COVER
32+
OptionalRetry = Union[retries.Retry, object] # type: ignore
3033

3134
from google.api_core import operation # type: ignore
3235
from google.api_core import operation_async # type: ignore

packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/services/dataproc_metastore/client.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,25 @@
1414
# limitations under the License.
1515
#
1616
from collections import OrderedDict
17-
from distutils import util
1817
import os
1918
import re
2019
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2120
import pkg_resources
2221

23-
from google.api_core import client_options as client_options_lib # type: ignore
24-
from google.api_core import exceptions as core_exceptions # type: ignore
25-
from google.api_core import gapic_v1 # type: ignore
26-
from google.api_core import retry as retries # type: ignore
22+
from google.api_core import client_options as client_options_lib
23+
from google.api_core import exceptions as core_exceptions
24+
from google.api_core import gapic_v1
25+
from google.api_core import retry as retries
2726
from google.auth import credentials as ga_credentials # type: ignore
2827
from google.auth.transport import mtls # type: ignore
2928
from google.auth.transport.grpc import SslCredentials # type: ignore
3029
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3130
from google.oauth2 import service_account # type: ignore
3231

33-
OptionalRetry = Union[retries.Retry, object]
32+
try:
33+
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
34+
except AttributeError: # pragma: NO COVER
35+
OptionalRetry = Union[retries.Retry, object] # type: ignore
3436

3537
from google.api_core import operation # type: ignore
3638
from google.api_core import operation_async # type: ignore
@@ -365,8 +367,15 @@ def __init__(
365367
client_options = client_options_lib.ClientOptions()
366368

367369
# Create SSL credentials for mutual TLS if needed.
368-
use_client_cert = bool(
369-
util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"))
370+
if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in (
371+
"true",
372+
"false",
373+
):
374+
raise ValueError(
375+
"Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`"
376+
)
377+
use_client_cert = (
378+
os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true"
370379
)
371380

372381
client_cert_source_func = None

packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/services/dataproc_metastore/transports/base.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
import pkg_resources
1919

2020
import google.auth # type: ignore
21-
import google.api_core # type: ignore
22-
from google.api_core import exceptions as core_exceptions # type: ignore
23-
from google.api_core import gapic_v1 # type: ignore
24-
from google.api_core import retry as retries # type: ignore
25-
from google.api_core import operations_v1 # type: ignore
21+
import google.api_core
22+
from google.api_core import exceptions as core_exceptions
23+
from google.api_core import gapic_v1
24+
from google.api_core import retry as retries
25+
from google.api_core import operations_v1
2626
from google.auth import credentials as ga_credentials # type: ignore
2727
from google.oauth2 import service_account # type: ignore
2828

packages/google-cloud-dataproc-metastore/google/cloud/metastore_v1alpha/services/dataproc_metastore/transports/grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
import warnings
1717
from typing import Callable, Dict, Optional, Sequence, Tuple, Union
1818

19-
from google.api_core import grpc_helpers # type: ignore
20-
from google.api_core import operations_v1 # type: ignore
21-
from google.api_core import gapic_v1 # type: ignore
19+
from google.api_core import grpc_helpers
20+
from google.api_core import operations_v1
21+
from google.api_core import gapic_v1
2222
import google.auth # type: ignore
2323
from google.auth import credentials as ga_credentials # type: ignore
2424
from google.auth.transport.grpc import SslCredentials # type: ignore

0 commit comments

Comments
 (0)