google-cloud-spanner 3.59.0__tar.gz → 3.60.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 (218) hide show
  1. {google_cloud_spanner-3.59.0/google_cloud_spanner.egg-info → google_cloud_spanner-3.60.0}/PKG-INFO +8 -8
  2. google_cloud_spanner-3.60.0/google/cloud/spanner_admin_database_v1/gapic_version.py +16 -0
  3. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/services/database_admin/transports/base.py +3 -2
  4. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/services/database_admin/transports/grpc.py +6 -3
  5. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/services/database_admin/transports/grpc_asyncio.py +6 -3
  6. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/services/database_admin/transports/rest.py +3 -2
  7. google_cloud_spanner-3.60.0/google/cloud/spanner_admin_instance_v1/gapic_version.py +16 -0
  8. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/base.py +3 -2
  9. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/grpc.py +6 -3
  10. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/grpc_asyncio.py +6 -3
  11. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/rest.py +3 -2
  12. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/types/spanner_instance_admin.py +11 -0
  13. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/connection.py +6 -0
  14. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/version.py +2 -2
  15. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/_helpers.py +49 -4
  16. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/_opentelemetry_tracing.py +16 -20
  17. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/client.py +38 -5
  18. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/database.py +20 -1
  19. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/database_sessions_manager.py +3 -2
  20. google_cloud_spanner-3.60.0/google/cloud/spanner_v1/gapic_version.py +16 -0
  21. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/instance.py +2 -0
  22. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/metrics/constants.py +0 -1
  23. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/metrics/spanner_metrics_tracer_factory.py +3 -38
  24. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/request_id_header.py +1 -1
  25. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/services/spanner/async_client.py +6 -4
  26. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/services/spanner/client.py +6 -4
  27. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/services/spanner/transports/base.py +3 -2
  28. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/services/spanner/transports/grpc.py +6 -3
  29. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/services/spanner/transports/grpc_asyncio.py +6 -3
  30. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/services/spanner/transports/rest.py +3 -2
  31. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/session.py +44 -42
  32. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/snapshot.py +6 -2
  33. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/testing/database_test.py +12 -0
  34. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/transaction.py +6 -2
  35. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/types/__init__.py +18 -0
  36. google_cloud_spanner-3.60.0/google/cloud/spanner_v1/types/location.py +677 -0
  37. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/types/mutation.py +94 -0
  38. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/types/query_plan.py +53 -0
  39. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/types/result_set.py +14 -0
  40. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/types/spanner.py +36 -7
  41. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/types/transaction.py +5 -4
  42. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0/google_cloud_spanner.egg-info}/PKG-INFO +8 -8
  43. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google_cloud_spanner.egg-info/SOURCES.txt +2 -0
  44. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google_cloud_spanner.egg-info/requires.txt +6 -8
  45. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/setup.py +9 -11
  46. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/_helpers.py +6 -0
  47. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/conftest.py +18 -2
  48. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/test_backup_api.py +6 -0
  49. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/test_database_api.py +15 -2
  50. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/test_dbapi.py +7 -1
  51. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/test_instance_api.py +1 -0
  52. google_cloud_spanner-3.60.0/tests/system/test_metrics.py +92 -0
  53. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/test_session_api.py +8 -4
  54. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/gapic/spanner_admin_database_v1/test_database_admin.py +5 -0
  55. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/gapic/spanner_admin_instance_v1/test_instance_admin.py +5 -0
  56. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/gapic/spanner_v1/test_spanner.py +6 -0
  57. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test__helpers.py +47 -1
  58. google_cloud_spanner-3.60.0/tests/unit/test__opentelemetry_tracing.py +222 -0
  59. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_batch.py +117 -23
  60. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_client.py +34 -3
  61. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_database.py +4 -1
  62. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_pool.py +208 -41
  63. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_session.py +100 -75
  64. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_snapshot.py +350 -113
  65. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_spanner.py +48 -68
  66. google_cloud_spanner-3.60.0/tests/unit/test_spanner_metrics_tracer_factory.py +47 -0
  67. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_transaction.py +218 -47
  68. google_cloud_spanner-3.59.0/google/cloud/spanner_admin_database_v1/gapic_version.py +0 -16
  69. google_cloud_spanner-3.59.0/google/cloud/spanner_admin_instance_v1/gapic_version.py +0 -16
  70. google_cloud_spanner-3.59.0/google/cloud/spanner_v1/gapic_version.py +0 -16
  71. google_cloud_spanner-3.59.0/tests/unit/test__opentelemetry_tracing.py +0 -233
  72. google_cloud_spanner-3.59.0/tests/unit/test_spanner_metrics_tracer_factory.py +0 -97
  73. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/LICENSE +0 -0
  74. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/MANIFEST.in +0 -0
  75. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/README.rst +0 -0
  76. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner.py +0 -0
  77. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/__init__.py +0 -0
  78. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/gapic_metadata.json +0 -0
  79. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/py.typed +0 -0
  80. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/services/__init__.py +0 -0
  81. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/services/database_admin/__init__.py +0 -0
  82. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/services/database_admin/async_client.py +0 -0
  83. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/services/database_admin/client.py +0 -0
  84. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/services/database_admin/pagers.py +0 -0
  85. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/services/database_admin/transports/__init__.py +0 -0
  86. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/services/database_admin/transports/rest_base.py +0 -0
  87. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/types/__init__.py +0 -0
  88. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/types/backup.py +0 -0
  89. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/types/backup_schedule.py +0 -0
  90. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/types/common.py +0 -0
  91. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_database_v1/types/spanner_database_admin.py +0 -0
  92. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/__init__.py +0 -0
  93. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/gapic_metadata.json +0 -0
  94. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/py.typed +0 -0
  95. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/services/__init__.py +0 -0
  96. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/__init__.py +0 -0
  97. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/async_client.py +0 -0
  98. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/client.py +0 -0
  99. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/pagers.py +0 -0
  100. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/__init__.py +0 -0
  101. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/rest_base.py +0 -0
  102. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/types/__init__.py +0 -0
  103. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_admin_instance_v1/types/common.py +0 -0
  104. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/__init__.py +0 -0
  105. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/_helpers.py +0 -0
  106. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/batch_dml_executor.py +0 -0
  107. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/checksum.py +0 -0
  108. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/client_side_statement_executor.py +0 -0
  109. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/client_side_statement_parser.py +0 -0
  110. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/cursor.py +0 -0
  111. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/exceptions.py +0 -0
  112. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/parse_utils.py +0 -0
  113. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/parsed_statement.py +0 -0
  114. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/parser.py +0 -0
  115. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/partition_helper.py +0 -0
  116. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/transaction_helper.py +0 -0
  117. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/types.py +0 -0
  118. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_dbapi/utils.py +0 -0
  119. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/__init__.py +0 -0
  120. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/backup.py +0 -0
  121. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/batch.py +0 -0
  122. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/data_types.py +0 -0
  123. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/gapic_metadata.json +0 -0
  124. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/keyset.py +0 -0
  125. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/merged_result_set.py +0 -0
  126. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/metrics/metrics_capture.py +0 -0
  127. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/metrics/metrics_exporter.py +0 -0
  128. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/metrics/metrics_interceptor.py +0 -0
  129. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/metrics/metrics_tracer.py +0 -0
  130. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/metrics/metrics_tracer_factory.py +0 -0
  131. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/param_types.py +0 -0
  132. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/pool.py +0 -0
  133. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/py.typed +0 -0
  134. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/services/__init__.py +0 -0
  135. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/services/spanner/__init__.py +0 -0
  136. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/services/spanner/pagers.py +0 -0
  137. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/services/spanner/transports/__init__.py +0 -0
  138. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/services/spanner/transports/rest_base.py +0 -0
  139. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/streamed.py +0 -0
  140. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/table.py +0 -0
  141. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/testing/__init__.py +0 -0
  142. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/testing/interceptors.py +0 -0
  143. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/testing/mock_database_admin.py +0 -0
  144. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/testing/mock_spanner.py +0 -0
  145. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/testing/spanner_database_admin_pb2_grpc.py +0 -0
  146. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/testing/spanner_pb2_grpc.py +0 -0
  147. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/types/change_stream.py +0 -0
  148. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/types/commit_response.py +0 -0
  149. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/types/keys.py +0 -0
  150. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google/cloud/spanner_v1/types/type.py +0 -0
  151. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google_cloud_spanner.egg-info/dependency_links.txt +0 -0
  152. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google_cloud_spanner.egg-info/not-zip-safe +0 -0
  153. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/google_cloud_spanner.egg-info/top_level.txt +0 -0
  154. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/setup.cfg +0 -0
  155. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/__init__.py +0 -0
  156. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/_builders.py +0 -0
  157. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/_fixtures.py +0 -0
  158. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/_helpers.py +0 -0
  159. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/mockserver_tests/__init__.py +0 -0
  160. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/mockserver_tests/mock_server_test_base.py +0 -0
  161. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/mockserver_tests/test_aborted_transaction.py +0 -0
  162. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/mockserver_tests/test_basics.py +0 -0
  163. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/mockserver_tests/test_dbapi_autocommit.py +0 -0
  164. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/mockserver_tests/test_dbapi_isolation_level.py +0 -0
  165. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/mockserver_tests/test_request_id_header.py +0 -0
  166. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/mockserver_tests/test_tags.py +0 -0
  167. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/__init__.py +0 -0
  168. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/_sample_data.py +0 -0
  169. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/test_observability_options.py +0 -0
  170. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/test_streaming_chunking.py +0 -0
  171. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/test_table_api.py +0 -0
  172. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/testdata/descriptors.pb +0 -0
  173. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/testdata/singer.proto +0 -0
  174. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/testdata/singer_pb2.py +0 -0
  175. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/utils/__init__.py +0 -0
  176. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/utils/clear_streaming.py +0 -0
  177. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/utils/populate_streaming.py +0 -0
  178. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/utils/scrub_instances.py +0 -0
  179. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/system/utils/streaming_utils.py +0 -0
  180. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/__init__.py +0 -0
  181. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/gapic/__init__.py +0 -0
  182. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/gapic/spanner_admin_database_v1/__init__.py +0 -0
  183. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/gapic/spanner_admin_instance_v1/__init__.py +0 -0
  184. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/gapic/spanner_v1/__init__.py +0 -0
  185. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/spanner_dbapi/__init__.py +0 -0
  186. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/spanner_dbapi/test__helpers.py +0 -0
  187. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/spanner_dbapi/test_batch_dml_executor.py +0 -0
  188. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/spanner_dbapi/test_checksum.py +0 -0
  189. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/spanner_dbapi/test_client_side_statement_executor.py +0 -0
  190. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/spanner_dbapi/test_connect.py +0 -0
  191. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/spanner_dbapi/test_connection.py +0 -0
  192. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/spanner_dbapi/test_cursor.py +0 -0
  193. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/spanner_dbapi/test_globals.py +0 -0
  194. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/spanner_dbapi/test_parse_utils.py +0 -0
  195. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/spanner_dbapi/test_parser.py +0 -0
  196. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/spanner_dbapi/test_transaction_helper.py +0 -0
  197. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/spanner_dbapi/test_types.py +0 -0
  198. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/spanner_dbapi/test_utils.py +0 -0
  199. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/streaming-read-acceptance-test.json +0 -0
  200. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_atomic_counter.py +0 -0
  201. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_backup.py +0 -0
  202. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_database_session_manager.py +0 -0
  203. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_datatypes.py +0 -0
  204. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_instance.py +0 -0
  205. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_keyset.py +0 -0
  206. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_merged_result_set.py +0 -0
  207. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_metrics.py +0 -0
  208. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_metrics_capture.py +0 -0
  209. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_metrics_exporter.py +0 -0
  210. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_metrics_interceptor.py +0 -0
  211. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_metrics_tracer.py +0 -0
  212. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_metrics_tracer_factory.py +0 -0
  213. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_packaging.py +0 -0
  214. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_param_types.py +0 -0
  215. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_streamed.py +0 -0
  216. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/test_table.py +0 -0
  217. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/testdata/singer.proto +0 -0
  218. {google_cloud_spanner-3.59.0 → google_cloud_spanner-3.60.0}/tests/unit/testdata/singer_pb2.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-cloud-spanner
