Skip to content
Permalink
Browse files
chore: use gapic-generator-python 0.50.3 (#404)
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/1cb8ad84-81d7-41ae-80cc-f275d38cb08c/targets

- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)

PiperOrigin-RevId: 383459959
Source-Link: googleapis/googleapis@fe3cc5e
PiperOrigin-RevId: 382318016
Source-Link: googleapis/googleapis@e9b2b61
PiperOrigin-RevId: 382142900
Source-Link: googleapis/googleapis@513440f
PiperOrigin-RevId: 381898347
Source-Link: googleapis/googleapis@2bf1e2a
PiperOrigin-RevId: 380641501
Source-Link: googleapis/googleapis@076f7e9
PiperOrigin-RevId: 373649163
Source-Link: googleapis/googleapis@7e1b14e
PiperOrigin-RevId: 373400747
Source-Link: googleapis/googleapis@162641c
PiperOrigin-RevId: 372197450
Source-Link: googleapis/googleapis@83a7e1c
PiperOrigin-RevId: 371362703
Source-Link: googleapis/googleapis@5a04154
PiperOrigin-RevId: 370989216
Source-Link: googleapis/googleapis@4e82555
PiperOrigin-RevId: 370926454
Source-Link: googleapis/googleapis@382ed8d
PiperOrigin-RevId: 370525906
Source-Link: googleapis/googleapis@60e129d

This PR includes the following features/fixes:

fix: add async client to %name_%version/init.py
chore: add autogenerated snippets
chore: remove auth, policy, and options from the reserved names list
feat: support self-signed JWT flow for service accounts
chore: enable GAPIC metadata generation
chore: sort subpackages in %namespace/%name/init.py
feat: add always_use_jwt_access
fix: disable always_use_jwt_access
feat: add subscription properties to streaming pull response
feat: add method signature for Subscriber.Pull without the deprecated return_immediately field.
fix(deps): require google-api-core >= 1.26.0
fix(deps): add packaging requirement
  • Loading branch information
yoshi-automation committed Jul 18, 2021
1 parent 5c5fc9f commit 1f30ef7f26ae1156751bc42305b1eb156115b5e5
Showing with 2,815 additions and 2,418 deletions.
  1. +0 −1 .coveragerc
  2. +11 −1 google/cloud/pubsub_v1/proto/pubsub.proto
  3. +24 −24 google/pubsub/__init__.py
  4. +12 −7 google/pubsub_v1/__init__.py
  5. +361 −0 google/pubsub_v1/gapic_metadata.json
  6. +0 −1 google/pubsub_v1/services/__init__.py
  7. +0 −2 google/pubsub_v1/services/publisher/__init__.py
  8. +66 −78 google/pubsub_v1/services/publisher/async_client.py
  9. +71 −86 google/pubsub_v1/services/publisher/client.py
  10. +3 −5 google/pubsub_v1/services/publisher/pagers.py
  11. +0 −2 google/pubsub_v1/services/publisher/transports/__init__.py
  12. +133 −84 google/pubsub_v1/services/publisher/transports/base.py
  13. +30 −25 google/pubsub_v1/services/publisher/transports/grpc.py
  14. +30 −27 google/pubsub_v1/services/publisher/transports/grpc_asyncio.py
  15. +0 −2 google/pubsub_v1/services/schema_service/__init__.py
  16. +35 −48 google/pubsub_v1/services/schema_service/async_client.py
  17. +67 −74 google/pubsub_v1/services/schema_service/client.py
  18. +1 −3 google/pubsub_v1/services/schema_service/pagers.py
  19. +0 −2 google/pubsub_v1/services/schema_service/transports/__init__.py
  20. +96 −53 google/pubsub_v1/services/schema_service/transports/base.py
  21. +30 −25 google/pubsub_v1/services/schema_service/transports/grpc.py
  22. +30 −27 google/pubsub_v1/services/schema_service/transports/grpc_asyncio.py
  23. +0 −2 google/pubsub_v1/services/subscriber/__init__.py
  24. +87 −104 google/pubsub_v1/services/subscriber/async_client.py
  25. +73 −105 google/pubsub_v1/services/subscriber/client.py
  26. +2 −4 google/pubsub_v1/services/subscriber/pagers.py
  27. +0 −2 google/pubsub_v1/services/subscriber/transports/__init__.py
  28. +165 −109 google/pubsub_v1/services/subscriber/transports/base.py
  29. +40 −33 google/pubsub_v1/services/subscriber/transports/grpc.py
  30. +38 −35 google/pubsub_v1/services/subscriber/transports/grpc_asyncio.py
  31. +0 −2 google/pubsub_v1/types/__init__.py
  32. +125 −168 google/pubsub_v1/types/pubsub.py
  33. +16 −32 google/pubsub_v1/types/schema.py
  34. +32 −36 scripts/fixup_pubsub_v1_keywords.py
  35. +2 −1 setup.py
  36. +19 −127 synth.metadata
  37. +17 −1 synth.py
  38. +4 −3 testing/constraints-3.6.txt
  39. +15 −0 tests/__init__.py
  40. +15 −0 tests/unit/__init__.py
  41. +15 −0 tests/unit/gapic/__init__.py
  42. +0 −1 tests/unit/gapic/pubsub_v1/__init__.py
  43. +358 −331 tests/unit/gapic/pubsub_v1/test_publisher.py
  44. +373 −254 tests/unit/gapic/pubsub_v1/test_schema_service.py
  45. +419 −491 tests/unit/gapic/pubsub_v1/test_subscriber.py
