google-cloud-pubsub 2.32.0__tar.gz → 2.34.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. {google_cloud_pubsub-2.32.0/google_cloud_pubsub.egg-info → google_cloud_pubsub-2.34.0}/PKG-INFO +1 -1
  2. google_cloud_pubsub-2.34.0/google/pubsub/gapic_version.py +16 -0
  3. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/__init__.py +104 -0
  4. google_cloud_pubsub-2.34.0/google/pubsub_v1/gapic_version.py +16 -0
  5. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/publisher/async_client.py +4 -0
  6. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/publisher/client.py +73 -14
  7. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/publisher/transports/base.py +3 -2
  8. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/publisher/transports/grpc.py +5 -3
  9. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/publisher/transports/grpc_asyncio.py +5 -3
  10. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/publisher/transports/rest.py +3 -2
  11. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/schema_service/client.py +32 -14
  12. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/schema_service/transports/base.py +3 -2
  13. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/schema_service/transports/grpc.py +5 -3
  14. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/schema_service/transports/grpc_asyncio.py +5 -3
  15. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/schema_service/transports/rest.py +3 -2
  16. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/subscriber/async_client.py +2 -0
  17. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/subscriber/client.py +56 -14
  18. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/subscriber/transports/base.py +3 -2
  19. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/subscriber/transports/grpc.py +5 -3
  20. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/subscriber/transports/grpc_asyncio.py +5 -3
  21. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/subscriber/transports/rest.py +3 -2
  22. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/types/pubsub.py +50 -2
  23. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0/google_cloud_pubsub.egg-info}/PKG-INFO +1 -1
  24. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google_cloud_pubsub.egg-info/SOURCES.txt +0 -1
  25. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/setup.py +4 -1
  26. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/gapic/pubsub_v1/test_publisher.py +282 -33
  27. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/gapic/pubsub_v1/test_schema_service.py +226 -29
  28. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/gapic/pubsub_v1/test_subscriber.py +279 -53
  29. google_cloud_pubsub-2.32.0/google/pubsub/gapic_version.py +0 -16
  30. google_cloud_pubsub-2.32.0/google/pubsub_v1/gapic_version.py +0 -16
  31. google_cloud_pubsub-2.32.0/scripts/fixup_pubsub_v1_keywords.py +0 -210
  32. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/LICENSE +0 -0
  33. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/MANIFEST.in +0 -0
  34. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/README.rst +0 -0
  35. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub/__init__.py +0 -0
  36. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/__init__.py +0 -0
  37. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/exceptions.py +0 -0
  38. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/futures.py +0 -0
  39. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/open_telemetry/__init__.py +0 -0
  40. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/open_telemetry/context_propagation.py +0 -0
  41. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/open_telemetry/publish_message_wrapper.py +0 -0
  42. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/open_telemetry/subscribe_opentelemetry.py +0 -0
  43. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/proto/pubsub.proto +0 -0
  44. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/proto/schema.proto +0 -0
  45. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/publisher/__init__.py +0 -0
  46. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/publisher/_batch/__init__.py +0 -0
  47. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/publisher/_batch/base.py +0 -0
  48. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/publisher/_batch/thread.py +0 -0
  49. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/publisher/_sequencer/__init__.py +0 -0
  50. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/publisher/_sequencer/base.py +0 -0
  51. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/publisher/_sequencer/ordered_sequencer.py +0 -0
  52. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/publisher/_sequencer/unordered_sequencer.py +0 -0
  53. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/publisher/client.py +0 -0
  54. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/publisher/exceptions.py +0 -0
  55. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/publisher/flow_controller.py +0 -0
  56. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/publisher/futures.py +0 -0
  57. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/subscriber/__init__.py +0 -0
  58. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/subscriber/_protocol/__init__.py +0 -0
  59. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/subscriber/_protocol/dispatcher.py +0 -0
  60. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/subscriber/_protocol/heartbeater.py +0 -0
  61. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/subscriber/_protocol/helper_threads.py +0 -0
  62. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/subscriber/_protocol/histogram.py +0 -0
  63. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/subscriber/_protocol/leaser.py +0 -0
  64. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/subscriber/_protocol/messages_on_hold.py +0 -0
  65. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/subscriber/_protocol/requests.py +0 -0
  66. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py +0 -0
  67. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/subscriber/client.py +0 -0
  68. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/subscriber/exceptions.py +0 -0
  69. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/subscriber/futures.py +0 -0
  70. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/subscriber/message.py +0 -0
  71. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/subscriber/scheduler.py +0 -0
  72. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/cloud/pubsub_v1/types.py +0 -0
  73. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub/__init__.py +0 -0
  74. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub/py.typed +0 -0
  75. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/gapic_metadata.json +0 -0
  76. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/py.typed +0 -0
  77. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/__init__.py +0 -0
  78. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/publisher/__init__.py +0 -0
  79. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/publisher/pagers.py +0 -0
  80. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/publisher/transports/__init__.py +0 -0
  81. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/publisher/transports/rest_base.py +0 -0
  82. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/schema_service/__init__.py +0 -0
  83. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/schema_service/async_client.py +0 -0
  84. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/schema_service/pagers.py +0 -0
  85. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/schema_service/transports/__init__.py +0 -0
  86. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/schema_service/transports/rest_base.py +0 -0
  87. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/subscriber/__init__.py +0 -0
  88. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/subscriber/pagers.py +0 -0
  89. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/subscriber/transports/__init__.py +0 -0
  90. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/services/subscriber/transports/rest_base.py +0 -0
  91. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/types/__init__.py +0 -0
  92. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google/pubsub_v1/types/schema.py +0 -0
  93. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google_cloud_pubsub.egg-info/dependency_links.txt +0 -0
  94. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google_cloud_pubsub.egg-info/not-zip-safe +0 -0
  95. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google_cloud_pubsub.egg-info/requires.txt +0 -0
  96. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/google_cloud_pubsub.egg-info/top_level.txt +0 -0
  97. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/setup.cfg +0 -0
  98. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/__init__.py +0 -0
  99. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/system.py +0 -0
  100. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/__init__.py +0 -0
  101. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/gapic/__init__.py +0 -0
  102. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/gapic/pubsub_v1/__init__.py +0 -0
  103. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/conftest.py +0 -0
  104. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/publisher/batch/test_base.py +0 -0
  105. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/publisher/batch/test_thread.py +0 -0
  106. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/publisher/sequencer/test_ordered_sequencer.py +0 -0
  107. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/publisher/sequencer/test_unordered_sequencer.py +0 -0
  108. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/publisher/test_flow_controller.py +0 -0
  109. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/publisher/test_futures_publisher.py +0 -0
  110. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/publisher/test_publish_message_wrapper.py +0 -0
  111. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/publisher/test_publisher_client.py +0 -0
  112. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/subscriber/test_dispatcher.py +0 -0
  113. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/subscriber/test_futures_subscriber.py +0 -0
  114. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/subscriber/test_heartbeater.py +0 -0
  115. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/subscriber/test_helper_threads.py +0 -0
  116. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/subscriber/test_histogram.py +0 -0
  117. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/subscriber/test_leaser.py +0 -0
  118. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/subscriber/test_message.py +0 -0
  119. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/subscriber/test_messages_on_hold.py +0 -0
  120. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/subscriber/test_scheduler.py +0 -0
  121. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/subscriber/test_streaming_pull_manager.py +0 -0
  122. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/subscriber/test_subscribe_opentelemetry.py +0 -0
  123. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/subscriber/test_subscriber_client.py +0 -0
  124. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/pubsub_v1/test_futures.py +0 -0
  125. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/test_packaging.py +0 -0
  126. {google_cloud_pubsub-2.32.0 → google_cloud_pubsub-2.34.0}/tests/unit/test_pubsub.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-cloud-pubsub