3
- Version: 3.59.0
3
+ Version: 3.60.0
4
4
  Summary: Google Cloud Spanner API client library
5
5
  Home-page: https://github.com/googleapis/python-spanner
6
6
  Author: Google LLC
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.9
16
16
  Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.14
19
20
  Classifier: Operating System :: OS Independent
20
21
  Classifier: Topic :: Internet
21
22
  Requires-Python: >=3.9
@@ -28,13 +29,12 @@ Requires-Dist: sqlparse>=0.4.4
28
29
  Requires-Dist: proto-plus<2.0.0,>=1.22.2; python_version >= "3.11"
29
30
  Requires-Dist: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<7.0.0,>=3.20.2
30
31
  Requires-Dist: grpc-interceptor>=0.15.4
31
- Provides-Extra: tracing
32
- Requires-Dist: opentelemetry-api>=1.22.0; extra == "tracing"
33
- Requires-Dist: opentelemetry-sdk>=1.22.0; extra == "tracing"
34
- Requires-Dist: opentelemetry-semantic-conventions>=0.43b0; extra == "tracing"
35
- Requires-Dist: opentelemetry-resourcedetector-gcp>=1.8.0a0; extra == "tracing"
36
- Requires-Dist: google-cloud-monitoring>=2.16.0; extra == "tracing"
37
- Requires-Dist: mmh3>=4.1.0; extra == "tracing"
32
+ Requires-Dist: opentelemetry-api>=1.22.0
33
+ Requires-Dist: opentelemetry-sdk>=1.22.0
34
+ Requires-Dist: opentelemetry-semantic-conventions>=0.43b0
35
+ Requires-Dist: opentelemetry-resourcedetector-gcp>=1.8.0a0
36
+ Requires-Dist: google-cloud-monitoring>=2.16.0
37
+ Requires-Dist: mmh3>=4.1.0
38
38
  Provides-Extra: libcst
