google-api-core 2.43.0__tar.gz → 2.43.1__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 (146) hide show
  1. {google_api_core-2.43.0/google_api_core.egg-info → google_api_core-2.43.1}/PKG-INFO +1 -1
  2. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/_python_version_support.py +9 -20
  3. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/version.py +1 -1
  4. {google_api_core-2.43.0 → google_api_core-2.43.1/google_api_core.egg-info}/PKG-INFO +1 -1
  5. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_python_version_support.py +39 -1
  6. {google_api_core-2.43.0 → google_api_core-2.43.1}/LICENSE +0 -0
  7. {google_api_core-2.43.0 → google_api_core-2.43.1}/MANIFEST.in +0 -0
  8. {google_api_core-2.43.0 → google_api_core-2.43.1}/README.rst +0 -0
  9. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/__init__.py +0 -0
  10. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/_feature_gating_helpers.py +0 -0
  11. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/_observability.py +0 -0
  12. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/_python_package_support.py +0 -0
  13. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/_rest_streaming_base.py +0 -0
  14. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/bidi.py +0 -0
  15. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/bidi_async.py +0 -0
  16. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/bidi_base.py +0 -0
  17. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/client_info.py +0 -0
  18. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/client_logging.py +0 -0
  19. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/client_options.py +0 -0
  20. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/datetime_helpers.py +0 -0
  21. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/exceptions.py +0 -0
  22. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/extended_operation.py +0 -0
  23. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/future/__init__.py +0 -0
  24. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/future/_helpers.py +0 -0
  25. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/future/async_future.py +0 -0
  26. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/future/base.py +0 -0
  27. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/future/polling.py +0 -0
  28. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/gapic_v1/__init__.py +0 -0
  29. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/gapic_v1/client_info.py +0 -0
  30. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/gapic_v1/config.py +0 -0
  31. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/gapic_v1/config_async.py +0 -0
  32. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/gapic_v1/method.py +0 -0
  33. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/gapic_v1/method_async.py +0 -0
  34. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/gapic_v1/requests.py +0 -0
  35. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/gapic_v1/routing_header.py +0 -0
  36. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/general_helpers.py +0 -0
  37. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/grpc_helpers.py +0 -0
  38. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/grpc_helpers_async.py +0 -0
  39. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/iam.py +0 -0
  40. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operation.py +0 -0
  41. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operation_async.py +0 -0
  42. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operations_v1/__init__.py +0 -0
  43. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operations_v1/abstract_operations_base_client.py +0 -0
  44. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operations_v1/abstract_operations_client.py +0 -0
  45. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operations_v1/operations_async_client.py +0 -0
  46. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operations_v1/operations_client.py +0 -0
  47. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operations_v1/operations_client_config.py +0 -0
  48. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operations_v1/operations_rest_client_async.py +0 -0
  49. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operations_v1/pagers.py +0 -0
  50. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operations_v1/pagers_async.py +0 -0
  51. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operations_v1/pagers_base.py +0 -0
  52. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operations_v1/transports/__init__.py +0 -0
  53. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operations_v1/transports/base.py +0 -0
  54. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operations_v1/transports/rest.py +0 -0
  55. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/operations_v1/transports/rest_asyncio.py +0 -0
  56. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/page_iterator.py +0 -0
  57. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/page_iterator_async.py +0 -0
  58. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/path_template.py +0 -0
  59. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/protobuf_helpers.py +0 -0
  60. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/py.typed +0 -0
  61. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/rest_helpers.py +0 -0
  62. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/rest_streaming.py +0 -0
  63. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/rest_streaming_async.py +0 -0
  64. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/resumable_transfer/__init__.py +0 -0
  65. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/resumable_transfer/common.py +0 -0
  66. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/resumable_transfer/upload.py +0 -0
  67. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/resumable_transfer/upload_async.py +0 -0
  68. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/resumable_transfer/upload_state.py +0 -0
  69. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/retry/__init__.py +0 -0
  70. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/retry/retry_base.py +0 -0
  71. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/retry/retry_streaming.py +0 -0
  72. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/retry/retry_streaming_async.py +0 -0
  73. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/retry/retry_unary.py +0 -0
  74. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/retry/retry_unary_async.py +0 -0
  75. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/retry_async.py +0 -0
  76. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/timeout.py +0 -0
  77. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/universe.py +0 -0
  78. {google_api_core-2.43.0 → google_api_core-2.43.1}/google/api_core/version_header.py +0 -0
  79. {google_api_core-2.43.0 → google_api_core-2.43.1}/google_api_core.egg-info/SOURCES.txt +0 -0
  80. {google_api_core-2.43.0 → google_api_core-2.43.1}/google_api_core.egg-info/dependency_links.txt +0 -0
  81. {google_api_core-2.43.0 → google_api_core-2.43.1}/google_api_core.egg-info/requires.txt +0 -0
  82. {google_api_core-2.43.0 → google_api_core-2.43.1}/google_api_core.egg-info/top_level.txt +0 -0
  83. {google_api_core-2.43.0 → google_api_core-2.43.1}/pyproject.toml +0 -0
  84. {google_api_core-2.43.0 → google_api_core-2.43.1}/setup.cfg +0 -0
  85. {google_api_core-2.43.0 → google_api_core-2.43.1}/setup.py +0 -0
  86. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/__init__.py +0 -0
  87. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/__init__.py +0 -0
  88. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/future/__init__.py +0 -0
  89. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/future/test_async_future.py +0 -0
  90. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/gapic/test_config_async.py +0 -0
  91. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/gapic/test_method_async.py +0 -0
  92. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/operations_v1/__init__.py +0 -0
  93. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/operations_v1/test_operations_async_client.py +0 -0
  94. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/retry/__init__.py +0 -0
  95. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/retry/test_retry_streaming_async.py +0 -0
  96. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/retry/test_retry_unary_async.py +0 -0
  97. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/test_bidi_async.py +0 -0
  98. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/test_grpc_helpers_async.py +0 -0
  99. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/test_observability_async.py +0 -0
  100. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/test_operation_async.py +0 -0
  101. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/test_page_iterator_async.py +0 -0
  102. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/test_rest_streaming_async.py +0 -0
  103. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/asyncio/test_resumable_transfer_async.py +0 -0
  104. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/conftest.py +0 -0
  105. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/helpers.py +0 -0
  106. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/__init__.py +0 -0
  107. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/future/__init__.py +0 -0
  108. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/future/test__helpers.py +0 -0
  109. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/future/test_polling.py +0 -0
  110. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/gapic/test_client_info.py +0 -0
  111. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/gapic/test_config.py +0 -0
  112. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/gapic/test_method.py +0 -0
  113. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/gapic/test_requests.py +0 -0
  114. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/gapic/test_routing_header.py +0 -0
  115. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/operations_v1/__init__.py +0 -0
  116. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/operations_v1/test_operations_client.py +0 -0
  117. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/operations_v1/test_operations_rest_client.py +0 -0
  118. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/retry/__init__.py +0 -0
  119. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/retry/test_retry_base.py +0 -0
  120. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/retry/test_retry_imports.py +0 -0
  121. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/retry/test_retry_streaming.py +0 -0
  122. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/retry/test_retry_unary.py +0 -0
  123. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_bidi.py +0 -0
  124. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_client_info.py +0 -0
  125. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_client_logging.py +0 -0
  126. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_client_options.py +0 -0
  127. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_datetime_helpers.py +0 -0
  128. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_exceptions.py +0 -0
  129. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_extended_operation.py +0 -0
  130. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_feature_gating_helpers.py +0 -0
  131. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_grpc_helpers.py +0 -0
  132. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_iam.py +0 -0
  133. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_observability.py +0 -0
  134. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_operation.py +0 -0
  135. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_packaging.py +0 -0
  136. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_page_iterator.py +0 -0
  137. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_path_template.py +0 -0
  138. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_protobuf_helpers.py +0 -0
  139. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_python_package_support.py +0 -0
  140. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_rest_helpers.py +0 -0
  141. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_rest_streaming.py +0 -0
  142. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_resumable_transfer.py +0 -0
  143. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_resumable_transfer_scenarios.py +0 -0
  144. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_timeout.py +0 -0
  145. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_universe.py +0 -0
  146. {google_api_core-2.43.0 → google_api_core-2.43.1}/tests/unit/test_version_header.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-api-core
