From b30425163ac8566e07d78bb949230d601df3b38e Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Wed, 16 Dec 2020 10:16:38 -0800 Subject: [PATCH 1/4] changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. --- google/pubsub_v1/__init__.py | 4 ++-- synth.metadata | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google/pubsub_v1/__init__.py b/google/pubsub_v1/__init__.py index 7ecad97ea..5e7a6cc72 100644 --- a/google/pubsub_v1/__init__.py +++ b/google/pubsub_v1/__init__.py @@ -90,7 +90,6 @@ "ModifyPushConfigRequest", "PublishRequest", "PublishResponse", - "PublisherClient", "PubsubMessage", "PullRequest", "PullResponse", @@ -102,10 +101,11 @@ "Snapshot", "StreamingPullRequest", "StreamingPullResponse", + "SubscriberClient", "Subscription", "Topic", "UpdateSnapshotRequest", "UpdateSubscriptionRequest", "UpdateTopicRequest", - "SubscriberClient", + "PublisherClient", ) diff --git a/synth.metadata b/synth.metadata index 88336808d..55b72e511 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-pubsub.git", - "sha": "f3f4e5add32128bf238b2fbab3bcf0f5b23269d3" + "sha": "258414727827e56d2678ada28b9bbd88b5c6aa6f" } }, { From 98cc65a09473b403efd9f703e98826269e983e24 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Wed, 16 Dec 2020 10:17:58 -0800 Subject: [PATCH 2/4] chore: update noxfile.py.j2 * Update noxfile.py.j2 add changes from @glasnt to the template template to ensure that enforcing type hinting doesn't fail for repos with the sample noxfile (aka all samples repos) See https://github.com/GoogleCloudPlatform/python-docs-samples/pull/4869/files for context * fix typo Source-Author: Leah E. Cole <6719667+leahecole@users.noreply.github.com> Source-Date: Thu Dec 3 13:44:30 2020 -0800 Source-Repo: googleapis/synthtool Source-Sha: 18c5dbdb4ac8cf75d4d8174e7b4558f48e76f8a1 Source-Link: https://github.com/googleapis/synthtool/commit/18c5dbdb4ac8cf75d4d8174e7b4558f48e76f8a1 --- google/pubsub_v1/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google/pubsub_v1/__init__.py b/google/pubsub_v1/__init__.py index 5e7a6cc72..7ecad97ea 100644 --- a/google/pubsub_v1/__init__.py +++ b/google/pubsub_v1/__init__.py @@ -90,6 +90,7 @@ "ModifyPushConfigRequest", "PublishRequest", "PublishResponse", + "PublisherClient", "PubsubMessage", "PullRequest", "PullResponse", @@ -101,11 +102,10 @@ "Snapshot", "StreamingPullRequest", "StreamingPullResponse", - "SubscriberClient", "Subscription", "Topic", "UpdateSnapshotRequest", "UpdateSubscriptionRequest", "UpdateTopicRequest", - "PublisherClient", + "SubscriberClient", ) From be9fcc44fb9bbb2af6455afd09aa03d3fc5c2e6d Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Wed, 16 Dec 2020 10:18:50 -0800 Subject: [PATCH 3/4] fix: remove client recv msg limit fix: add enums to `types/__init__.py` PiperOrigin-RevId: 347055288 Source-Author: Google APIs Source-Date: Fri Dec 11 12:44:37 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: dd372aa22ded7a8ba6f0e03a80e06358a3fa0907 Source-Link: https://github.com/googleapis/googleapis/commit/dd372aa22ded7a8ba6f0e03a80e06358a3fa0907 --- .../services/publisher/transports/__init__.py | 1 - google/pubsub_v1/services/publisher/transports/grpc.py | 10 +++++++++- .../services/publisher/transports/grpc_asyncio.py | 8 ++++++++ .../services/subscriber/transports/__init__.py | 1 - .../pubsub_v1/services/subscriber/transports/grpc.py | 10 +++++++++- .../services/subscriber/transports/grpc_asyncio.py | 8 ++++++++ google/pubsub_v1/types/__init__.py | 1 - synth.metadata | 4 ++-- tests/unit/gapic/pubsub_v1/test_publisher.py | 8 ++++++++ tests/unit/gapic/pubsub_v1/test_subscriber.py | 8 ++++++++ 10 files changed, 52 insertions(+), 7 deletions(-) diff --git a/google/pubsub_v1/services/publisher/transports/__init__.py b/google/pubsub_v1/services/publisher/transports/__init__.py index bf7dc8f2b..9eec7fc5d 100644 --- a/google/pubsub_v1/services/publisher/transports/__init__.py +++ b/google/pubsub_v1/services/publisher/transports/__init__.py @@ -28,7 +28,6 @@ _transport_registry["grpc"] = PublisherGrpcTransport _transport_registry["grpc_asyncio"] = PublisherGrpcAsyncIOTransport - __all__ = ( "PublisherTransport", "PublisherGrpcTransport", diff --git a/google/pubsub_v1/services/publisher/transports/grpc.py b/google/pubsub_v1/services/publisher/transports/grpc.py index 15de8f87d..3661714b2 100644 --- a/google/pubsub_v1/services/publisher/transports/grpc.py +++ b/google/pubsub_v1/services/publisher/transports/grpc.py @@ -150,6 +150,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -168,6 +172,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._stubs = {} # type: Dict[str, Callable] @@ -194,7 +202,7 @@ def create_channel( ) -> grpc.Channel: """Create and return a gRPC channel object. Args: - address (Optionsl[str]): The host for the channel to use. + address (Optional[str]): The host for the channel to use. credentials (Optional[~.Credentials]): The authorization credentials to attach to requests. These credentials identify this application to the service. If diff --git a/google/pubsub_v1/services/publisher/transports/grpc_asyncio.py b/google/pubsub_v1/services/publisher/transports/grpc_asyncio.py index 31ad368f8..c8945f8e3 100644 --- a/google/pubsub_v1/services/publisher/transports/grpc_asyncio.py +++ b/google/pubsub_v1/services/publisher/transports/grpc_asyncio.py @@ -195,6 +195,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -213,6 +217,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) # Run the base constructor. diff --git a/google/pubsub_v1/services/subscriber/transports/__init__.py b/google/pubsub_v1/services/subscriber/transports/__init__.py index 08282e11d..0246cfeca 100644 --- a/google/pubsub_v1/services/subscriber/transports/__init__.py +++ b/google/pubsub_v1/services/subscriber/transports/__init__.py @@ -28,7 +28,6 @@ _transport_registry["grpc"] = SubscriberGrpcTransport _transport_registry["grpc_asyncio"] = SubscriberGrpcAsyncIOTransport - __all__ = ( "SubscriberTransport", "SubscriberGrpcTransport", diff --git a/google/pubsub_v1/services/subscriber/transports/grpc.py b/google/pubsub_v1/services/subscriber/transports/grpc.py index 5b39bb1d6..7b86cb631 100644 --- a/google/pubsub_v1/services/subscriber/transports/grpc.py +++ b/google/pubsub_v1/services/subscriber/transports/grpc.py @@ -152,6 +152,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -170,6 +174,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._stubs = {} # type: Dict[str, Callable] @@ -196,7 +204,7 @@ def create_channel( ) -> grpc.Channel: """Create and return a gRPC channel object. Args: - address (Optionsl[str]): The host for the channel to use. + address (Optional[str]): The host for the channel to use. credentials (Optional[~.Credentials]): The authorization credentials to attach to requests. These credentials identify this application to the service. If diff --git a/google/pubsub_v1/services/subscriber/transports/grpc_asyncio.py b/google/pubsub_v1/services/subscriber/transports/grpc_asyncio.py index f64f1a18e..307391dc2 100644 --- a/google/pubsub_v1/services/subscriber/transports/grpc_asyncio.py +++ b/google/pubsub_v1/services/subscriber/transports/grpc_asyncio.py @@ -197,6 +197,10 @@ def __init__( ssl_credentials=ssl_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) self._ssl_channel_credentials = ssl_credentials else: @@ -215,6 +219,10 @@ def __init__( ssl_credentials=ssl_channel_credentials, scopes=scopes or self.AUTH_SCOPES, quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) # Run the base constructor. diff --git a/google/pubsub_v1/types/__init__.py b/google/pubsub_v1/types/__init__.py index 915c3f2e2..3b21183de 100644 --- a/google/pubsub_v1/types/__init__.py +++ b/google/pubsub_v1/types/__init__.py @@ -61,7 +61,6 @@ SeekResponse, ) - __all__ = ( "MessageStoragePolicy", "Topic", diff --git a/synth.metadata b/synth.metadata index 55b72e511..c5d8d4933 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "53eb2512a55caabcbad1898225080a2a3dfcb6aa", - "internalRef": "346818879" + "sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907", + "internalRef": "347055288" } }, { diff --git a/tests/unit/gapic/pubsub_v1/test_publisher.py b/tests/unit/gapic/pubsub_v1/test_publisher.py index e955e5b82..79fc0c60c 100644 --- a/tests/unit/gapic/pubsub_v1/test_publisher.py +++ b/tests/unit/gapic/pubsub_v1/test_publisher.py @@ -2672,6 +2672,10 @@ def test_publisher_transport_channel_mtls_with_client_cert_source(transport_clas ), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel assert transport._ssl_channel_credentials == mock_ssl_cred @@ -2713,6 +2717,10 @@ def test_publisher_transport_channel_mtls_with_adc(transport_class): ), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel diff --git a/tests/unit/gapic/pubsub_v1/test_subscriber.py b/tests/unit/gapic/pubsub_v1/test_subscriber.py index f837df651..184b54026 100644 --- a/tests/unit/gapic/pubsub_v1/test_subscriber.py +++ b/tests/unit/gapic/pubsub_v1/test_subscriber.py @@ -3966,6 +3966,10 @@ def test_subscriber_transport_channel_mtls_with_client_cert_source(transport_cla ), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel assert transport._ssl_channel_credentials == mock_ssl_cred @@ -4007,6 +4011,10 @@ def test_subscriber_transport_channel_mtls_with_adc(transport_class): ), ssl_credentials=mock_ssl_cred, quota_project_id=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], ) assert transport.grpc_channel == mock_grpc_channel From 392a00f1ea6d50833a74214d2e4ad578d14f3beb Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Wed, 16 Dec 2020 10:19:05 -0800 Subject: [PATCH 4/4] chore: Update client retry policy for streaming methods of the Google Ads API. PiperOrigin-RevId: 347398860 Source-Author: Google APIs Source-Date: Mon Dec 14 09:15:52 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: 0509f4bc8c86495f50a92f536bddc625797eda63 Source-Link: https://github.com/googleapis/googleapis/commit/0509f4bc8c86495f50a92f536bddc625797eda63 --- google/pubsub_v1/__init__.py | 4 ++-- synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/google/pubsub_v1/__init__.py b/google/pubsub_v1/__init__.py index 7ecad97ea..5e7a6cc72 100644 --- a/google/pubsub_v1/__init__.py +++ b/google/pubsub_v1/__init__.py @@ -90,7 +90,6 @@ "ModifyPushConfigRequest", "PublishRequest", "PublishResponse", - "PublisherClient", "PubsubMessage", "PullRequest", "PullResponse", @@ -102,10 +101,11 @@ "Snapshot", "StreamingPullRequest", "StreamingPullResponse", + "SubscriberClient", "Subscription", "Topic", "UpdateSnapshotRequest", "UpdateSubscriptionRequest", "UpdateTopicRequest", - "SubscriberClient", + "PublisherClient", ) diff --git a/synth.metadata b/synth.metadata index c5d8d4933..31f1bfd44 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907", - "internalRef": "347055288" + "sha": "0509f4bc8c86495f50a92f536bddc625797eda63", + "internalRef": "347398860" } }, {