39
39
  Requires-Dist: libcst>=0.2.5; extra == "libcst"
40
40
  Dynamic: author
@@ -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__ = "3.60.0" # {x-release-please-version}
@@ -81,9 +81,10 @@ class DatabaseAdminTransport(abc.ABC):
81
81
  credentials identify the application to the service; if none
82
82
  are specified, the client will attempt to ascertain the
83
83
  credentials from the environment.
84
- credentials_file (Optional[str]): A file with credentials that can
84
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
85
85
  be loaded with :func:`google.auth.load_credentials_from_file`.
86
- This argument is mutually exclusive with credentials.
86
+ This argument is mutually exclusive with credentials. This argument will be
87
+ removed in the next major version of this library.
87
88
  scopes (Optional[Sequence[str]]): A list of scopes.
88
89
  quota_project_id (Optional[str]): An optional project to use for billing
89
90
  and quota.
@@ -169,9 +169,10 @@ class DatabaseAdminGrpcTransport(DatabaseAdminTransport):
169
169
  are specified, the client will attempt to ascertain the
170
170
  credentials from the environment.
171
171
  This argument is ignored if a ``channel`` instance is provided.
172
- credentials_file (Optional[str]): A file with credentials that can
172
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
173
173
  be loaded with :func:`google.auth.load_credentials_from_file`.
174
174
  This argument is ignored if a ``channel`` instance is provided.
175
+ This argument will be removed in the next major version of this library.
175
176
  scopes (Optional(Sequence[str])): A list of scopes. This argument is
176
177
  ignored if a ``channel`` instance is provided.
177
178
  channel (Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]]):
@@ -276,6 +277,7 @@ class DatabaseAdminGrpcTransport(DatabaseAdminTransport):
276
277
  options=[
277
278
  ("grpc.max_send_message_length", -1),
278
279
  ("grpc.max_receive_message_length", -1),
280
+ ("grpc.keepalive_time_ms", 120000),
279
281
  ],