3
- Version: 2.43.0
3
+ Version: 2.43.1
4
4
  Summary: Google API client core library
5
5
  Author-email: Google LLC <googleapis-packages@google.com>
6
6
  License: Apache 2.0
@@ -16,12 +16,10 @@
16
16
 
17
17
  import datetime
18
18
  import enum
19
- import functools
20
19
  import logging
21
20
  import sys
22
21
  import textwrap
23
22
  import warnings
24
- from importlib import metadata
25
23
  from typing import Any, Dict, List, NamedTuple, Optional, Tuple
26
24
 
27
25
  _LOGGER = logging.getLogger(__name__)
@@ -124,7 +122,7 @@ _FAKE_FUTURE_VERSION = VersionInfo(
124
122
  python_start=_FAKE_FUTURE_DATE,
125
123
  python_eol=_FAKE_FUTURE_DATE,
126
124
  )
127
- DEPRECATION_WARNING_PERIOD = datetime.timedelta(days=365)
125
+ DEPRECATION_WARNING_PERIOD = datetime.timedelta(days=90)
128
126
  EOL_GRACE_PERIOD = datetime.timedelta(weeks=1)
129
127
 
130
128
 
@@ -133,25 +131,16 @@ def _flatten_message(text: str) -> str:
133
131
  return " ".join(textwrap.dedent(text).strip().split())
