google-api-core 2.30.3__tar.gz → 2.32.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 (132) hide show
  1. {google_api_core-2.30.3/google_api_core.egg-info → google_api_core-2.32.0}/PKG-INFO +14 -12
  2. {google_api_core-2.30.3 → google_api_core-2.32.0}/README.rst +5 -3
  3. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/_python_version_support.py +17 -35
  4. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/client_info.py +1 -1
  5. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/exceptions.py +14 -4
  6. google_api_core-2.32.0/google/api_core/gapic_v1/__init__.py +55 -0
  7. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/gapic_v1/client_info.py +1 -1
  8. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/grpc_helpers_async.py +1 -1
  9. google_api_core-2.32.0/google/api_core/operations_v1/__init__.py +81 -0
  10. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/version.py +1 -1
  11. {google_api_core-2.30.3 → google_api_core-2.32.0/google_api_core.egg-info}/PKG-INFO +14 -12
  12. {google_api_core-2.30.3 → google_api_core-2.32.0}/google_api_core.egg-info/requires.txt +7 -6
  13. {google_api_core-2.30.3 → google_api_core-2.32.0}/pyproject.toml +7 -8
  14. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/asyncio/retry/test_retry_streaming_async.py +1 -1
  15. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/asyncio/test_bidi_async.py +1 -14
  16. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/retry/test_retry_streaming.py +1 -1
  17. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_exceptions.py +17 -1
  18. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_python_version_support.py +22 -17
  19. google_api_core-2.30.3/google/api_core/gapic_v1/__init__.py +0 -29
  20. google_api_core-2.30.3/google/api_core/operations_v1/__init__.py +0 -40
  21. {google_api_core-2.30.3 → google_api_core-2.32.0}/LICENSE +0 -0
  22. {google_api_core-2.30.3 → google_api_core-2.32.0}/MANIFEST.in +0 -0
  23. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/__init__.py +0 -0
  24. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/_python_package_support.py +0 -0
  25. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/_rest_streaming_base.py +0 -0
  26. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/bidi.py +0 -0
  27. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/bidi_async.py +0 -0
  28. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/bidi_base.py +0 -0
  29. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/client_logging.py +0 -0
  30. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/client_options.py +0 -0
  31. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/datetime_helpers.py +0 -0
  32. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/extended_operation.py +0 -0
  33. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/future/__init__.py +0 -0
  34. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/future/_helpers.py +0 -0
  35. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/future/async_future.py +0 -0
  36. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/future/base.py +0 -0
  37. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/future/polling.py +0 -0
  38. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/gapic_v1/config.py +0 -0
  39. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/gapic_v1/config_async.py +0 -0
  40. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/gapic_v1/method.py +0 -0
  41. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/gapic_v1/method_async.py +0 -0
  42. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/gapic_v1/routing_header.py +0 -0
  43. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/general_helpers.py +0 -0
  44. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/grpc_helpers.py +0 -0
  45. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/iam.py +0 -0
  46. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/operation.py +0 -0
  47. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/operation_async.py +0 -0
  48. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/operations_v1/abstract_operations_base_client.py +0 -0
  49. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/operations_v1/abstract_operations_client.py +0 -0
  50. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/operations_v1/operations_async_client.py +0 -0
  51. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/operations_v1/operations_client.py +0 -0
  52. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/operations_v1/operations_client_config.py +0 -0
  53. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/operations_v1/operations_rest_client_async.py +0 -0
  54. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/operations_v1/pagers.py +0 -0
  55. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/operations_v1/pagers_async.py +0 -0
  56. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/operations_v1/pagers_base.py +0 -0
  57. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/operations_v1/transports/__init__.py +0 -0
  58. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/operations_v1/transports/base.py +0 -0
  59. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/operations_v1/transports/rest.py +0 -0
  60. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/operations_v1/transports/rest_asyncio.py +0 -0
  61. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/page_iterator.py +0 -0
  62. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/page_iterator_async.py +0 -0
  63. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/path_template.py +0 -0
  64. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/protobuf_helpers.py +0 -0
  65. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/py.typed +0 -0
  66. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/rest_helpers.py +0 -0
  67. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/rest_streaming.py +0 -0
  68. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/rest_streaming_async.py +0 -0
  69. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/retry/__init__.py +0 -0
  70. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/retry/retry_base.py +0 -0
  71. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/retry/retry_streaming.py +0 -0
  72. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/retry/retry_streaming_async.py +0 -0
  73. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/retry/retry_unary.py +0 -0
  74. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/retry/retry_unary_async.py +0 -0
  75. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/retry_async.py +0 -0
  76. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/timeout.py +0 -0
  77. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/universe.py +0 -0
  78. {google_api_core-2.30.3 → google_api_core-2.32.0}/google/api_core/version_header.py +0 -0
  79. {google_api_core-2.30.3 → google_api_core-2.32.0}/google_api_core.egg-info/SOURCES.txt +0 -0
  80. {google_api_core-2.30.3 → google_api_core-2.32.0}/google_api_core.egg-info/dependency_links.txt +0 -0
  81. {google_api_core-2.30.3 → google_api_core-2.32.0}/google_api_core.egg-info/top_level.txt +0 -0
  82. {google_api_core-2.30.3 → google_api_core-2.32.0}/setup.cfg +0 -0
  83. {google_api_core-2.30.3 → google_api_core-2.32.0}/setup.py +0 -0
  84. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/__init__.py +0 -0
  85. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/asyncio/__init__.py +0 -0
  86. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/asyncio/future/__init__.py +0 -0
  87. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/asyncio/future/test_async_future.py +0 -0
  88. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/asyncio/gapic/test_config_async.py +0 -0
  89. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/asyncio/gapic/test_method_async.py +0 -0
  90. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/asyncio/operations_v1/__init__.py +0 -0
  91. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/asyncio/operations_v1/test_operations_async_client.py +0 -0
  92. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/asyncio/retry/__init__.py +0 -0
  93. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/asyncio/retry/test_retry_unary_async.py +0 -0
  94. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/asyncio/test_grpc_helpers_async.py +0 -0
  95. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/asyncio/test_operation_async.py +0 -0
  96. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/asyncio/test_page_iterator_async.py +0 -0
  97. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/asyncio/test_rest_streaming_async.py +0 -0
  98. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/helpers.py +0 -0
  99. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/__init__.py +0 -0
  100. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/future/__init__.py +0 -0
  101. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/future/test__helpers.py +0 -0
  102. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/future/test_polling.py +0 -0
  103. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/gapic/test_client_info.py +0 -0
  104. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/gapic/test_config.py +0 -0
  105. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/gapic/test_method.py +0 -0
  106. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/gapic/test_routing_header.py +0 -0
  107. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/operations_v1/__init__.py +0 -0
  108. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/operations_v1/test_operations_client.py +0 -0
  109. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/operations_v1/test_operations_rest_client.py +0 -0
  110. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/retry/__init__.py +0 -0
  111. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/retry/test_retry_base.py +0 -0
  112. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/retry/test_retry_imports.py +0 -0
  113. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/retry/test_retry_unary.py +0 -0
  114. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_bidi.py +0 -0
  115. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_client_info.py +0 -0
  116. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_client_logging.py +0 -0
  117. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_client_options.py +0 -0
  118. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_datetime_helpers.py +0 -0
  119. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_extended_operation.py +0 -0
  120. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_grpc_helpers.py +0 -0
  121. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_iam.py +0 -0
  122. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_operation.py +0 -0
  123. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_packaging.py +0 -0
  124. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_page_iterator.py +0 -0
  125. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_path_template.py +0 -0
  126. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_protobuf_helpers.py +0 -0
  127. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_python_package_support.py +0 -0
  128. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_rest_helpers.py +0 -0
  129. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_rest_streaming.py +0 -0
  130. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_timeout.py +0 -0
  131. {google_api_core-2.30.3 → google_api_core-2.32.0}/tests/unit/test_universe.py +0 -0
  132. {google_api_core-2.30.3 → google_api_core-2.32.0}/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.30.3