280
282
  )
281
283
 
@@ -305,9 +307,10 @@ class DatabaseAdminGrpcTransport(DatabaseAdminTransport):
305
307
  credentials identify this application to the service. If
306
308
  none are specified, the client will attempt to ascertain
307
309
  the credentials from the environment.
308
- credentials_file (Optional[str]): A file with credentials that can
310
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
309
311
  be loaded with :func:`google.auth.load_credentials_from_file`.
310
- This argument is mutually exclusive with credentials.
312
+ This argument is mutually exclusive with credentials. This argument will be
313
+ removed in the next major version of this library.
311
314
  scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
312
315
  service. These are only used when credentials are not specified and
313
316
  are passed to :func:`google.auth.default`.
@@ -166,8 +166,9 @@ class DatabaseAdminGrpcAsyncIOTransport(DatabaseAdminTransport):
166
166
  credentials identify this application to the service. If
167
167
  none are specified, the client will attempt to ascertain
168
168
  the credentials from the environment.
169
- credentials_file (Optional[str]): A file with credentials that can
170
- be loaded with :func:`google.auth.load_credentials_from_file`.
169
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
170
+ be loaded with :func:`google.auth.load_credentials_from_file`. This argument will be
171
+ removed in the next major version of this library.
171
172
  scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
172
173
  service. These are only used when credentials are not specified and
173
174
  are passed to :func:`google.auth.default`.
@@ -218,9 +219,10 @@ class DatabaseAdminGrpcAsyncIOTransport(DatabaseAdminTransport):
218
219
  are specified, the client will attempt to ascertain the
219
220
  credentials from the environment.
220
221
  This argument is ignored if a ``channel`` instance is provided.
221
- credentials_file (Optional[str]): A file with credentials that can
222
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
222
223
  be loaded with :func:`google.auth.load_credentials_from_file`.
223
224
  This argument is ignored if a ``channel`` instance is provided.
225
+ This argument will be removed in the next major version of this library.
224
226
  scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
225
227
  service. These are only used when credentials are not specified and
226
228
  are passed to :func:`google.auth.default`.
@@ -325,6 +327,7 @@ class DatabaseAdminGrpcAsyncIOTransport(DatabaseAdminTransport):
325
327
  options=[
326
328
  ("grpc.max_send_message_length", -1),
327
329
  ("grpc.max_receive_message_length", -1),
330
+ ("grpc.keepalive_time_ms", 120000),
328
331
  ],
329
332
  )
330
333
 
@@ -1622,9 +1622,10 @@ class DatabaseAdminRestTransport(_BaseDatabaseAdminRestTransport):
1622
1622
  are specified, the client will attempt to ascertain the
1623
1623
  credentials from the environment.
1624
1624
 
1625
- credentials_file (Optional[str]): A file with credentials that can
1625
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
1626
1626
  be loaded with :func:`google.auth.load_credentials_from_file`.
1627
- This argument is ignored if ``channel`` is provided.
1627
+ This argument is ignored if ``channel`` is provided. This argument will be
1628
+ removed in the next major version of this library.
1628
1629
  scopes (Optional(Sequence[str])): A list of scopes. This argument is
1629
1630
  ignored if ``channel`` is provided.
1630
1631
  client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client
@@ -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__ = "3.60.0" # {x-release-please-version}
@@ -75,9 +75,10 @@ class InstanceAdminTransport(abc.ABC):
75
75
  credentials identify the application to the service; if none
76
76
  are specified, the client will attempt to ascertain the
77
77
  credentials from the environment.
78
- credentials_file (Optional[str]): A file with credentials that can
78
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
79
79
  be loaded with :func:`google.auth.load_credentials_from_file`.
80
- This argument is mutually exclusive with credentials.
80
+ This argument is mutually exclusive with credentials. This argument will be
81
+ removed in the next major version of this library.
81
82
  scopes (Optional[Sequence[str]]): A list of scopes.
82
83
  quota_project_id (Optional[str]): An optional project to use for billing
83
84
  and quota.
@@ -178,9 +178,10 @@ class InstanceAdminGrpcTransport(InstanceAdminTransport):
178
178
  are specified, the client will attempt to ascertain the
179
179
  credentials from the environment.
180
180
  This argument is ignored if a ``channel`` instance is provided.
181
- credentials_file (Optional[str]): A file with credentials that can
181
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
182
182
  be loaded with :func:`google.auth.load_credentials_from_file`.
183
183
  This argument is ignored if a ``channel`` instance is provided.
184
+ This argument will be removed in the next major version of this library.
184
185
  scopes (Optional(Sequence[str])): A list of scopes. This argument is
185
186
  ignored if a ``channel`` instance is provided.
186
187
  channel (Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]]):
@@ -285,6 +286,7 @@ class InstanceAdminGrpcTransport(InstanceAdminTransport):
285
286
  options=[
286
287
  ("grpc.max_send_message_length", -1),
287
288
  ("grpc.max_receive_message_length", -1),
289
+ ("grpc.keepalive_time_ms", 120000),
288
290
  ],
289
291
  )
290
292
 
@@ -314,9 +316,10 @@ class InstanceAdminGrpcTransport(InstanceAdminTransport):
314
316
  credentials identify this application to the service. If
315
317
  none are specified, the client will attempt to ascertain
316
318
  the credentials from the environment.