3
- Version: 2.32.0
3
+ Version: 2.34.0
4
4
  Summary: Google Cloud Pub/Sub API client library
5
5
  Home-page: https://github.com/googleapis/python-pubsub
6
6
  Author: Google LLC
@@ -0,0 +1,16 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2025 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ __version__ = "2.34.0" # {x-release-please-version}
@@ -15,8 +15,18 @@
15
15
  #
16
16
  from google.pubsub_v1 import gapic_version as package_version
17
17
 
18
+ import google.api_core as api_core
19
+ import sys
20
+
18
21
  __version__ = package_version.__version__
19
22
 
23
+ if sys.version_info >= (3, 8): # pragma: NO COVER
24
+ from importlib import metadata
25
+ else: # pragma: NO COVER
26
+ # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove
27
+ # this code path once we drop support for Python 3.7
28
+ import importlib_metadata as metadata
29
+
20
30
 
21
31
  from .services.publisher import PublisherClient
22
32
  from .services.publisher import PublisherAsyncClient
@@ -94,6 +104,100 @@ from .types.schema import ValidateSchemaResponse
94
104
  from .types.schema import Encoding
95
105
  from .types.schema import SchemaView
96
106
 
107
+ if hasattr(api_core, "check_python_version") and hasattr(
108
+ api_core, "check_dependency_versions"
109
+ ): # pragma: NO COVER
110
+ api_core.check_python_version("google.pubsub_v1") # type: ignore
111
+ api_core.check_dependency_versions("google.pubsub_v1") # type: ignore
112
+ else: # pragma: NO COVER
113
+ # An older version of api_core is installed which does not define the
114
+ # functions above. We do equivalent checks manually.
115
+ try:
116
+ import warnings
117
+ import sys
118
+
119
+ _py_version_str = sys.version.split()[0]
120
+ _package_label = "google.pubsub_v1"
121
+ if sys.version_info < (3, 9):
122
+ warnings.warn(
123
+ "You are using a non-supported Python version "
124
+ + f"({_py_version_str}). Google will not post any further "
125
+ + f"updates to {_package_label} supporting this Python version. "
126
+ + "Please upgrade to the latest Python version, or at "
127
+ + f"least to Python 3.9, and then update {_package_label}.",
128
+ FutureWarning,
129
+ )
130
+ if sys.version_info[:2] == (3, 9):
131
+ warnings.warn(
132
+ f"You are using a Python version ({_py_version_str}) "
133
+ + f"which Google will stop supporting in {_package_label} in "
134
+ + "January 2026. Please "
135
+ + "upgrade to the latest Python version, or at "
136
+ + "least to Python 3.10, before then, and "
137
+ + f"then update {_package_label}.",
138
+ FutureWarning,
139
+ )
140
+
141
+ def parse_version_to_tuple(version_string: str):
142
+ """Safely converts a semantic version string to a comparable tuple of integers.
143
+ Example: "4.25.8" -> (4, 25, 8)
144
+ Ignores non-numeric parts and handles common version formats.
145
+ Args:
146
+ version_string: Version string in the format "x.y.z" or "x.y.z<suffix>"
147
+ Returns:
148
+ Tuple of integers for the parsed version string.
149
+ """
150
+ parts = []
151
+ for part in version_string.split("."):
152
+ try:
153
+ parts.append(int(part))
154
+ except ValueError:
155
+ # If it's a non-numeric part (e.g., '1.0.0b1' -> 'b1'), stop here.
156
+ # This is a simplification compared to 'packaging.parse_version', but sufficient
157
+ # for comparing strictly numeric semantic versions.
158
+ break
159
+ return tuple(parts)
160
+
161
+ def _get_version(dependency_name):
162
+ try:
163
+ version_string: str = metadata.version(dependency_name)
164
+ parsed_version = parse_version_to_tuple(version_string)
165
+ return (parsed_version, version_string)
166
+ except Exception:
167
+ # Catch exceptions from metadata.version() (e.g., PackageNotFoundError)
168
+ # or errors during parse_version_to_tuple
169
+ return (None, "--")
170
+
171
+ _dependency_package = "google.protobuf"
172
+ _next_supported_version = "4.25.8"
173
+ _next_supported_version_tuple = (4, 25, 8)
174
+ _recommendation = " (we recommend 6.x)"
175
+ (_version_used, _version_used_string) = _get_version(_dependency_package)
176
+ if _version_used and _version_used < _next_supported_version_tuple:
177
+ warnings.warn(
178
+ f"Package {_package_label} depends on "
179
+ + f"{_dependency_package}, currently installed at version "
180
+ + f"{_version_used_string}. Future updates to "
181
+ + f"{_package_label} will require {_dependency_package} at "
182
+ + f"version {_next_supported_version} or higher{_recommendation}."
183
+ + " Please ensure "
184
+ + "that either (a) your Python environment doesn't pin the "
185
+ + f"version of {_dependency_package}, so that updates to "
186
+ + f"{_package_label} can require the higher version, or "
187
+ + "(b) you manually update your Python environment to use at "
188
+ + f"least version {_next_supported_version} of "
189
+ + f"{_dependency_package}.",
190
+ FutureWarning,
191
+ )
192
+ except Exception:
193
+ warnings.warn(
194
+ "Could not determine the version of Python "
195
+ + "currently being used. To continue receiving "
196
+ + "updates for {_package_label}, ensure you are "
197
+ + "using a supported version of Python; see "
198
+ + "https://devguide.python.org/versions/"
199
+ )
200
+
97
201
  __all__ = (
98
202
  "PublisherAsyncClient",
99
203
  "SchemaServiceAsyncClient",
@@ -0,0 +1,16 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2025 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ __version__ = "2.34.0" # {x-release-please-version}
@@ -80,8 +80,12 @@ class PublisherAsyncClient:
80
80
  _DEFAULT_ENDPOINT_TEMPLATE = PublisherClient._DEFAULT_ENDPOINT_TEMPLATE
81
81
  _DEFAULT_UNIVERSE = PublisherClient._DEFAULT_UNIVERSE
82
82
 
83
+ crypto_key_path = staticmethod(PublisherClient.crypto_key_path)
84
+ parse_crypto_key_path = staticmethod(PublisherClient.parse_crypto_key_path)
83
85
  schema_path = staticmethod(PublisherClient.schema_path)
84
86
  parse_schema_path = staticmethod(PublisherClient.parse_schema_path)
87
+ snapshot_path = staticmethod(PublisherClient.snapshot_path)
88
+ parse_snapshot_path = staticmethod(PublisherClient.parse_snapshot_path)
85
89
  subscription_path = staticmethod(PublisherClient.subscription_path)
86
90
  parse_subscription_path = staticmethod(PublisherClient.parse_subscription_path)
87
91
  topic_path = staticmethod(PublisherClient.topic_path)
@@ -168,6 +168,34 @@ class PublisherClient(metaclass=PublisherClientMeta):
168
168
  _DEFAULT_ENDPOINT_TEMPLATE = "pubsub.{UNIVERSE_DOMAIN}"
169
169
  _DEFAULT_UNIVERSE = "googleapis.com"
170
170
 
171
+ @staticmethod
172
+ def _use_client_cert_effective():
173
+ """Returns whether client certificate should be used for mTLS if the
174
+ google-auth version supports should_use_client_cert automatic mTLS enablement.
175
+
176
+ Alternatively, read from the GOOGLE_API_USE_CLIENT_CERTIFICATE env var.
177
+
178
+ Returns:
179
+ bool: whether client certificate should be used for mTLS
180
+ Raises:
181
+ ValueError: (If using a version of google-auth without should_use_client_cert and
182
+ GOOGLE_API_USE_CLIENT_CERTIFICATE is set to an unexpected value.)
183
+ """
184
+ # check if google-auth version supports should_use_client_cert for automatic mTLS enablement
185
+ if hasattr(mtls, "should_use_client_cert"): # pragma: NO COVER
186
+ return mtls.should_use_client_cert()
187
+ else: # pragma: NO COVER
188
+ # if unsupported, fallback to reading from env var
189
+ use_client_cert_str = os.getenv(
190
+ "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"
191
+ ).lower()
192
+ if use_client_cert_str not in ("true", "false"):
193
+ raise ValueError(
194
+ "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be"
195
+ " either `true` or `false`"
196
+ )
197
+ return use_client_cert_str == "true"
198
+
171
199
  @classmethod
172
200
  def from_service_account_info(cls, info: dict, *args, **kwargs):
173
201
  """Creates an instance of this client using the provided credentials
@@ -215,6 +243,30 @@ class PublisherClient(metaclass=PublisherClientMeta):
215
243
  """
216
244
  return self._transport
217
245
 
246
+ @staticmethod
247
+ def crypto_key_path(
248
+ project: str,
249
+ location: str,
250
+ key_ring: str,
251
+ crypto_key: str,
252
+ ) -> str:
253
+ """Returns a fully-qualified crypto_key string."""
254
+ return "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}".format(
255
+ project=project,
256
+ location=location,
257
+ key_ring=key_ring,
258
+ crypto_key=crypto_key,
259
+ )
260
+
261
+ @staticmethod
262
+ def parse_crypto_key_path(path: str) -> Dict[str, str]:
263
+ """Parses a crypto_key path into its component segments."""
264
+ m = re.match(
265
+ r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/keyRings/(?P<key_ring>.+?)/cryptoKeys/(?P<crypto_key>.+?)$",
266
+ path,
267
+ )
268
+ return m.groupdict() if m else {}
269
+
218
270
  @staticmethod
219
271
  def schema_path(
220
272
  project: str,
@@ -232,6 +284,23 @@ class PublisherClient(metaclass=PublisherClientMeta):
232
284
  m = re.match(r"^projects/(?P<project>.+?)/schemas/(?P<schema>.+?)$", path)
233
285
  return m.groupdict() if m else {}
234
286
 
287
+ @staticmethod
288
+ def snapshot_path(
289
+ project: str,
290
+ snapshot: str,
291
+ ) -> str:
292
+ """Returns a fully-qualified snapshot string."""
293
+ return "projects/{project}/snapshots/{snapshot}".format(
294
+ project=project,
295
+ snapshot=snapshot,
296
+ )
297
+
298
+ @staticmethod
299
+ def parse_snapshot_path(path: str) -> Dict[str, str]:
300
+ """Parses a snapshot path into its component segments."""
301
+ m = re.match(r"^projects/(?P<project>.+?)/snapshots/(?P<snapshot>.+?)$", path)
302
+ return m.groupdict() if m else {}
303
+
235
304
  @staticmethod
236
305
  def subscription_path(
237
306
  project: str,
@@ -386,12 +455,8 @@ class PublisherClient(metaclass=PublisherClientMeta):
386
455
  )
387
456
  if client_options is None:
388
457
  client_options = client_options_lib.ClientOptions()
389
- use_client_cert = os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false")
458
+ use_client_cert = PublisherClient._use_client_cert_effective()
390
459
  use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto")
391
- if use_client_cert not in ("true", "false"):
392
- raise ValueError(
393
- "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`"
394
- )
395
460
  if use_mtls_endpoint not in ("auto", "never", "always"):
396
461
  raise MutualTLSChannelError(
397
462
  "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`"
@@ -399,7 +464,7 @@ class PublisherClient(metaclass=PublisherClientMeta):
399
464
 
400
465
  # Figure out the client cert source to use.
401
466
  client_cert_source = None
402
- if use_client_cert == "true":
467
+ if use_client_cert:
403
468
  if client_options.client_cert_source:
404
469
  client_cert_source = client_options.client_cert_source
405
470
  elif mtls.has_default_client_cert_source():
@@ -431,20 +496,14 @@ class PublisherClient(metaclass=PublisherClientMeta):
431
496
  google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT
432
497
  is not any of ["auto", "never", "always"].
433
498
  """
434
- use_client_cert = os.getenv(
435
- "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"
436
- ).lower()
499
+ use_client_cert = PublisherClient._use_client_cert_effective()
437
500
  use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower()
438
501
  universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN")
439
- if use_client_cert not in ("true", "false"):
440
- raise ValueError(
441
- "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`"
442
- )
443
502
  if use_mtls_endpoint not in ("auto", "never", "always"):
444
503
  raise MutualTLSChannelError(
445
504
  "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`"
446
505
  )
447
- return use_client_cert == "true", use_mtls_endpoint, universe_domain_env
506
+ return use_client_cert, use_mtls_endpoint, universe_domain_env
448
507
 
449
508
  @staticmethod
450
509
  def _get_client_cert_source(provided_cert_source, use_cert_flag):
@@ -73,9 +73,10 @@ class PublisherTransport(abc.ABC):
73
73
  credentials identify the application to the service; if none
74
74
  are specified, the client will attempt to ascertain the
75
75
  credentials from the environment.
76
- credentials_file (Optional[str]): A file with credentials that can
76
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
77
77
  be loaded with :func:`google.auth.load_credentials_from_file`.
78
- This argument is mutually exclusive with credentials.
78
+ This argument is mutually exclusive with credentials. This argument will be
79
+ removed in the next major version of this library.
79
80
  scopes (Optional[Sequence[str]]): A list of scopes.
80
81
  quota_project_id (Optional[str]): An optional project to use for billing
81
82
  and quota.
@@ -155,9 +155,10 @@ class PublisherGrpcTransport(PublisherTransport):
155
155
  are specified, the client will attempt to ascertain the
156
156
  credentials from the environment.
157
157
  This argument is ignored if a ``channel`` instance is provided.
158
- credentials_file (Optional[str]): A file with credentials that can
158
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
159
159
  be loaded with :func:`google.auth.load_credentials_from_file`.
160
160
  This argument is ignored if a ``channel`` instance is provided.
161
+ This argument will be removed in the next major version of this library.
161
162
  scopes (Optional(Sequence[str])): A list of scopes. This argument is
162
163
  ignored if a ``channel`` instance is provided.
163
164
  channel (Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]]):
@@ -292,9 +293,10 @@ class PublisherGrpcTransport(PublisherTransport):
292
293
  credentials identify this application to the service. If
293
294
  none are specified, the client will attempt to ascertain
294
295
  the credentials from the environment.
295
- credentials_file (Optional[str]): A file with credentials that can
296
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
296
297
  be loaded with :func:`google.auth.load_credentials_from_file`.
297
- This argument is mutually exclusive with credentials.
298
+ This argument is mutually exclusive with credentials. This argument will be
299
+ removed in the next major version of this library.
298
300
  scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
299
301
  service. These are only used when credentials are not specified and
300
302
  are passed to :func:`google.auth.default`.
@@ -152,8 +152,9 @@ class PublisherGrpcAsyncIOTransport(PublisherTransport):
152
152
  credentials identify this application to the service. If
153
153
  none are specified, the client will attempt to ascertain
154
154
  the credentials from the environment.
155
- credentials_file (Optional[str]): A file with credentials that can
156
- be loaded with :func:`google.auth.load_credentials_from_file`.
155
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
156
+ be loaded with :func:`google.auth.load_credentials_from_file`. This argument will be
157
+ removed in the next major version of this library.
157
158
  scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
158
159
  service. These are only used when credentials are not specified and
159
160
  are passed to :func:`google.auth.default`.
@@ -204,9 +205,10 @@ class PublisherGrpcAsyncIOTransport(PublisherTransport):
204
205
  are specified, the client will attempt to ascertain the
205
206
  credentials from the environment.
206
207
  This argument is ignored if a ``channel`` instance is provided.
207
- credentials_file (Optional[str]): A file with credentials that can
208
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
208
209
  be loaded with :func:`google.auth.load_credentials_from_file`.
209
210
  This argument is ignored if a ``channel`` instance is provided.
211
+ This argument will be removed in the next major version of this library.
210
212
  scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
211
213
  service. These are only used when credentials are not specified and
212
214
  are passed to :func:`google.auth.default`.
@@ -650,9 +650,10 @@ class PublisherRestTransport(_BasePublisherRestTransport):
650
650
  are specified, the client will attempt to ascertain the
651
651
  credentials from the environment.
652
652
 
653
- credentials_file (Optional[str]): A file with credentials that can
653
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
654
654
  be loaded with :func:`google.auth.load_credentials_from_file`.
655
- This argument is ignored if ``channel`` is provided.
655
+ This argument is ignored if ``channel`` is provided. This argument will be
656
+ removed in the next major version of this library.
656
657
  scopes (Optional(Sequence[str])): A list of scopes. This argument is
657
658
  ignored if ``channel`` is provided.
658
659
  client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client
@@ -153,6 +153,34 @@ class SchemaServiceClient(metaclass=SchemaServiceClientMeta):
153
153
  _DEFAULT_ENDPOINT_TEMPLATE = "pubsub.{UNIVERSE_DOMAIN}"
154
154
  _DEFAULT_UNIVERSE = "googleapis.com"
155
155
 
156
+ @staticmethod
157
+ def _use_client_cert_effective():
158
+ """Returns whether client certificate should be used for mTLS if the
159
+ google-auth version supports should_use_client_cert automatic mTLS enablement.
160
+
161
+ Alternatively, read from the GOOGLE_API_USE_CLIENT_CERTIFICATE env var.
162
+
163
+ Returns:
164
+ bool: whether client certificate should be used for mTLS
165
+ Raises:
166
+ ValueError: (If using a version of google-auth without should_use_client_cert and
167
+ GOOGLE_API_USE_CLIENT_CERTIFICATE is set to an unexpected value.)
168
+ """
169
+ # check if google-auth version supports should_use_client_cert for automatic mTLS enablement
170
+ if hasattr(mtls, "should_use_client_cert"): # pragma: NO COVER
171
+ return mtls.should_use_client_cert()
172
+ else: # pragma: NO COVER
173
+ # if unsupported, fallback to reading from env var
174
+ use_client_cert_str = os.getenv(
175
+ "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"
176
+ ).lower()
177
+ if use_client_cert_str not in ("true", "false"):
178
+ raise ValueError(
179
+ "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be"
180
+ " either `true` or `false`"
181
+ )
182
+ return use_client_cert_str == "true"
183
+
156
184
  @classmethod
157
185
  def from_service_account_info(cls, info: dict, *args, **kwargs):
158
186
  """Creates an instance of this client using the provided credentials
@@ -335,12 +363,8 @@ class SchemaServiceClient(metaclass=SchemaServiceClientMeta):
335
363
  )
336
364
  if client_options is None:
337
365
  client_options = client_options_lib.ClientOptions()
338
- use_client_cert = os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false")
366
+ use_client_cert = SchemaServiceClient._use_client_cert_effective()
339
367
  use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto")
340
- if use_client_cert not in ("true", "false"):
341
- raise ValueError(
342
- "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`"
343
- )
344
368
  if use_mtls_endpoint not in ("auto", "never", "always"):
345
369
  raise MutualTLSChannelError(
346
370
  "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`"
@@ -348,7 +372,7 @@ class SchemaServiceClient(metaclass=SchemaServiceClientMeta):
348
372
 
349
373
  # Figure out the client cert source to use.
350
374
  client_cert_source = None
351
- if use_client_cert == "true":
375
+ if use_client_cert:
352
376
  if client_options.client_cert_source:
353
377
  client_cert_source = client_options.client_cert_source
354
378
  elif mtls.has_default_client_cert_source():
@@ -380,20 +404,14 @@ class SchemaServiceClient(metaclass=SchemaServiceClientMeta):
380
404
  google.auth.exceptions.MutualTLSChannelError: If GOOGLE_API_USE_MTLS_ENDPOINT
381
405
  is not any of ["auto", "never", "always"].
382
406
  """
383
- use_client_cert = os.getenv(
384
- "GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"
385
- ).lower()
407
+ use_client_cert = SchemaServiceClient._use_client_cert_effective()
386
408
  use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto").lower()
387
409
  universe_domain_env = os.getenv("GOOGLE_CLOUD_UNIVERSE_DOMAIN")
388
- if use_client_cert not in ("true", "false"):
389
- raise ValueError(
390
- "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`"
391
- )
392
410
  if use_mtls_endpoint not in ("auto", "never", "always"):
393
411
  raise MutualTLSChannelError(
394
412
  "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`"
395
413
  )
396
- return use_client_cert == "true", use_mtls_endpoint, universe_domain_env
414
+ return use_client_cert, use_mtls_endpoint, universe_domain_env
397
415
 
398
416
  @staticmethod
399
417
  def _get_client_cert_source(provided_cert_source, use_cert_flag):
@@ -74,9 +74,10 @@ class SchemaServiceTransport(abc.ABC):
74
74
  credentials identify the application to the service; if none
75
75
  are specified, the client will attempt to ascertain the
76
76
  credentials from the environment.
77
- credentials_file (Optional[str]): A file with credentials that can
77
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
78
78
  be loaded with :func:`google.auth.load_credentials_from_file`.
79
- This argument is mutually exclusive with credentials.
79
+ This argument is mutually exclusive with credentials. This argument will be
80
+ removed in the next major version of this library.
80
81
  scopes (Optional[Sequence[str]]): A list of scopes.
81
82
  quota_project_id (Optional[str]): An optional project to use for billing
82
83
  and quota.
@@ -155,9 +155,10 @@ class SchemaServiceGrpcTransport(SchemaServiceTransport):
155
155
  are specified, the client will attempt to ascertain the
156
156
  credentials from the environment.
157
157
  This argument is ignored if a ``channel`` instance is provided.
158
- credentials_file (Optional[str]): A file with credentials that can
158
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
159
159
  be loaded with :func:`google.auth.load_credentials_from_file`.
160
160
  This argument is ignored if a ``channel`` instance is provided.
161
+ This argument will be removed in the next major version of this library.
161
162
  scopes (Optional(Sequence[str])): A list of scopes. This argument is
162
163
  ignored if a ``channel`` instance is provided.
163
164
  channel (Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]]):
@@ -292,9 +293,10 @@ class SchemaServiceGrpcTransport(SchemaServiceTransport):
292
293
  credentials identify this application to the service. If
293
294
  none are specified, the client will attempt to ascertain
294
295
  the credentials from the environment.
295
- credentials_file (Optional[str]): A file with credentials that can
296
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
296
297
  be loaded with :func:`google.auth.load_credentials_from_file`.
297
- This argument is mutually exclusive with credentials.
298
+ This argument is mutually exclusive with credentials. This argument will be
299
+ removed in the next major version of this library.
298
300
  scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
299
301
  service. These are only used when credentials are not specified and
300
302
  are passed to :func:`google.auth.default`.
@@ -152,8 +152,9 @@ class SchemaServiceGrpcAsyncIOTransport(SchemaServiceTransport):
152
152
  credentials identify this application to the service. If
153
153
  none are specified, the client will attempt to ascertain
154
154
  the credentials from the environment.
155
- credentials_file (Optional[str]): A file with credentials that can
156
- be loaded with :func:`google.auth.load_credentials_from_file`.
155
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
156
+ be loaded with :func:`google.auth.load_credentials_from_file`. This argument will be
157
+ removed in the next major version of this library.
157
158
  scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
158
159
  service. These are only used when credentials are not specified and
159
160
  are passed to :func:`google.auth.default`.
@@ -204,9 +205,10 @@ class SchemaServiceGrpcAsyncIOTransport(SchemaServiceTransport):
204
205
  are specified, the client will attempt to ascertain the
205
206
  credentials from the environment.
206
207
  This argument is ignored if a ``channel`` instance is provided.
207
- credentials_file (Optional[str]): A file with credentials that can
208
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
208
209
  be loaded with :func:`google.auth.load_credentials_from_file`.
209
210
  This argument is ignored if a ``channel`` instance is provided.
211
+ This argument will be removed in the next major version of this library.
210
212
  scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
211
213
  service. These are only used when credentials are not specified and
212
214
  are passed to :func:`google.auth.default`.
@@ -702,9 +702,10 @@ class SchemaServiceRestTransport(_BaseSchemaServiceRestTransport):
702
702
  are specified, the client will attempt to ascertain the
703
703
  credentials from the environment.
704
704
 
705
- credentials_file (Optional[str]): A file with credentials that can
705
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
706
706
  be loaded with :func:`google.auth.load_credentials_from_file`.
707
- This argument is ignored if ``channel`` is provided.
707
+ This argument is ignored if ``channel`` is provided. This argument will be
708
+ removed in the next major version of this library.
708
709
  scopes (Optional(Sequence[str])): A list of scopes. This argument is
709
710
  ignored if ``channel`` is provided.
710
711
  client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client
@@ -86,6 +86,8 @@ class SubscriberAsyncClient:
86
86
  _DEFAULT_ENDPOINT_TEMPLATE = SubscriberClient._DEFAULT_ENDPOINT_TEMPLATE
87
87
  _DEFAULT_UNIVERSE = SubscriberClient._DEFAULT_UNIVERSE
88
88
 
89
+ listing_path = staticmethod(SubscriberClient.listing_path)
90
+ parse_listing_path = staticmethod(SubscriberClient.parse_listing_path)
89
91
  snapshot_path = staticmethod(SubscriberClient.snapshot_path)
90
92
  parse_snapshot_path = staticmethod(SubscriberClient.parse_snapshot_path)
91
93
  subscription_path = staticmethod(SubscriberClient.subscription_path)