3
+ Version: 2.32.0
4
4
  Summary: Google API client core library
5
5
  Author-email: Google LLC <googleapis-packages@google.com>
6
6
  License: Apache 2.0
@@ -12,7 +12,6 @@ Classifier: Intended Audience :: Developers
12
12
  Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.9
16
15
  Classifier: Programming Language :: Python :: 3.10
17
16
  Classifier: Programming Language :: Python :: 3.11
18
17
  Classifier: Programming Language :: Python :: 3.12
@@ -20,22 +19,23 @@ Classifier: Programming Language :: Python :: 3.13
20
19
  Classifier: Programming Language :: Python :: 3.14
21
20
  Classifier: Operating System :: OS Independent
22
21
  Classifier: Topic :: Internet
23
- Requires-Python: >=3.9
22
+ Requires-Python: >=3.10
24
23
  Description-Content-Type: text/x-rst
25
24
  License-File: LICENSE
26
25
  Requires-Dist: googleapis-common-protos<2.0.0,>=1.63.2
27
- Requires-Dist: protobuf<8.0.0,>=4.25.8
28
- Requires-Dist: proto-plus<2.0.0,>=1.22.3
26
+ Requires-Dist: protobuf<8.0.0,>=5.29.6
27
+ Requires-Dist: proto-plus<2.0.0,>=1.24.0
29
28
  Requires-Dist: proto-plus<2.0.0,>=1.25.0; python_version >= "3.13"
