Skip to content

chore: Update gapic-generator-python to 1.25.0 #985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 23, 2025
18 changes: 8 additions & 10 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
# -*- coding: utf-8 -*-
#
# Copyright 2024 Google LLC
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Generated by synthtool. DO NOT EDIT!
#
[flake8]
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2333):
# Resolve flake8 lint issues
ignore = E203, E231, E266, E501, W503
exclude =
# Exclude environment test code.
tests/environment/**

# Exclude generated code.
**/proto/**
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2333):
# Ensure that generated code passes flake8 lint
**/gapic/**
**/services/**
**/types/**
# Exclude Protobuf gencode
*_pb2.py

# Standard linting exemptions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from google.api_core import retry_async as retries
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore
import google.protobuf


try:
Expand Down Expand Up @@ -4223,5 +4224,8 @@ async def __aexit__(self, exc_type, exc, tb):
gapic_version=package_version.__version__
)

if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__


__all__ = ("ConfigServiceV2AsyncClient",)
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
from google.auth.transport.grpc import SslCredentials # type: ignore
from google.auth.exceptions import MutualTLSChannelError # type: ignore
from google.oauth2 import service_account # type: ignore
import google.protobuf

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None]
Expand Down Expand Up @@ -4678,5 +4679,7 @@ def cancel_operation(
gapic_version=package_version.__version__
)

if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__

__all__ = ("ConfigServiceV2Client",)
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from google.api_core import operations_v1
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore
import google.protobuf

from google.cloud.logging_v2.types import logging_config
from google.longrunning import operations_pb2 # type: ignore
Expand All @@ -35,6 +36,9 @@
gapic_version=package_version.__version__
)

if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__


class ConfigServiceV2Transport(abc.ABC):
"""Abstract transport class for ConfigServiceV2."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,11 @@ def intercept_unary_unary(self, continuation, client_call_details, request):
f"Sending request for {client_call_details.method}",
extra={
"serviceName": "google.logging.v2.ConfigServiceV2",
"rpcName": client_call_details.method,
"rpcName": str(client_call_details.method),
"request": grpc_request,
"metadata": grpc_request["metadata"],
},
)

response = continuation(client_call_details, request)
if logging_enabled: # pragma: NO COVER
response_metadata = response.trailing_metadata()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
from google.api_core import retry_async as retries
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore
import google.protobuf


try:
Expand Down Expand Up @@ -1263,5 +1264,8 @@ async def __aexit__(self, exc_type, exc, tb):
gapic_version=package_version.__version__
)

if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__


__all__ = ("LoggingServiceV2AsyncClient",)
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
from google.auth.transport.grpc import SslCredentials # type: ignore
from google.auth.exceptions import MutualTLSChannelError # type: ignore
from google.oauth2 import service_account # type: ignore
import google.protobuf

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None]
Expand Down Expand Up @@ -1678,5 +1679,7 @@ def cancel_operation(
gapic_version=package_version.__version__
)

if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__

__all__ = ("LoggingServiceV2Client",)
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from google.api_core import retry as retries
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore
import google.protobuf

from google.cloud.logging_v2.types import logging
from google.longrunning import operations_pb2 # type: ignore
Expand All @@ -34,6 +35,9 @@
gapic_version=package_version.__version__
)

if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__


class LoggingServiceV2Transport(abc.ABC):
"""Abstract transport class for LoggingServiceV2."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,11 @@ def intercept_unary_unary(self, continuation, client_call_details, request):
f"Sending request for {client_call_details.method}",
extra={
"serviceName": "google.logging.v2.LoggingServiceV2",
"rpcName": client_call_details.method,
"rpcName": str(client_call_details.method),
"request": grpc_request,
"metadata": grpc_request["metadata"],
},
)

response = continuation(client_call_details, request)
if logging_enabled: # pragma: NO COVER
response_metadata = response.trailing_metadata()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from google.api_core import retry_async as retries
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore
import google.protobuf


try:
Expand Down Expand Up @@ -1110,5 +1111,8 @@ async def __aexit__(self, exc_type, exc, tb):
gapic_version=package_version.__version__
)

if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__


__all__ = ("MetricsServiceV2AsyncClient",)
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
from google.auth.transport.grpc import SslCredentials # type: ignore
from google.auth.exceptions import MutualTLSChannelError # type: ignore
from google.oauth2 import service_account # type: ignore
import google.protobuf

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None]
Expand Down Expand Up @@ -1526,5 +1527,7 @@ def cancel_operation(
gapic_version=package_version.__version__
)

if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__

__all__ = ("MetricsServiceV2Client",)
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from google.api_core import retry as retries
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore
import google.protobuf

from google.cloud.logging_v2.types import logging_metrics
from google.longrunning import operations_pb2 # type: ignore
Expand All @@ -34,6 +35,9 @@
gapic_version=package_version.__version__
)

if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__


class MetricsServiceV2Transport(abc.ABC):
"""Abstract transport class for MetricsServiceV2."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,11 @@ def intercept_unary_unary(self, continuation, client_call_details, request):
f"Sending request for {client_call_details.method}",
extra={
"serviceName": "google.logging.v2.MetricsServiceV2",
"rpcName": client_call_details.method,
"rpcName": str(client_call_details.method),
"request": grpc_request,
"metadata": grpc_request["metadata"],
},
)

response = continuation(client_call_details, request)
if logging_enabled: # pragma: NO COVER
response_metadata = response.trailing_metadata()
Expand Down
1 change: 1 addition & 0 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def place_before(path, text, *before_text, escape=None):
"google/cloud/logging_v2/__init__.py",
"docs/index.rst",
"docs/logging_v2", # Don't include gapic library docs. Users should use the hand-written layer instead
"docs/multiprocessing.rst",
"scripts/fixup_logging_v2_keywords.py", # don't include script since it only works for generated layer
],
)
Expand Down