diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e51d046b..bee47555 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,4 +1,4 @@ { - ".": "2.20.2" + ".": "2.20.3" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index dd6bc4bb..01740166 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://pypi.org/project/google-cloud-pubsub/#history +## [2.20.3](https://github.com/googleapis/python-pubsub/compare/v2.20.2...v2.20.3) (2024-03-21) + + +### Documentation + +* **samples:** Update Region Tags ([#1128](https://github.com/googleapis/python-pubsub/issues/1128)) ([e3bc89e](https://github.com/googleapis/python-pubsub/commit/e3bc89eaa51337c93144d6c3100486353d494ad9)) + ## [2.20.2](https://github.com/googleapis/python-pubsub/compare/v2.20.1...v2.20.2) (2024-03-15) diff --git a/google/pubsub/gapic_version.py b/google/pubsub/gapic_version.py index 4c1787c5..12b6c6e0 100644 --- a/google/pubsub/gapic_version.py +++ b/google/pubsub/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.20.2" # {x-release-please-version} +__version__ = "2.20.3" # {x-release-please-version} diff --git a/google/pubsub_v1/gapic_version.py b/google/pubsub_v1/gapic_version.py index 4c1787c5..12b6c6e0 100644 --- a/google/pubsub_v1/gapic_version.py +++ b/google/pubsub_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.20.2" # {x-release-please-version} +__version__ = "2.20.3" # {x-release-please-version} diff --git a/samples/generated_samples/snippet_metadata_google.pubsub.v1.json b/samples/generated_samples/snippet_metadata_google.pubsub.v1.json index 11e0f952..2611ce81 100644 --- a/samples/generated_samples/snippet_metadata_google.pubsub.v1.json +++ b/samples/generated_samples/snippet_metadata_google.pubsub.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-pubsub", - "version": "2.20.2" + "version": "2.20.3" }, "snippets": [ { diff --git a/samples/snippets/publisher.py b/samples/snippets/publisher.py index 6453762a..73afc8c9 100644 --- a/samples/snippets/publisher.py +++ b/samples/snippets/publisher.py @@ -60,7 +60,7 @@ def create_topic(project_id: str, topic_id: str) -> None: # [END pubsub_create_topic] -def create_topic_kinesis_ingestion( +def create_topic_with_kinesis_ingestion( project_id: str, topic_id: str, stream_arn: str, @@ -69,7 +69,7 @@ def create_topic_kinesis_ingestion( gcp_service_account: str, ) -> None: """Create a new Pub/Sub topic with AWS Kinesis Ingestion Settings.""" - # [START pubsub_create_topic_kinesis_ingestion] + # [START pubsub_create_topic_with_kinesis_ingestion] from google.cloud import pubsub_v1 from google.pubsub_v1.types import Topic from google.pubsub_v1.types import IngestionDataSourceSettings @@ -100,10 +100,10 @@ def create_topic_kinesis_ingestion( topic = publisher.create_topic(request=request) print(f"Created topic: {topic.name} with AWS Kinesis Ingestion Settings") - # [END pubsub_create_topic_kinesis_ingestion] + # [END pubsub_create_topic_with_kinesis_ingestion] -def update_topic_kinesis_ingestion( +def update_topic_type( project_id: str, topic_id: str, stream_arn: str, @@ -112,7 +112,7 @@ def update_topic_kinesis_ingestion( gcp_service_account: str, ) -> None: """Update Pub/Sub topic with AWS Kinesis Ingestion Settings.""" - # [START pubsub_update_topic_kinesis_ingestion] + # [START pubsub_update_topic_type] from google.cloud import pubsub_v1 from google.pubsub_v1.types import Topic from google.pubsub_v1.types import IngestionDataSourceSettings @@ -149,7 +149,7 @@ def update_topic_kinesis_ingestion( print(f"Updated topic: {topic.name} with AWS Kinesis Ingestion Settings") -# [END pubsub_update_topic_kinesis_ingestion] +# [END pubsub_update_topic_type] def delete_topic(project_id: str, topic_id: str) -> None: @@ -522,23 +522,23 @@ def detach_subscription(project_id: str, subscription_id: str) -> None: create_parser = subparsers.add_parser("create", help=create_topic.__doc__) create_parser.add_argument("topic_id") - create_topic_kinesis_ingestion_parser = subparsers.add_parser( - "create_kinesis_ingestion", help=create_topic_kinesis_ingestion.__doc__ + create_topic_with_kinesis_ingestion_parser = subparsers.add_parser( + "create_kinesis_ingestion", help=create_topic_with_kinesis_ingestion.__doc__ ) - create_topic_kinesis_ingestion_parser.add_argument("topic_id") - create_topic_kinesis_ingestion_parser.add_argument("stream_arn") - create_topic_kinesis_ingestion_parser.add_argument("consumer_arn") - create_topic_kinesis_ingestion_parser.add_argument("aws_role_arn") - create_topic_kinesis_ingestion_parser.add_argument("gcp_service_account") - - update_topic_kinesis_ingestion_parser = subparsers.add_parser( - "update_kinesis_ingestion", help=update_topic_kinesis_ingestion.__doc__ + create_topic_with_kinesis_ingestion_parser.add_argument("topic_id") + create_topic_with_kinesis_ingestion_parser.add_argument("stream_arn") + create_topic_with_kinesis_ingestion_parser.add_argument("consumer_arn") + create_topic_with_kinesis_ingestion_parser.add_argument("aws_role_arn") + create_topic_with_kinesis_ingestion_parser.add_argument("gcp_service_account") + + update_topic_type_parser = subparsers.add_parser( + "update_kinesis_ingestion", help=update_topic_type.__doc__ ) - update_topic_kinesis_ingestion_parser.add_argument("topic_id") - update_topic_kinesis_ingestion_parser.add_argument("stream_arn") - update_topic_kinesis_ingestion_parser.add_argument("consumer_arn") - update_topic_kinesis_ingestion_parser.add_argument("aws_role_arn") - update_topic_kinesis_ingestion_parser.add_argument("gcp_service_account") + update_topic_type_parser.add_argument("topic_id") + update_topic_type_parser.add_argument("stream_arn") + update_topic_type_parser.add_argument("consumer_arn") + update_topic_type_parser.add_argument("aws_role_arn") + update_topic_type_parser.add_argument("gcp_service_account") delete_parser = subparsers.add_parser("delete", help=delete_topic.__doc__) delete_parser.add_argument("topic_id") @@ -601,7 +601,7 @@ def detach_subscription(project_id: str, subscription_id: str) -> None: elif args.command == "create": create_topic(args.project_id, args.topic_id) elif args.command == "create_kinesis_ingestion": - create_topic_kinesis_ingestion( + create_topic_with_kinesis_ingestion( args.project_id, args.topic_id, args.stream_arn, @@ -610,7 +610,7 @@ def detach_subscription(project_id: str, subscription_id: str) -> None: args.gcp_service_account, ) elif args.command == "update_kinesis_ingestion": - update_topic_kinesis_ingestion( + update_topic_type( args.project_id, args.topic_id, args.stream_arn, diff --git a/samples/snippets/publisher_test.py b/samples/snippets/publisher_test.py index 1e673f13..adb015e8 100644 --- a/samples/snippets/publisher_test.py +++ b/samples/snippets/publisher_test.py @@ -127,7 +127,7 @@ def test_create( publisher_client.delete_topic(request={"topic": topic_path}) -def test_create_kinesis_ingestion( +def test_create_topic_with_kinesis_ingestion( publisher_client: pubsub_v1.PublisherClient, capsys: CaptureFixture[str] ) -> None: # The scope of `topic_path` is limited to this function. @@ -146,7 +146,7 @@ def test_create_kinesis_ingestion( except NotFound: pass - publisher.create_topic_kinesis_ingestion( + publisher.create_topic_with_kinesis_ingestion( PROJECT_ID, TOPIC_ID, stream_arn, @@ -162,7 +162,7 @@ def test_create_kinesis_ingestion( publisher_client.delete_topic(request={"topic": topic_path}) -def test_update_kinesis_ingestion( +def test_update_topic_type( publisher_client: pubsub_v1.PublisherClient, capsys: CaptureFixture[str] ) -> None: # The scope of `topic_path` is limited to this function. @@ -186,7 +186,7 @@ def test_update_kinesis_ingestion( out, _ = capsys.readouterr() assert f"Created topic: {topic_path}" in out - publisher.update_topic_kinesis_ingestion( + publisher.update_topic_type( PROJECT_ID, TOPIC_ID, stream_arn,