30
29
  Requires-Dist: google-auth<3.0.0,>=2.14.1
31
- Requires-Dist: requests<3.0.0,>=2.20.0
30
+ Requires-Dist: requests<3.0.0,>=2.33.0
32
31
  Provides-Extra: async-rest
33
- Requires-Dist: google-auth[aiohttp]<3.0.0,>=2.35.0; extra == "async-rest"
32
+ Requires-Dist: google-auth[aiohttp]<3.0.0,>=2.14.1; extra == "async-rest"
33
+ Requires-Dist: aiohttp>=3.13.4; extra == "async-rest"
34
34
  Provides-Extra: grpc
35
- Requires-Dist: grpcio<2.0.0,>=1.33.2; extra == "grpc"
35
+ Requires-Dist: grpcio<2.0.0,>=1.41.0; extra == "grpc"
36
36
  Requires-Dist: grpcio<2.0.0,>=1.49.1; python_version >= "3.11" and extra == "grpc"
37
37
  Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14" and extra == "grpc"
38
- Requires-Dist: grpcio-status<2.0.0,>=1.33.2; extra == "grpc"
38
+ Requires-Dist: grpcio-status<2.0.0,>=1.41.0; extra == "grpc"
39
39
  Requires-Dist: grpcio-status<2.0.0,>=1.49.1; python_version >= "3.11" and extra == "grpc"
40
40
  Requires-Dist: grpcio-status<2.0.0,>=1.75.1; python_version >= "3.14" and extra == "grpc"
41
41
  Dynamic: license-file
@@ -58,13 +58,12 @@ common helpers used by all Google API clients. For more information, see the
58
58
 
59
59
  Supported Python Versions
60
60
  -------------------------
61
- Python >= 3.9
61
+ Python >= 3.10
62
62
 
63
63
 
64
64
  Unsupported Python Versions
65
65
  ---------------------------
66
-
67
- Python == 2.7, Python == 3.5, Python == 3.6, Python == 3.7, Python == 3.8.
66
+ Python <= 3.9
68
67
 
69
68
  The last version of this library compatible with Python 2.7 and 3.5 is
70
69
  `google-api-core==1.31.1`.
@@ -74,3 +73,6 @@ The last version of this library compatible with Python 3.6 is
74
73
 
75
74
  The last version of this library compatible with Python 3.7 and 3.8 is
76
75
  `google-api-core==2.29.0`.
76
+
77
+ The last version of this library compatible with Python 3.9 is
78
+ `google-api-core==2.30.3`.
@@ -16,13 +16,12 @@ common helpers used by all Google API clients. For more information, see the
16
16
 
17
17
  Supported Python Versions
18
18
  -------------------------
19
- Python >= 3.9
19
+ Python >= 3.10
20
20
 
21
21
 
22
22
  Unsupported Python Versions
23
23
  ---------------------------
24
-
25
- Python == 2.7, Python == 3.5, Python == 3.6, Python == 3.7, Python == 3.8.
24
+ Python <= 3.9
26
25
 
27
26
  The last version of this library compatible with Python 2.7 and 3.5 is
28
27
  `google-api-core==1.31.1`.
@@ -32,3 +31,6 @@ The last version of this library compatible with Python 3.6 is
32
31
 
33
32
  The last version of this library compatible with Python 3.7 and 3.8 is
34
33
  `google-api-core==2.29.0`.
34
+
35
+ The last version of this library compatible with Python 3.9 is
36
+ `google-api-core==2.30.3`.
@@ -17,6 +17,7 @@
17
17
  import datetime
18
18
  import enum
19
19
  import functools
20
+ from importlib import metadata
20
21
  import logging
21
22
  import warnings
22
23
  import sys
@@ -71,13 +72,6 @@ class VersionInfo(NamedTuple):
71
72
 
