Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,28 +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 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
13 changes: 4 additions & 9 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
# -*- 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!
#
include README.rst LICENSE
recursive-include google *.json *.proto py.typed
recursive-include google *.py *.pyi *.json *.proto py.typed
recursive-include tests *
global-exclude *.py[co]
global-exclude __pycache__

# Exclude scripts for samples readmegen
prune scripts/readme-gen
4 changes: 4 additions & 0 deletions google/pubsub_v1/services/publisher/async_client.py
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 @@ -1662,5 +1663,8 @@ async def __aexit__(self, exc_type, exc, tb):
client_library_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__ = ("PublisherAsyncClient",)
3 changes: 3 additions & 0 deletions google/pubsub_v1/services/publisher/client.py
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 @@ -2129,5 +2130,7 @@ def test_iam_permissions(
client_library_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__ = ("PublisherClient",)
4 changes: 4 additions & 0 deletions google/pubsub_v1/services/publisher/transports/base.py
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.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
Expand All @@ -35,6 +36,9 @@
client_library_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 PublisherTransport(abc.ABC):
"""Abstract transport class for Publisher."""
Expand Down
3 changes: 1 addition & 2 deletions google/pubsub_v1/services/publisher/transports/grpc.py
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.pubsub.v1.Publisher",
"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
4 changes: 4 additions & 0 deletions google/pubsub_v1/services/publisher/transports/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from google.api_core import rest_helpers
from google.api_core import rest_streaming
from google.api_core import gapic_v1
import google.protobuf

from google.protobuf import json_format
from google.iam.v1 import iam_policy_pb2 # type: ignore
Expand Down Expand Up @@ -61,6 +62,9 @@
rest_version=f"requests@{requests_version}",
)

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


class PublisherRestInterceptor:
"""Interceptor for Publisher.
Expand Down
4 changes: 4 additions & 0 deletions google/pubsub_v1/services/schema_service/async_client.py
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 @@ -1775,5 +1776,8 @@ async def __aexit__(self, exc_type, exc, tb):
client_library_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__ = ("SchemaServiceAsyncClient",)
3 changes: 3 additions & 0 deletions google/pubsub_v1/services/schema_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,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 @@ -2190,5 +2191,7 @@ def test_iam_permissions(
client_library_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__ = ("SchemaServiceClient",)
4 changes: 4 additions & 0 deletions google/pubsub_v1/services/schema_service/transports/base.py
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.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
Expand All @@ -36,6 +37,9 @@
client_library_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 SchemaServiceTransport(abc.ABC):
"""Abstract transport class for SchemaService."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,11 @@ def intercept_unary_unary(self, continuation, client_call_details, request):
f"Sending request for {client_call_details.method}",
extra={
"serviceName": "google.pubsub.v1.SchemaService",
"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
4 changes: 4 additions & 0 deletions google/pubsub_v1/services/schema_service/transports/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from google.api_core import rest_helpers
from google.api_core import rest_streaming
from google.api_core import gapic_v1
import google.protobuf

from google.protobuf import json_format
from google.iam.v1 import iam_policy_pb2 # type: ignore
Expand Down Expand Up @@ -62,6 +63,9 @@
rest_version=f"requests@{requests_version}",
)

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


class SchemaServiceRestInterceptor:
"""Interceptor for SchemaService.
Expand Down
4 changes: 4 additions & 0 deletions google/pubsub_v1/services/subscriber/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,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 @@ -2635,5 +2636,8 @@ async def __aexit__(self, exc_type, exc, tb):
client_library_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__ = ("SubscriberAsyncClient",)
3 changes: 3 additions & 0 deletions google/pubsub_v1/services/subscriber/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,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 @@ -3087,5 +3088,7 @@ def test_iam_permissions(
client_library_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__ = ("SubscriberClient",)
4 changes: 4 additions & 0 deletions google/pubsub_v1/services/subscriber/transports/base.py
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.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
Expand All @@ -35,6 +36,9 @@
client_library_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 SubscriberTransport(abc.ABC):
"""Abstract transport class for Subscriber."""
Expand Down
3 changes: 1 addition & 2 deletions google/pubsub_v1/services/subscriber/transports/grpc.py
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.pubsub.v1.Subscriber",
"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
4 changes: 4 additions & 0 deletions google/pubsub_v1/services/subscriber/transports/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from google.api_core import rest_helpers
from google.api_core import rest_streaming
from google.api_core import gapic_v1
import google.protobuf

from google.protobuf import json_format
from google.iam.v1 import iam_policy_pb2 # type: ignore
Expand Down Expand Up @@ -61,6 +62,9 @@
rest_version=f"requests@{requests_version}",
)

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


class SubscriberRestInterceptor:
"""Interceptor for Subscriber.
Expand Down
17 changes: 11 additions & 6 deletions testing/constraints-3.13.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# -*- coding: utf-8 -*-
# This constraints file is required for unit tests.
# We use the constraints file for the latest Python version
# (currently this file) to check that the latest
# major versions of dependencies are supported in setup.py.
# List all library dependencies and extras in this file.
google-api-core
proto-plus
protobuf
grpc-google-iam-v1
# Require the latest major version be installed for each dependency.
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
# Then this file should have google-cloud-foo>=1
google-api-core>=2
google-auth>=2
proto-plus>=1
protobuf>=6
grpc-google-iam-v1>=0