@@ -2,7 +2,6 @@
branch = True

[report]
fail_under = 100
show_missing = True
omit =
google/cloud/__init__.py
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -505,6 +505,7 @@ service Subscriber {
};
option (google.api.method_signature) =
"subscription,return_immediately,max_messages";
option (google.api.method_signature) = "subscription,max_messages";
}

// Establishes a stream with the server, which sends messages down to the
@@ -1142,8 +1143,17 @@ message StreamingPullRequest {
// Response for the `StreamingPull` method. This response is used to stream
// messages from the server to the client.
message StreamingPullResponse {
// Subscription properties sent as part of the response.
message SubscriptionProperties {
// True iff message ordering is enabled for this subscription.
bool message_ordering_enabled = 2;
}

// Received Pub/Sub messages. This will not be empty.
repeated ReceivedMessage received_messages = 1;

// Properties associated with this subscription.
SubscriptionProperties subscription_properties = 4;
}

// Request for the `CreateSnapshot` method.
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,14 +14,15 @@
# limitations under the License.
#

from google.pubsub_v1.services.publisher.async_client import PublisherAsyncClient
from google.pubsub_v1.services.publisher.client import PublisherClient
from google.pubsub_v1.services.publisher.async_client import PublisherAsyncClient
from google.pubsub_v1.services.schema_service.client import SchemaServiceClient
from google.pubsub_v1.services.schema_service.async_client import (
SchemaServiceAsyncClient,
)
from google.pubsub_v1.services.schema_service.client import SchemaServiceClient
from google.pubsub_v1.services.subscriber.async_client import SubscriberAsyncClient
from google.pubsub_v1.services.subscriber.client import SubscriberClient
from google.pubsub_v1.services.subscriber.async_client import SubscriberAsyncClient

from google.pubsub_v1.types.pubsub import AcknowledgeRequest
from google.pubsub_v1.types.pubsub import CreateSnapshotRequest
from google.pubsub_v1.types.pubsub import DeadLetterPolicy
@@ -41,10 +41,10 @@
from google.pubsub_v1.types.pubsub import ListSubscriptionsResponse
from google.pubsub_v1.types.pubsub import ListTopicSnapshotsRequest
from google.pubsub_v1.types.pubsub import ListTopicSnapshotsResponse
from google.pubsub_v1.types.pubsub import ListTopicSubscriptionsRequest
from google.pubsub_v1.types.pubsub import ListTopicSubscriptionsResponse
from google.pubsub_v1.types.pubsub import ListTopicsRequest
from google.pubsub_v1.types.pubsub import ListTopicsResponse
from google.pubsub_v1.types.pubsub import ListTopicSubscriptionsRequest
from google.pubsub_v1.types.pubsub import ListTopicSubscriptionsResponse
from google.pubsub_v1.types.pubsub import MessageStoragePolicy
from google.pubsub_v1.types.pubsub import ModifyAckDeadlineRequest
from google.pubsub_v1.types.pubsub import ModifyPushConfigRequest
@@ -69,78 +69,78 @@
from google.pubsub_v1.types.pubsub import UpdateTopicRequest
from google.pubsub_v1.types.schema import CreateSchemaRequest
from google.pubsub_v1.types.schema import DeleteSchemaRequest
from google.pubsub_v1.types.schema import Encoding
from google.pubsub_v1.types.schema import GetSchemaRequest
from google.pubsub_v1.types.schema import ListSchemasRequest
from google.pubsub_v1.types.schema import ListSchemasResponse
from google.pubsub_v1.types.schema import Schema
from google.pubsub_v1.types.schema import SchemaView
from google.pubsub_v1.types.schema import ValidateMessageRequest
from google.pubsub_v1.types.schema import ValidateMessageResponse
from google.pubsub_v1.types.schema import ValidateSchemaRequest
from google.pubsub_v1.types.schema import ValidateSchemaResponse
from google.pubsub_v1.types.schema import Encoding
from google.pubsub_v1.types.schema import SchemaView

__all__ = (
"PublisherClient",
"PublisherAsyncClient",
"SchemaServiceClient",
"SchemaServiceAsyncClient",
"SubscriberClient",
"SubscriberAsyncClient",
"AcknowledgeRequest",
"CreateSchemaRequest",
"CreateSnapshotRequest",
"DeadLetterPolicy",
"DeleteSchemaRequest",
"DeleteSnapshotRequest",
"DeleteSubscriptionRequest",
"DeleteTopicRequest",
"DetachSubscriptionRequest",
"DetachSubscriptionResponse",
"Encoding",
"ExpirationPolicy",
"GetSchemaRequest",
"GetSnapshotRequest",
"GetSubscriptionRequest",
"GetTopicRequest",
"ListSchemasRequest",
"ListSchemasResponse",
"ListSnapshotsRequest",
"ListSnapshotsResponse",
"ListSubscriptionsRequest",
"ListSubscriptionsResponse",
"ListTopicSnapshotsRequest",
"ListTopicSnapshotsResponse",
"ListTopicSubscriptionsRequest",
"ListTopicSubscriptionsResponse",
"ListTopicsRequest",
"ListTopicsResponse",
"ListTopicSubscriptionsRequest",
"ListTopicSubscriptionsResponse",
"MessageStoragePolicy",
"ModifyAckDeadlineRequest",
"ModifyPushConfigRequest",
"PublishRequest",
"PublishResponse",
"PublisherAsyncClient",
"PublisherClient",
"PubsubMessage",
"PullRequest",
"PullResponse",
"PushConfig",
"ReceivedMessage",
"RetryPolicy",
"Schema",
"SchemaServiceAsyncClient",
"SchemaServiceClient",
"SchemaSettings",
"SchemaView",
"SeekRequest",
"SeekResponse",
"Snapshot",
"StreamingPullRequest",
"StreamingPullResponse",
"SubscriberAsyncClient",
"SubscriberClient",
"Subscription",
"Topic",
"UpdateSnapshotRequest",
"UpdateSubscriptionRequest",
"UpdateTopicRequest",
"CreateSchemaRequest",
"DeleteSchemaRequest",
"GetSchemaRequest",
"ListSchemasRequest",
"ListSchemasResponse",
"Schema",
"ValidateMessageRequest",
"ValidateMessageResponse",
"ValidateSchemaRequest",
"ValidateSchemaResponse",
"Encoding",
"SchemaView",
)
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,8 +15,12 @@
#

from .services.publisher import PublisherClient
from .services.publisher import PublisherAsyncClient
from .services.schema_service import SchemaServiceClient
from .services.schema_service import SchemaServiceAsyncClient
from .services.subscriber import SubscriberClient
from .services.subscriber import SubscriberAsyncClient

from .types.pubsub import AcknowledgeRequest
from .types.pubsub import CreateSnapshotRequest
from .types.pubsub import DeadLetterPolicy
@@ -36,10 +39,10 @@
from .types.pubsub import ListSubscriptionsResponse
from .types.pubsub import ListTopicSnapshotsRequest
from .types.pubsub import ListTopicSnapshotsResponse
from .types.pubsub import ListTopicSubscriptionsRequest
from .types.pubsub import ListTopicSubscriptionsResponse
from .types.pubsub import ListTopicsRequest
from .types.pubsub import ListTopicsResponse
from .types.pubsub import ListTopicSubscriptionsRequest
from .types.pubsub import ListTopicSubscriptionsResponse
from .types.pubsub import MessageStoragePolicy
from .types.pubsub import ModifyAckDeadlineRequest
from .types.pubsub import ModifyPushConfigRequest
@@ -64,19 +67,21 @@
from .types.pubsub import UpdateTopicRequest
from .types.schema import CreateSchemaRequest
from .types.schema import DeleteSchemaRequest
from .types.schema import Encoding
from .types.schema import GetSchemaRequest
from .types.schema import ListSchemasRequest
from .types.schema import ListSchemasResponse
from .types.schema import Schema
from .types.schema import SchemaView
from .types.schema import ValidateMessageRequest
from .types.schema import ValidateMessageResponse
from .types.schema import ValidateSchemaRequest
from .types.schema import ValidateSchemaResponse

from .types.schema import Encoding
from .types.schema import SchemaView

__all__ = (
"PublisherAsyncClient",
"SchemaServiceAsyncClient",
"SubscriberAsyncClient",
"AcknowledgeRequest",
"CreateSchemaRequest",
"CreateSnapshotRequest",
@@ -110,6 +115,7 @@
"ModifyPushConfigRequest",
"PublishRequest",
"PublishResponse",
"PublisherClient",
"PubsubMessage",
"PullRequest",
"PullResponse",
@@ -135,5 +141,4 @@
"ValidateMessageResponse",
"ValidateSchemaRequest",
"ValidateSchemaResponse",
"PublisherClient",
)
Loading

0 comments on commit 1f30ef7

Please sign in to comment.