72
73
  PYTHON_VERSIONS: List[VersionInfo] = [
73
74
  # Refer to https://devguide.python.org/versions/ and the PEPs linked therefrom.
74
- VersionInfo(
75
- version="3.9",
76
- python_beta=datetime.date(2020, 5, 18),
77
- python_start=datetime.date(2020, 10, 5),
78
- python_eol=datetime.date(2025, 10, 5),
79
- gapic_end=datetime.date(2025, 10, 5) + datetime.timedelta(days=90),
80
- ),
81
75
  VersionInfo(
82
76
  version="3.10",
83
77
  python_beta=datetime.date(2021, 5, 3),
@@ -140,38 +134,26 @@ def _flatten_message(text: str) -> str:
140
134
  return " ".join(textwrap.dedent(text).strip().split())
141
135
 
142
136
 
143
- # TODO(https://github.com/googleapis/python-api-core/issues/835):
144
- # Remove once we no longer support Python 3.9.
145
- # `importlib.metadata.packages_distributions()` is only supported in Python 3.10 and newer
146
- # https://docs.python.org/3/library/importlib.metadata.html#importlib.metadata.packages_distributions
147
- if sys.version_info < (3, 10):
148
-
149
- def _get_pypi_package_name(module_name): # pragma: NO COVER
150
- """Determine the PyPI package name for a given module name."""
151
- return None
137
+ @functools.cache
138
+ def _cached_packages_distributions():
139
+ return metadata.packages_distributions()
152
140
 
153
- else:
154
- from importlib import metadata
155
141
 
156
- @functools.cache
157
- def _cached_packages_distributions():
158
- return metadata.packages_distributions()
142
+ def _get_pypi_package_name(module_name):
143
+ """Determine the PyPI package name for a given module name."""
144
+ try:
145
+ module_to_distributions = _cached_packages_distributions()
159
146
 
160
- def _get_pypi_package_name(module_name):
161
- """Determine the PyPI package name for a given module name."""
162
- try:
163
- module_to_distributions = _cached_packages_distributions()
164
-
165
- if module_name in module_to_distributions: # pragma: NO COVER
166
- return module_to_distributions[module_name][0]
167
- except Exception as e: # pragma: NO COVER
168
- _LOGGER.info(
169
- "An error occurred while determining PyPI package name for %s: %s",
170
- module_name,
171
- e,
172
- )
147
+ if module_name in module_to_distributions: # pragma: NO COVER
148
+ return module_to_distributions[module_name][0]
149
+ except Exception as e: # pragma: NO COVER
150
+ _LOGGER.info(
151
+ "An error occurred while determining PyPI package name for %s: %s",
152
+ module_name,
153
+ e,
154
+ )
173
155
 
174
- return None
156
+ return None
175
157
 
176
158
 
177
159
  def _get_distribution_and_import_packages(import_package: str) -> Tuple[str, Any]:
@@ -45,7 +45,7 @@ class ClientInfo(object):
45
45
 
46
46
  Args:
47
47
  python_version (str): The Python interpreter version, for example,
48
- ``'3.9.6'``.
48
+ ``'3.10.0'``.
49
49
  grpc_version (Optional[str]): The gRPC library version.
50
50
  api_core_version (str): The google-api-core library version.
51
51
  gapic_version (Optional[str]): The version of gapic-generated client
@@ -18,12 +18,11 @@ This module provides base classes for all errors raised by libraries based
18
18
  on :mod:`google.api_core`, including both HTTP and gRPC clients.
19
19
  """
20
20
 
21
- from __future__ import absolute_import
22
- from __future__ import unicode_literals
21
+ from __future__ import absolute_import, unicode_literals
23
22
 
24
23
  import http.client
25
- from typing import Optional, Dict
26
24
  import warnings
25
+ from typing import Dict, Optional
27
26
 
28
27
  from google.rpc import error_details_pb2
29
28
 
@@ -657,9 +656,20 @@ def from_grpc_error(rpc_exc):
657
656
  grpc is not None and isinstance(rpc_exc, grpc.Call)
658
657
  ) or _is_informative_grpc_error(rpc_exc):
659
658
  details, err_info = _parse_grpc_error_details(rpc_exc)
659
+ message = rpc_exc.details()
660
+ if (
661
+ grpc is not None
662
+ and rpc_exc.code() == grpc.StatusCode.UNIMPLEMENTED
663
+ and "Received http2 header with status: 404" in message
664
+ ):
665
+ message = (
666
+ f"{message}. This usually indicates that the 'api_endpoint' "
667
+ "configuration in ClientOptions is incorrect, contains a typo, "
668
+ "or is an invalid regional endpoint for this service."
669
+ )
660
670
  return from_grpc_status(
661
671
  rpc_exc.code(),
662
- rpc_exc.details(),
672
+ message,
663
673
  errors=(rpc_exc,),
664
674
  details=details,
665
675
  response=rpc_exc,
@@ -0,0 +1,55 @@
1
+ # Copyright 2017 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ import importlib.util
16
+ from typing import Set
17
+
18
+ _has_grpc = importlib.util.find_spec("grpc") is not None
19
+
20
+ # PEP 0810: Explicit Lazy Imports
21
+ # Python 3.15+ natively intercepts and defers these imports.
22
+ # Developers can disable this behavior and force eager imports.
23
+ # For more information, see:
24
+ # https://docs.python.org/3.15/library/sys.html#sys.set_lazy_imports_filter
25
+ # Older Python versions safely ignore this variable.
26
+ __lazy_modules__: Set[str] = {
27
+ "google.api_core.gapic_v1.client_info",
28
+ "google.api_core.gapic_v1.routing_header",
29
+ }
30
+ __all__ = ["client_info", "routing_header"]
31
+
32
+ if _has_grpc:
33
+ __lazy_modules__.update(
34
+ {
35
+ "google.api_core.gapic_v1.config",
36
+ "google.api_core.gapic_v1.config_async",
37
+ "google.api_core.gapic_v1.method",
38
+ "google.api_core.gapic_v1.method_async",
39
+ }
40
+ )
41
+
42
+ from google.api_core.gapic_v1 import ( # noqa: E402
43
+ client_info,
44
+ routing_header,
45
+ )
46
+
47
+ if _has_grpc:
48
+ from google.api_core.gapic_v1 import ( # noqa: F401
49
+ config,
50
+ config_async,
51
+ method,
52
+ method_async,
53
+ )
54
+
55
+ __all__.extend(["config", "config_async", "method", "method_async"])
@@ -33,7 +33,7 @@ class ClientInfo(client_info.ClientInfo):
33
33
 
34
34
  Args:
35
35
  python_version (str): The Python interpreter version, for example,
36
- ``'3.9.6'``.
36
+ ``'3.10.0'``.
37
37
  grpc_version (Optional[str]): The gRPC library version.
38
38
  api_core_version (str): The google-api-core library version.
39
39
  gapic_version (Optional[str]): The version of gapic-generated client
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- """AsyncIO helpers for :mod:`grpc` supporting 3.7+.
15
+ """AsyncIO helpers for :mod:`grpc`.
16
16
 
17
17
  Please combine more detailed docstring in grpc_helpers.py to use following
18
18
  functions. This module is implementing the same surface with AsyncIO semantics.
@@ -0,0 +1,81 @@
1
+ # Copyright 2017 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """Package for interacting with the google.longrunning.operations meta-API."""
16
+
17
+ import importlib.util
18
+ from typing import Set
19
+
20
+ try:
21
+ _has_async_rest = (
22
+ importlib.util.find_spec("google.auth.aio.transport.sessions") is not None
23
+ )
24
+ except ModuleNotFoundError:
25
+ _has_async_rest = False
26
+
27
+ # PEP 0810: Explicit Lazy Imports
28
+ # Python 3.15+ natively intercepts and defers these imports.
29
+ # Developers can disable this behavior and force eager imports.
30
+ # For more information, see:
31
+ # https://docs.python.org/3.15/library/sys.html#sys.set_lazy_imports_filter
32
+ # Older Python versions safely ignore this variable.
33
+ # NOTE: We statically define all modules here (including async ones) to ensure
34
+ # static analysis tools (mypy, pyright, Ruff) can easily parse them. If async
35
+ # support is not present, the imports are ignored, making their presence safe.
36
+ __lazy_modules__: Set[str] = {
37
+ "google.api_core.operations_v1.abstract_operations_client",
38
+ "google.api_core.operations_v1.operations_async_client",
39
+ "google.api_core.operations_v1.operations_client",
40
+ "google.api_core.operations_v1.transports.rest",
41
+ "google.api_core.operations_v1.transports.rest_asyncio",
42
+ "google.api_core.operations_v1.operations_rest_client_async",
43
+ }
44
+
45
+ __all__ = [
46
+ "AbstractOperationsClient",
47
+ "OperationsAsyncClient",
48
+ "OperationsClient",
49
+ "OperationsRestTransport",
50
+ ]
51
+
52
+
53
+ from google.api_core.operations_v1.abstract_operations_client import ( # noqa: E402
54
+ AbstractOperationsClient,
55
+ )
56
+ from google.api_core.operations_v1.operations_async_client import ( # noqa: E402
57
+ OperationsAsyncClient,
58
+ )
59
+ from google.api_core.operations_v1.operations_client import ( # noqa: E402
60
+ OperationsClient,
61
+ )
62
+ from google.api_core.operations_v1.transports.rest import ( # noqa: E402
63
+ OperationsRestTransport,
64
+ )
65
+
66
+ if _has_async_rest:
67
+ try:
68
+ # On Python 3.15+, PEP 0810 lazy loading means these imports will succeed
69
+ # instantly (returning a lazy proxy). Any actual ImportErrors (e.g., due to
70
+ # missing aiohttp/auth dependencies) are deferred until the proxies are accessed.
71
+ from google.api_core.operations_v1.transports.rest_asyncio import ( # noqa: E402, F401
72
+ AsyncOperationsRestTransport,
73
+ )
74
+ from google.api_core.operations_v1.operations_rest_client_async import ( # noqa: E402, F401
75
+ AsyncOperationsRestClient,
76
+ )
77
+
78
+ __all__.extend(["AsyncOperationsRestClient", "AsyncOperationsRestTransport"])
79
+ except ImportError:
80
+ # Fallback for older python/environments when importlib find_spec succeeds but actual import fails
81
+ pass
@@ -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.30.3"
15
+ __version__ = "2.32.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-api-core
3
- Version: 2.30.3
3
+ Version: 2.32.0
4
4
  Summary: Google API client core library
5
5
  Author-email: Google LLC <googleapis-packages@google.com>
6
6
  License: Apache 2.0
@@ -12,7 +12,6 @@ Classifier: Intended Audience :: Developers
12
12
  Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.9
16
15
  Classifier: Programming Language :: Python :: 3.10
17
16
  Classifier: Programming Language :: Python :: 3.11
18
17
  Classifier: Programming Language :: Python :: 3.12
@@ -20,22 +19,23 @@ Classifier: Programming Language :: Python :: 3.13
20
19
  Classifier: Programming Language :: Python :: 3.14
21
20
  Classifier: Operating System :: OS Independent
22
21
  Classifier: Topic :: Internet
23
- Requires-Python: >=3.9
22
+ Requires-Python: >=3.10
24
23
  Description-Content-Type: text/x-rst
25
24
  License-File: LICENSE
26
25
  Requires-Dist: googleapis-common-protos<2.0.0,>=1.63.2
27
- Requires-Dist: protobuf<8.0.0,>=4.25.8
28
- Requires-Dist: proto-plus<2.0.0,>=1.22.3
26
+ Requires-Dist: protobuf<8.0.0,>=5.29.6
27
+ Requires-Dist: proto-plus<2.0.0,>=1.24.0
29
28
  Requires-Dist: proto-plus<2.0.0,>=1.25.0; python_version >= "3.13"
30
29
  Requires-Dist: google-auth<3.0.0,>=2.14.1
31
- Requires-Dist: requests<3.0.0,>=2.20.0
30
+ Requires-Dist: requests<3.0.0,>=2.33.0
32
31
  Provides-Extra: async-rest
33
- Requires-Dist: google-auth[aiohttp]<3.0.0,>=2.35.0; extra == "async-rest"
32
+ Requires-Dist: google-auth[aiohttp]<3.0.0,>=2.14.1; extra == "async-rest"
33
+ Requires-Dist: aiohttp>=3.13.4; extra == "async-rest"
34
34
  Provides-Extra: grpc
35
- Requires-Dist: grpcio<2.0.0,>=1.33.2; extra == "grpc"
35
+ Requires-Dist: grpcio<2.0.0,>=1.41.0; extra == "grpc"
36
36
  Requires-Dist: grpcio<2.0.0,>=1.49.1; python_version >= "3.11" and extra == "grpc"
37
37
  Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14" and extra == "grpc"
38
- Requires-Dist: grpcio-status<2.0.0,>=1.33.2; extra == "grpc"
38
+ Requires-Dist: grpcio-status<2.0.0,>=1.41.0; extra == "grpc"
39
39
  Requires-Dist: grpcio-status<2.0.0,>=1.49.1; python_version >= "3.11" and extra == "grpc"
40
40
  Requires-Dist: grpcio-status<2.0.0,>=1.75.1; python_version >= "3.14" and extra == "grpc"
41
41
  Dynamic: license-file
@@ -58,13 +58,12 @@ common helpers used by all Google API clients. For more information, see the
58
58
 
59
59
  Supported Python Versions
60
60
  -------------------------
61
- Python >= 3.9
61
+ Python >= 3.10
62
62
 
63
63
 
64
64
  Unsupported Python Versions
65
65
  ---------------------------
66
-
67
- Python == 2.7, Python == 3.5, Python == 3.6, Python == 3.7, Python == 3.8.
66
+ Python <= 3.9
68
67
 
69
68
  The last version of this library compatible with Python 2.7 and 3.5 is
70
69
  `google-api-core==1.31.1`.
@@ -74,3 +73,6 @@ The last version of this library compatible with Python 3.6 is
74
73
 
75
74
  The last version of this library compatible with Python 3.7 and 3.8 is
76
75
  `google-api-core==2.29.0`.
76
+
77
+ The last version of this library compatible with Python 3.9 is
78
+ `google-api-core==2.30.3`.
@@ -1,18 +1,19 @@
1
1
  googleapis-common-protos<2.0.0,>=1.63.2
2
- protobuf<8.0.0,>=4.25.8
3
- proto-plus<2.0.0,>=1.22.3
2
+ protobuf<8.0.0,>=5.29.6
3
+ proto-plus<2.0.0,>=1.24.0
4
4
  google-auth<3.0.0,>=2.14.1
5
- requests<3.0.0,>=2.20.0
5
+ requests<3.0.0,>=2.33.0
6
6
 
7
7
  [:python_version >= "3.13"]
8
8
  proto-plus<2.0.0,>=1.25.0
9
9
 
10
10
  [async_rest]
11
- google-auth[aiohttp]<3.0.0,>=2.35.0
11
+ google-auth[aiohttp]<3.0.0,>=2.14.1
12
+ aiohttp>=3.13.4
12
13
 
13
14
  [grpc]
14
- grpcio<2.0.0,>=1.33.2
15
- grpcio-status<2.0.0,>=1.33.2
15
+ grpcio<2.0.0,>=1.41.0
16
+ grpcio-status<2.0.0,>=1.41.0
16
17
 
17
18
  [grpc:python_version >= "3.11"]
18
19
  grpcio<2.0.0,>=1.49.1
@@ -20,7 +20,7 @@ build-backend = "setuptools.build_meta"
20
20
  name = "google-api-core"
21
21
  authors = [{ name = "Google LLC", email = "googleapis-packages@google.com" }]
22
22
  license = { text = "Apache 2.0" }
23
- requires-python = ">=3.9"
23
+ requires-python = ">=3.10"
24
24
  readme = "README.rst"
25
25
  description = "Google API client core library"
26
26
  classifiers = [
@@ -34,7 +34,6 @@ classifiers = [
34
34
  "Programming Language :: Python",
35
35
  "Programming Language :: Python :: 3",
36
36
 
37
- "Programming Language :: Python :: 3.9",
38
37
  "Programming Language :: Python :: 3.10",
39
38
  "Programming Language :: Python :: 3.11",
40
39
  "Programming Language :: Python :: 3.12",
@@ -45,11 +44,11 @@ classifiers = [
45
44
  ]
46
45
  dependencies = [
47
46
  "googleapis-common-protos >= 1.63.2, < 2.0.0",
48
- "protobuf >= 4.25.8, < 8.0.0",
49
- "proto-plus >= 1.22.3, < 2.0.0",
47
+ "protobuf >= 5.29.6, < 8.0.0",
48
+ "proto-plus >= 1.24.0, < 2.0.0",
50
49
  "proto-plus >= 1.25.0, < 2.0.0; python_version >= '3.13'",
51
50
  "google-auth >= 2.14.1, < 3.0.0",
52
- "requests >= 2.20.0, < 3.0.0",
51
+ "requests >= 2.33.0, < 3.0.0",
53
52
  ]
54
53
  dynamic = ["version"]
55
54
 
@@ -59,12 +58,12 @@ Documentation = "https://googleapis.dev/python/google-api-core/latest/"
59
58
  Repository = "https://github.com/googleapis/google-cloud-python"
60
59
 
61
60
  [project.optional-dependencies]
62
- async_rest = ["google-auth[aiohttp] >= 2.35.0, < 3.0.0"]
61
+ async_rest = ["google-auth[aiohttp] >= 2.14.1, < 3.0.0", "aiohttp >= 3.13.4"]
63
62
  grpc = [
64
- "grpcio >= 1.33.2, < 2.0.0",
63
+ "grpcio >= 1.41.0, < 2.0.0",
65
64
  "grpcio >= 1.49.1, < 2.0.0; python_version >= '3.11'",
66
65
  "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
67
- "grpcio-status >= 1.33.2, < 2.0.0",
66
+ "grpcio-status >= 1.41.0, < 2.0.0",
68
67
  "grpcio-status >= 1.49.1, < 2.0.0; python_version >= '3.11'",
69
68
  "grpcio-status >= 1.75.1, < 2.0.0; python_version >= '3.14'",
70
69
  ]
@@ -293,7 +293,7 @@ class TestAsyncStreamingRetry(Test_BaseRetry):
293
293
  generator = await retry_(self._generator_mock)(error_on=3)
294
294
  with pytest.raises(TypeError) as exc_info:
295
295
  await generator.asend("cannot send to fresh generator")
296
- assert exc_info.match("can't send non-None value")
296
+ assert exc_info.match("can't send non-None value")
297
297
  await generator.aclose()
298
298
 
299
299
  # error thrown on 3
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- import sys
15
+
16
16
  import asyncio
17
17
 
18
18
  from unittest import mock
@@ -33,15 +33,6 @@ except ImportError: # pragma: NO COVER
33
33
  from google.api_core import bidi_async
34
34
  from google.api_core import exceptions
35
35
 
36
- # TODO: remove this when droppping support for "Python 3.10" and below.
37
- if sys.version_info < (3, 10): # type: ignore[operator]
38
-
39
- def aiter(obj):
40
- return obj.__aiter__()
41
-
42
- async def anext(obj):
43
- return await obj.__anext__()
44
-
45
36
 
46
37
  @pytest.mark.asyncio
47
38
  class Test_AsyncRequestQueueGenerator:
@@ -185,10 +176,6 @@ class TestAsyncBidiRpc:
185
176
  callback.assert_called_once_with(mock.sentinel.future)
186
177
 
187
178
  @pytest.mark.asyncio
188
- @pytest.mark.skipif(
189
- sys.version_info < (3, 8), # type: ignore[operator]
190
- reason="Versions of Python below 3.8 don't provide support for assert_awaited_once",
191
- )
192
179
  async def test_metadata(self):
193
180
  rpc, call = make_async_rpc()
194
181
  bidi_rpc = bidi_async.AsyncBidiRpc(rpc, metadata=mock.sentinel.A)
@@ -263,7 +263,7 @@ class TestStreamingRetry(Test_BaseRetry):
263
263
  with pytest.raises(TypeError) as exc_info:
264
264
  # calling first send with non-None input should raise a TypeError
265
265
  result.send("can not send to fresh generator")
266
- assert exc_info.match("can't send non-None value")
266
+ assert exc_info.match("can't send non-None value")
267
267
  # initiate iteration with None
268
268
  result = retry_(self._generator_mock)(error_on=3)
269
269
  assert result.send(None) == 0
@@ -25,10 +25,11 @@ try:
25
25
  except ImportError: # pragma: NO COVER
26
26
  grpc = rpc_status = None
27
27
 
28
- from google.api_core import exceptions
29
28
  from google.protobuf import any_pb2, json_format
30
29
  from google.rpc import error_details_pb2, status_pb2
31
30
 
31
+ from google.api_core import exceptions
32
+
32
33
 
33
34
  def test_create_google_cloud_error():
34
35
  exception = exceptions.GoogleAPICallError("Testing")
@@ -393,3 +394,18 @@ def test_error_details_from_grpc_response_unknown_error():
393
394
  and exception.domain is None
394
395
  and exception.metadata is None
395
396
  )
397
+
398
+
399
+ @pytest.mark.skipif(grpc is None, reason="No grpc")
400
+ def test_from_grpc_error_misleading_404():
401
+ message = "Received http2 header with status: 404"
402
+ error = mock.create_autospec(grpc.Call, instance=True)
403
+ error.code.return_value = grpc.StatusCode.UNIMPLEMENTED
404
+ error.details.return_value = message
405
+
406
+ exception = exceptions.from_grpc_error(error)
407
+
408
+ assert isinstance(exception, exceptions.MethodNotImplemented)
409
+ assert exception.grpc_status_code == grpc.StatusCode.UNIMPLEMENTED
410
+ assert "Received http2 header with status: 404" in exception.message
411
+ assert "api_endpoint" in exception.message