134
132
 
135
133
 
136
- @functools.cache
137
- def _cached_packages_distributions():
138
- return metadata.packages_distributions()
139
-
140
-
141
134
  def _get_pypi_package_name(module_name):
142
135
  """Determine the PyPI package name for a given module name."""
143
- try:
144
- module_to_distributions = _cached_packages_distributions()
145
-
146
- if module_name in module_to_distributions: # pragma: NO COVER
147
- return module_to_distributions[module_name][0]
148
- except Exception as e: # pragma: NO COVER
149
- _LOGGER.info(
150
- "An error occurred while determining PyPI package name for %s: %s",
151
- module_name,
152
- e,
153
- )
154
-
136
+ # NOTE(b/578467297, b/578099898): This function is intentionally a no-op
137
+ # that returns None. Calling `importlib.metadata.packages_distributions()`
138
+ # scans every `.dist-info` directory in `site-packages`, causing severe CPU
139
+ # and import-latency overhead across short-lived subprocesses (such as
140
+ # Cloud Composer / Airflow DAG parsing and task startups). Furthermore,
141
+ # `packages_distributions()` keys by top-level package ("google") rather
142
+ # than dotted namespace modules ("google.cloud.foo_v1"), so the lookup
143
+ # always missed for Google Cloud packages anyway.
155
144
  return None
156
145
 
157
146
 
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = "2.43.0"
15
+ __version__ = "2.43.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-api-core
3
- Version: 2.43.0
3
+ Version: 2.43.1
4
4
  Summary: Google API client core library
5
5
  Author-email: Google LLC <googleapis-packages@google.com>
6
6
  License: Apache 2.0
@@ -22,9 +22,12 @@ import pytest
22
22
 
23
23
  # Code to be tested
24
24
  from google.api_core._python_version_support import (
25
+ DEPRECATION_WARNING_PERIOD,
25
26
  PYTHON_VERSION_INFO,
26
27
  PythonVersionStatus,
27
28
  _flatten_message,
29
+ _get_distribution_and_import_packages,
30
+ _get_pypi_package_name,
28
31
  check_python_version,
29
32
  )
30
33
 
@@ -74,7 +77,7 @@ def get_tracked_version_test_cases():
74
77
  for version_tuple, version_info in PYTHON_VERSION_INFO.items():
75
78
  py_version_str = f"{version_tuple[0]}.{version_tuple[1]}"
76
79
  gapic_dep = version_info.gapic_deprecation or (
77
- version_info.python_eol - datetime.timedelta(days=365)
80
+ version_info.python_eol - DEPRECATION_WARNING_PERIOD
78
81
  )
79
82
  gapic_end = version_info.gapic_end or (
80
83
  version_info.python_eol + datetime.timedelta(weeks=1)
@@ -260,3 +263,38 @@ def test_untracked_newer_version_is_supported():
260
263
 
261
264
  assert result == PythonVersionStatus.PYTHON_VERSION_SUPPORTED
262
265
  assert len(w) == 0
266
+
267
+
268
+ def test_get_pypi_package_name_is_noop():
269
+ """Test that _get_pypi_package_name returns None without scanning distributions."""
270
+ with patch("importlib.metadata.packages_distributions") as mock_pkg_dists:
271
+ assert _get_pypi_package_name("google.api_core") is None
272
+ assert _get_distribution_and_import_packages("google.api_core") == (
273
+ "google.api_core",
274
+ None,
275
+ )
276
+ # Verify check_python_version never calls packages_distributions() even when warning
277
+ mock_py_v = VersionInfoMock(major=3, minor=11)
278
+ with patch(
279
+ "google.api_core._python_version_support.sys.version_info", mock_py_v
280
+ ):
281
+ # Oct 26, 2026 (incident date): now SUPPORTED with 0 warnings (outside 90-day window)
282
+ with warnings.catch_warnings(record=True) as w:
283
+ warnings.simplefilter("always")
284
+ status = check_python_version(
285
+ "google.cloud.datacatalog_lineage_v1",
286
+ today=datetime.date(2026, 10, 26),
287
+ )
288
+ assert status == PythonVersionStatus.PYTHON_VERSION_SUPPORTED
289
+ assert len(w) == 0
290
+
291
+ # Inside 90-day window: warns, but still never calls packages_distributions()
292
+ with pytest.warns(FutureWarning):
293
+ status = check_python_version(
294
+ "google.cloud.datacatalog_lineage_v1",
295
+ today=datetime.date(2027, 8, 1),
296
+ )
297
+ assert status == PythonVersionStatus.PYTHON_VERSION_DEPRECATED
298
+
299
+ mock_pkg_dists.assert_not_called()
300
+ assert DEPRECATION_WARNING_PERIOD == datetime.timedelta(days=90)