317
- credentials_file (Optional[str]): A file with credentials that can
319
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
318
320
  be loaded with :func:`google.auth.load_credentials_from_file`.
319
- This argument is mutually exclusive with credentials.
321
+ This argument is mutually exclusive with credentials. This argument will be
322
+ removed in the next major version of this library.
320
323
  scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
321
324
  service. These are only used when credentials are not specified and
322
325
  are passed to :func:`google.auth.default`.
@@ -175,8 +175,9 @@ class InstanceAdminGrpcAsyncIOTransport(InstanceAdminTransport):
175
175
  credentials identify this application to the service. If
176
176
  none are specified, the client will attempt to ascertain
177
177
  the credentials from the environment.
178
- credentials_file (Optional[str]): A file with credentials that can
179
- be loaded with :func:`google.auth.load_credentials_from_file`.
178
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
179
+ be loaded with :func:`google.auth.load_credentials_from_file`. This argument will be
180
+ removed in the next major version of this library.
180
181
  scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
181
182
  service. These are only used when credentials are not specified and
182
183
  are passed to :func:`google.auth.default`.
@@ -227,9 +228,10 @@ class InstanceAdminGrpcAsyncIOTransport(InstanceAdminTransport):
227
228
  are specified, the client will attempt to ascertain the
228
229
  credentials from the environment.
229
230
  This argument is ignored if a ``channel`` instance is provided.
230
- credentials_file (Optional[str]): A file with credentials that can
231
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
231
232
  be loaded with :func:`google.auth.load_credentials_from_file`.
232
233
  This argument is ignored if a ``channel`` instance is provided.
234
+ This argument will be removed in the next major version of this library.
233
235
  scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
234
236
  service. These are only used when credentials are not specified and
235
237
  are passed to :func:`google.auth.default`.
@@ -334,6 +336,7 @@ class InstanceAdminGrpcAsyncIOTransport(InstanceAdminTransport):
334
336
  options=[
335
337
  ("grpc.max_send_message_length", -1),
336
338
  ("grpc.max_receive_message_length", -1),
339
+ ("grpc.keepalive_time_ms", 120000),
337
340
  ],
338
341
  )
339
342
 
@@ -1355,9 +1355,10 @@ class InstanceAdminRestTransport(_BaseInstanceAdminRestTransport):
1355
1355
  are specified, the client will attempt to ascertain the
1356
1356
  credentials from the environment.
1357
1357
 
1358
- credentials_file (Optional[str]): A file with credentials that can
1358
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
1359
1359
  be loaded with :func:`google.auth.load_credentials_from_file`.
1360
- This argument is ignored if ``channel`` is provided.
1360
+ This argument is ignored if ``channel`` is provided. This argument will be
1361
+ removed in the next major version of this library.
1361
1362
  scopes (Optional(Sequence[str])): A list of scopes. This argument is
1362
1363
  ignored if ``channel`` is provided.
1363
1364
  client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client
@@ -1765,6 +1765,12 @@ class InstancePartition(proto.Message):
1765
1765
  that are not yet in the ``READY`` state.
1766
1766
 
1767
1767
  This field is a member of `oneof`_ ``compute_capacity``.
1768
+ autoscaling_config (google.cloud.spanner_admin_instance_v1.types.AutoscalingConfig):
1769
+ Optional. The autoscaling configuration. Autoscaling is
1770
+ enabled if this field is set. When autoscaling is enabled,
1771
+ fields in compute_capacity are treated as OUTPUT_ONLY fields
1772
+ and reflect the current compute capacity allocated to the
1773
+ instance partition.
1768
1774
  state (google.cloud.spanner_admin_instance_v1.types.InstancePartition.State):
1769
1775
  Output only. The current instance partition
1770
1776
  state.
@@ -1848,6 +1854,11 @@ class InstancePartition(proto.Message):
1848
1854
  number=6,
1849
1855
  oneof="compute_capacity",
1850
1856
  )
1857
+ autoscaling_config: "AutoscalingConfig" = proto.Field(
1858
+ proto.MESSAGE,
1859
+ number=13,
1860
+ message="AutoscalingConfig",
1861
+ )
1851
1862
  state: State = proto.Field(
1852
1863
  proto.ENUM,
1853
1864
  number=7,
@@ -15,6 +15,7 @@
15
15
  """DB-API Connection for the Google Cloud Spanner."""
16
16
  import warnings
17
17
 
18
+ from google.api_core.client_options import ClientOptions
18
19
  from google.api_core.exceptions import Aborted
19
20
  from google.api_core.gapic_v1.client_info import ClientInfo
20
21
  from google.auth.credentials import AnonymousCredentials
@@ -734,6 +735,7 @@ def connect(
734
735
  client=None,
735
736
  route_to_leader_enabled=True,
736
737
  database_role=None,
738
+ experimental_host=None,
737
739
  **kwargs,
738
740
  ):
739
741
  """Creates a connection to a Google Cloud Spanner database.
@@ -805,6 +807,10 @@ def connect(
805
807
  client_options = None
806
808
  if isinstance(credentials, AnonymousCredentials):
807
809
  client_options = kwargs.get("client_options")
810
+ if experimental_host is not None:
811
+ project = "default"
812
+ credentials = AnonymousCredentials()
813
+ client_options = ClientOptions(api_endpoint=experimental_host)
808
814
  client = spanner.Client(
809
815
  project=project,
810
816
  credentials=credentials,
@@ -13,8 +13,8 @@
13
13
  # limitations under the License.
14
14
 
15
15
  import platform
16
- from google.cloud.spanner_v1 import gapic_version as package_version
17
16
 
18
17
  PY_VERSION = platform.python_version()
19
- VERSION = package_version.__version__
18
+ __version__ = "3.60.0"
19
+ VERSION = __version__
20
20
  DEFAULT_USER_AGENT = "gl-dbapi/" + VERSION
@@ -20,6 +20,7 @@ import math
20
20
  import time
21
21
  import base64
22
22
  import threading
23
+ import logging
23
24
 
24
25
  from google.protobuf.struct_pb2 import ListValue
25
26
  from google.protobuf.struct_pb2 import Value
@@ -29,16 +30,27 @@ from google.protobuf.internal.enum_type_wrapper import EnumTypeWrapper
29
30
  from google.api_core import datetime_helpers
30
31
  from google.api_core.exceptions import Aborted
31
32
  from google.cloud._helpers import _date_from_iso8601_date
32
- from google.cloud.spanner_v1 import TypeCode
33
- from google.cloud.spanner_v1 import ExecuteSqlRequest
34
- from google.cloud.spanner_v1 import JsonObject, Interval
35
- from google.cloud.spanner_v1 import TransactionOptions
33
+ from google.cloud.spanner_v1.types import ExecuteSqlRequest
34
+ from google.cloud.spanner_v1.types import TransactionOptions
35
+ from google.cloud.spanner_v1.data_types import JsonObject, Interval
36
36
  from google.cloud.spanner_v1.request_id_header import with_request_id
37
+ from google.cloud.spanner_v1.types import TypeCode
38
+
37
39
  from google.rpc.error_details_pb2 import RetryInfo
38
40
 
39
41
  try:
40
42
  from opentelemetry.propagate import inject
41
43
  from opentelemetry.propagators.textmap import Setter
44
+ from opentelemetry.semconv.resource import ResourceAttributes
45
+ from opentelemetry.resourcedetector import gcp_resource_detector
46
+ from opentelemetry.resourcedetector.gcp_resource_detector import (
47
+ GoogleCloudResourceDetector,
48
+ )
49
+
50
+ # Overwrite the requests timeout for the detector.
51
+ # This is necessary as the client will wait the full timeout if the
52
+ # code is not run in a GCP environment, with the location endpoints available.
53
+ gcp_resource_detector._TIMEOUT_SEC = 0.2
42
54
 
43
55
  HAS_OPENTELEMETRY_INSTALLED = True
44
56
  except ImportError:
@@ -55,6 +67,12 @@ NUMERIC_MAX_PRECISION_ERR_MSG = (
55
67
  + "numeric has a whole component with precision {}"
56
68
  )
57
69
 
70
+ GOOGLE_CLOUD_REGION_GLOBAL = "global"
71
+
72
+ log = logging.getLogger(__name__)
73
+
74
+ _cloud_region: str = None
75
+
58
76
 
59
77
  if HAS_OPENTELEMETRY_INSTALLED:
60
78
 
@@ -79,6 +97,33 @@ if HAS_OPENTELEMETRY_INSTALLED:
79
97
  carrier.append((key, value))
80
98
 
81
99
 
100
+ def _get_cloud_region() -> str:
101
+ """Get the location of the resource, caching the result.
102
+
103
+ Returns:
104
+ str: The location of the resource. If OpenTelemetry is not installed, returns a global region.
105
+ """
106
+ global _cloud_region
107
+ if _cloud_region is not None:
108
+ return _cloud_region
109
+
110
+ try:
111
+ detector = GoogleCloudResourceDetector()
112
+ resources = detector.detect()
113
+ if ResourceAttributes.CLOUD_REGION in resources.attributes:
114
+ _cloud_region = resources.attributes[ResourceAttributes.CLOUD_REGION]
115
+ else:
116
+ _cloud_region = GOOGLE_CLOUD_REGION_GLOBAL
117
+ except Exception as e:
118
+ log.warning(
119
+ "Failed to detect GCP resource location for Spanner metrics, defaulting to 'global'. Error: %s",
120
+ e,
121
+ )
122
+ _cloud_region = GOOGLE_CLOUD_REGION_GLOBAL
123
+
124
+ return _cloud_region
125
+
126
+
82
127
  def _try_to_coerce_bytes(bytestring):
83
128
  """Try to coerce a byte string into the right thing based on Python
84
129
  version and whether or not it is base64 encoded.
@@ -21,20 +21,16 @@ import os
21
21
  from google.cloud.spanner_v1 import SpannerClient
22
22
  from google.cloud.spanner_v1 import gapic_version
23
23
  from google.cloud.spanner_v1._helpers import (
24
+ _get_cloud_region,
24
25
  _metadata_with_span_context,
25
26
  )
26
27
 
27
- try:
28
- from opentelemetry import trace
29
- from opentelemetry.trace.status import Status, StatusCode
30
- from opentelemetry.semconv.attributes.otel_attributes import (
31
- OTEL_SCOPE_NAME,
32
- OTEL_SCOPE_VERSION,
33
- )
34
-
35
- HAS_OPENTELEMETRY_INSTALLED = True
36
- except ImportError:
37
- HAS_OPENTELEMETRY_INSTALLED = False
28
+ from opentelemetry import trace
29
+ from opentelemetry.trace.status import Status, StatusCode
30
+ from opentelemetry.semconv.attributes.otel_attributes import (
31
+ OTEL_SCOPE_NAME,
32
+ OTEL_SCOPE_VERSION,
33
+ )
38
34
 
39
35
  from google.cloud.spanner_v1.metrics.metrics_capture import MetricsCapture
40
36
 
@@ -70,11 +66,6 @@ def trace_call(
70
66
  if session:
71
67
  session._last_use_time = datetime.now()
72
68
 
73
- if not (HAS_OPENTELEMETRY_INSTALLED and name):
74
- # Empty context manager. Users will have to check if the generated value is None or a span
75
- yield None
76
- return
77
-
78
69
  tracer_provider = None
79
70
 
80
71
  # By default enable_extended_tracing=True because in a bid to minimize
@@ -85,6 +76,7 @@ def trace_call(
85
76
  enable_end_to_end_tracing = False
86
77
 
87
78
  db_name = ""
79
+ cloud_region = None
88
80
  if session and getattr(session, "_database", None):
89
81
  db_name = session._database.name
90
82
 
@@ -98,6 +90,7 @@ def trace_call(
98
90
  )
99
91
  db_name = observability_options.get("db_name", db_name)
100
92
 
93
+ cloud_region = _get_cloud_region()
101
94
  tracer = get_tracer(tracer_provider)
102
95
 
103
96
  # Set base attributes that we know for every trace created
@@ -107,6 +100,7 @@ def trace_call(
107
100
  "db.instance": db_name,
108
101
  "net.host.name": SpannerClient.DEFAULT_ENDPOINT,
109
102
  OTEL_SCOPE_NAME: TRACER_NAME,
103
+ "cloud.region": cloud_region,
110
104
  OTEL_SCOPE_VERSION: TRACER_VERSION,
111
105
  # Standard GCP attributes for OTel, attributes are used for internal purpose and are subjected to change
112
106
  "gcp.client.service": "spanner",
@@ -117,6 +111,11 @@ def trace_call(
117
111
  if extra_attributes:
118
112
  attributes.update(extra_attributes)
119
113
 
114
+ if "request_options" in attributes:
115
+ request_options = attributes.pop("request_options")
116
+ if request_options and request_options.request_tag:
117
+ attributes["request.tag"] = request_options.request_tag
118
+
120
119
  if extended_tracing_globally_disabled:
121
120
  enable_extended_tracing = False
122
121
 
@@ -155,11 +154,8 @@ def trace_call(
155
154
 
156
155
 
157
156
  def get_current_span():
158
- if not HAS_OPENTELEMETRY_INSTALLED:
159
- return None
160
157
  return trace.get_current_span()
161
158
 
162
159
 
163
160
  def add_span_event(span, event_name, event_attributes=None):
164
- if span:
165
- span.add_event(event_name, event_attributes)
161
+ span.add_event(event_name, event_attributes)
@@ -52,7 +52,6 @@ from google.cloud.spanner_v1._helpers import _merge_query_options
52
52
  from google.cloud.spanner_v1._helpers import _metadata_with_prefix
53
53
  from google.cloud.spanner_v1.instance import Instance
54
54
  from google.cloud.spanner_v1.metrics.constants import (
55
- ENABLE_SPANNER_METRICS_ENV_VAR,
56
55
  METRIC_EXPORT_INTERVAL_MS,
57
56
  )
58
57
  from google.cloud.spanner_v1.metrics.spanner_metrics_tracer_factory import (
@@ -75,7 +74,7 @@ from google.cloud.spanner_v1._helpers import AtomicCounter
75
74
 
76
75
  _CLIENT_INFO = client_info.ClientInfo(client_library_version=__version__)
77
76
  EMULATOR_ENV_VAR = "SPANNER_EMULATOR_HOST"
78
- ENABLE_BUILTIN_METRICS_ENV_VAR = "SPANNER_ENABLE_BUILTIN_METRICS"
77
+ SPANNER_DISABLE_BUILTIN_METRICS_ENV_VAR = "SPANNER_DISABLE_BUILTIN_METRICS"
79
78
  _EMULATOR_HOST_HTTP_SCHEME = (
80
79
  "%s contains a http scheme. When used with a scheme it may cause gRPC's "
81
80
  "DNS resolver to endlessly attempt to resolve. %s is intended to be used "
@@ -101,8 +100,8 @@ def _get_spanner_optimizer_statistics_package():
101
100
  log = logging.getLogger(__name__)
102
101
 
103
102
 
104
- def _get_spanner_enable_builtin_metrics():
105
- return os.getenv(ENABLE_SPANNER_METRICS_ENV_VAR) == "true"
103
+ def _get_spanner_enable_builtin_metrics_env():
104
+ return os.getenv(SPANNER_DISABLE_BUILTIN_METRICS_ENV_VAR) != "true"
106
105
 
107
106
 
108
107
  class Client(ClientWithProject):
@@ -176,6 +175,15 @@ class Client(ClientWithProject):
176
175
  or :class:`dict`
177
176
  :param default_transaction_options: (Optional) Default options to use for all transactions.
178
177
 
178
+ :type experimental_host: str
179
+ :param experimental_host: (Optional) The endpoint for a spanner experimental host deployment.
180
+ This is intended only for experimental host spanner endpoints.
181
+ If set, this will override the `api_endpoint` in `client_options`.
182
+
183
+ :type disable_builtin_metrics: bool
184
+ :param disable_builtin_metrics: (Optional) Default False. Set to True to disable
185
+ the Spanner built-in metrics collection and exporting.
186
+
179
187
  :raises: :class:`ValueError <exceptions.ValueError>` if both ``read_only``
180
188
  and ``admin`` are :data:`True`
181
189
  """
@@ -200,8 +208,11 @@ class Client(ClientWithProject):
200
208
  directed_read_options=None,
201
209
  observability_options=None,
202
210
  default_transaction_options: Optional[DefaultTransactionOptions] = None,
211
+ experimental_host=None,
212
+ disable_builtin_metrics=False,
203
213
  ):
204
214
  self._emulator_host = _get_spanner_emulator_host()
215
+ self._experimental_host = experimental_host
205
216
 
206
217
  if client_options and type(client_options) is dict:
207
218
  self._client_options = google.api_core.client_options.from_dict(
@@ -212,6 +223,8 @@ class Client(ClientWithProject):
212
223
 
213
224
  if self._emulator_host:
214
225
  credentials = AnonymousCredentials()
226
+ elif self._experimental_host:
227
+ credentials = AnonymousCredentials()
215
228
  elif isinstance(credentials, AnonymousCredentials):
216
229
  self._emulator_host = self._client_options.api_endpoint
217
230
 
@@ -240,7 +253,8 @@ class Client(ClientWithProject):
240
253
  warnings.warn(_EMULATOR_HOST_HTTP_SCHEME)
241
254
  # Check flag to enable Spanner builtin metrics
242
255
  if (
243
- _get_spanner_enable_builtin_metrics()
256
+ _get_spanner_enable_builtin_metrics_env()
257
+ and not disable_builtin_metrics
244
258
  and HAS_GOOGLE_CLOUD_MONITORING_INSTALLED
245
259
  ):
246
260
  meter_provider = metrics.NoOpMeterProvider()
@@ -324,6 +338,15 @@ class Client(ClientWithProject):
324
338
  client_options=self._client_options,
325
339
  transport=transport,
326
340
  )
341
+ elif self._experimental_host:
342
+ transport = InstanceAdminGrpcTransport(
343
+ channel=grpc.insecure_channel(target=self._experimental_host)
344
+ )
345
+ self._instance_admin_api = InstanceAdminClient(
346
+ client_info=self._client_info,
347
+ client_options=self._client_options,
348
+ transport=transport,
349
+ )
327
350
  else:
328
351
  self._instance_admin_api = InstanceAdminClient(
329
352
  credentials=self.credentials,
@@ -345,6 +368,15 @@ class Client(ClientWithProject):
345
368
  client_options=self._client_options,
346
369
  transport=transport,
347
370
  )
371
+ elif self._experimental_host:
372
+ transport = DatabaseAdminGrpcTransport(
373
+ channel=grpc.insecure_channel(target=self._experimental_host)
374
+ )
375
+ self._database_admin_api = DatabaseAdminClient(
376
+ client_info=self._client_info,
377
+ client_options=self._client_options,
378
+ transport=transport,
379
+ )
348
380
  else:
349
381
  self._database_admin_api = DatabaseAdminClient(
350
382
  credentials=self.credentials,
@@ -485,6 +517,7 @@ class Client(ClientWithProject):
485
517
  self._emulator_host,
486
518
  labels,
487
519
  processing_units,
520
+ self._experimental_host,
488
521
  )
489
522
 
490
523
  def list_instances(self, filter_="", page_size=None):
@@ -203,8 +203,11 @@ class Database(object):
203
203
 
204
204
  self._pool = pool
205
205
  pool.bind(self)
206
+ is_experimental_host = self._instance.experimental_host is not None
206
207
 
207
- self._sessions_manager = DatabaseSessionsManager(self, pool)
208
+ self._sessions_manager = DatabaseSessionsManager(
209
+ self, pool, is_experimental_host
210
+ )
208
211
 
209
212
  @classmethod
210
213
  def from_pb(cls, database_pb, instance, pool=None):
@@ -449,6 +452,16 @@ class Database(object):
449
452
  client_info=client_info, transport=transport
450
453
  )
451
454
  return self._spanner_api
455
+ if self._instance.experimental_host is not None:
456
+ transport = SpannerGrpcTransport(
457
+ channel=grpc.insecure_channel(self._instance.experimental_host)
458
+ )
459
+ self._spanner_api = SpannerClient(
460
+ client_info=client_info,
461
+ transport=transport,
462
+ client_options=client_options,
463
+ )
464
+ return self._spanner_api
452
465
  credentials = self._instance._client.credentials
453
466
  if isinstance(credentials, google.auth.credentials.Scoped):
454
467
  credentials = credentials.with_scopes((SPANNER_DATA_SCOPE,))
@@ -1012,8 +1025,14 @@ class Database(object):
1012
1025
  reraises any non-ABORT exceptions raised by ``func``.
1013
1026
  """
1014
1027
  observability_options = getattr(self, "observability_options", None)
1028
+ transaction_tag = kw.get("transaction_tag")
1029
+ extra_attributes = {}
1030
+ if transaction_tag:
1031
+ extra_attributes["transaction.tag"] = transaction_tag
1032
+
1015
1033
  with trace_call(
1016
1034
  "CloudSpanner.Database.run_in_transaction",
1035
+ extra_attributes=extra_attributes,
1017
1036
  observability_options=observability_options,
1018
1037
  ), MetricsCapture():
1019
1038
  # Sanity check: Is there a transaction already running?