google-cloud-spanner 3.63.0__tar.gz → 3.65.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 (269) hide show
  1. google_cloud_spanner-3.65.0/MANIFEST.in +20 -0
  2. {google_cloud_spanner-3.63.0/google_cloud_spanner.egg-info → google_cloud_spanner-3.65.0}/PKG-INFO +154 -46
  3. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/README.rst +151 -44
  4. google_cloud_spanner-3.65.0/google/cloud/aio/_cross_sync/__init__.py +19 -0
  5. google_cloud_spanner-3.65.0/google/cloud/aio/_cross_sync/_decorators.py +467 -0
  6. google_cloud_spanner-3.65.0/google/cloud/aio/_cross_sync/_mapping_meta.py +65 -0
  7. google_cloud_spanner-3.65.0/google/cloud/aio/_cross_sync/cross_sync.py +424 -0
  8. google_cloud_spanner-3.63.0/google/cloud/spanner.py → google_cloud_spanner-3.65.0/google/cloud/spanner/__init__.py +16 -14
  9. {google_cloud_spanner-3.63.0/google/cloud/spanner_admin_database_v1 → google_cloud_spanner-3.65.0/google/cloud/spanner}/gapic_version.py +1 -1
  10. google_cloud_spanner-3.65.0/google/cloud/spanner_admin_database/__init__.py +161 -0
  11. {google_cloud_spanner-3.63.0/google/cloud/spanner_admin_instance_v1 → google_cloud_spanner-3.65.0/google/cloud/spanner_admin_database}/gapic_version.py +1 -1
  12. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/__init__.py +74 -67
  13. {google_cloud_spanner-3.63.0/google/cloud/spanner_v1 → google_cloud_spanner-3.65.0/google/cloud/spanner_admin_database_v1}/gapic_version.py +1 -1
  14. google_cloud_spanner-3.65.0/google/cloud/spanner_admin_database_v1/py.typed +2 -0
  15. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/services/database_admin/async_client.py +74 -49
  16. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/services/database_admin/client.py +80 -59
  17. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/services/database_admin/pagers.py +25 -21
  18. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/services/database_admin/transports/__init__.py +1 -3
  19. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/services/database_admin/transports/base.py +34 -19
  20. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/services/database_admin/transports/grpc.py +27 -23
  21. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/services/database_admin/transports/grpc_asyncio.py +28 -24
  22. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/services/database_admin/transports/rest.py +49 -64
  23. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/services/database_admin/transports/rest_base.py +13 -13
  24. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/types/backup.py +18 -16
  25. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/types/backup_schedule.py +3 -4
  26. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/types/common.py +4 -4
  27. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/types/spanner_database_admin.py +8 -6
  28. google_cloud_spanner-3.65.0/google/cloud/spanner_admin_instance/__init__.py +117 -0
  29. google_cloud_spanner-3.65.0/google/cloud/spanner_admin_instance/gapic_version.py +16 -0
  30. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/__init__.py +46 -47
  31. google_cloud_spanner-3.65.0/google/cloud/spanner_admin_instance_v1/gapic_version.py +16 -0
  32. google_cloud_spanner-3.65.0/google/cloud/spanner_admin_instance_v1/py.typed +2 -0
  33. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/async_client.py +66 -43
  34. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/client.py +72 -53
  35. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/pagers.py +18 -16
  36. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/__init__.py +1 -3
  37. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/base.py +29 -16
  38. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/grpc.py +28 -26
  39. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/grpc_asyncio.py +29 -27
  40. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/rest.py +72 -90
  41. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/rest_base.py +8 -10
  42. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/types/common.py +2 -3
  43. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/types/spanner_instance_admin.py +109 -18
  44. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/__init__.py +28 -30
  45. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/_helpers.py +0 -1
  46. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/batch_dml_executor.py +19 -4
  47. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/connection.py +51 -14
  48. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/cursor.py +57 -31
  49. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/parse_utils.py +3 -2
  50. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/partition_helper.py +3 -4
  51. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/transaction_helper.py +7 -6
  52. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/types.py +3 -3
  53. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/version.py +1 -1
  54. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/__init__.py +67 -56
  55. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/_async/_helpers.py +131 -0
  56. {google_cloud_spanner-3.63.0/google/cloud/spanner_v1 → google_cloud_spanner-3.65.0/google/cloud/spanner_v1/_async}/batch.py +102 -47
  57. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/_async/client.py +710 -0
  58. {google_cloud_spanner-3.63.0/google/cloud/spanner_v1 → google_cloud_spanner-3.65.0/google/cloud/spanner_v1/_async}/database.py +380 -406
  59. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/_async/database_sessions_manager.py +243 -0
  60. {google_cloud_spanner-3.63.0/google/cloud/spanner_v1 → google_cloud_spanner-3.65.0/google/cloud/spanner_v1/_async}/instance.py +68 -36
  61. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/_async/pool.py +974 -0
  62. {google_cloud_spanner-3.63.0/google/cloud/spanner_v1 → google_cloud_spanner-3.65.0/google/cloud/spanner_v1/_async}/session.py +105 -67
  63. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/_async/snapshot.py +857 -0
  64. {google_cloud_spanner-3.63.0/google/cloud/spanner_v1 → google_cloud_spanner-3.65.0/google/cloud/spanner_v1/_async}/streamed.py +32 -20
  65. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/_async/testing/database_test.py +207 -0
  66. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/_async/testing/interceptors.py +107 -0
  67. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/_async/transaction.py +881 -0
  68. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/_helpers.py +200 -31
  69. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/_opentelemetry_tracing.py +9 -10
  70. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/backup.py +7 -6
  71. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/batch.py +419 -0
  72. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/client.py +96 -91
  73. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/data_types.py +3 -2
  74. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/database.py +1869 -0
  75. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/database_sessions_manager.py +53 -109
  76. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/gapic_version.py +16 -0
  77. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/instance.py +692 -0
  78. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/keyset.py +3 -5
  79. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/merged_result_set.py +9 -6
  80. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/metrics/metrics_capture.py +17 -0
  81. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/metrics/metrics_exporter.py +59 -34
  82. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/metrics/metrics_interceptor.py +4 -6
  83. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/metrics/metrics_tracer.py +5 -3
  84. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/metrics/metrics_tracer_factory.py +17 -18
  85. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/metrics/spanner_metrics_tracer_factory.py +9 -6
  86. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/param_types.py +7 -5
  87. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/pool.py +192 -194
  88. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/py.typed +2 -0
  89. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/services/spanner/async_client.py +31 -22
  90. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/services/spanner/client.py +37 -32
  91. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/services/spanner/pagers.py +8 -7
  92. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/services/spanner/transports/__init__.py +1 -3
  93. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/services/spanner/transports/base.py +23 -13
  94. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/services/spanner/transports/grpc.py +20 -14
  95. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/services/spanner/transports/grpc_asyncio.py +20 -15
  96. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/services/spanner/transports/rest.py +24 -22
  97. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/services/spanner/transports/rest_base.py +11 -11
  98. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/session.py +608 -0
  99. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/snapshot.py +221 -401
  100. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/snapshot_helpers.py +730 -0
  101. google_cloud_spanner-3.65.0/google/cloud/spanner_v1/streamed.py +367 -0
  102. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/table.py +1 -5
  103. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/testing/database_test.py +30 -19
  104. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/testing/interceptors.py +3 -2
  105. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/testing/mock_database_admin.py +1 -0
  106. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/testing/mock_spanner.py +60 -7
  107. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/testing/spanner_database_admin_pb2_grpc.py +1 -0
  108. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/testing/spanner_pb2_grpc.py +1 -0
  109. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/transaction.py +94 -187
  110. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/types/change_stream.py +16 -15
  111. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/types/commit_response.py +15 -3
  112. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/types/keys.py +1 -3
  113. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/types/location.py +10 -11
  114. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/types/mutation.py +2 -3
  115. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/types/query_plan.py +2 -3
  116. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/types/result_set.py +14 -2
  117. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/types/spanner.py +105 -38
  118. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/types/transaction.py +44 -25
  119. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/types/type.py +2 -1
  120. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0/google_cloud_spanner.egg-info}/PKG-INFO +154 -46
  121. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google_cloud_spanner.egg-info/SOURCES.txt +51 -1
  122. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google_cloud_spanner.egg-info/requires.txt +1 -1
  123. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/setup.py +13 -13
  124. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/_builders.py +59 -13
  125. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/_fixtures.py +0 -1
  126. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/_helpers.py +8 -4
  127. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/mockserver_tests/mock_server_test_base.py +203 -37
  128. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/mockserver_tests/test_aborted_transaction.py +7 -6
  129. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/mockserver_tests/test_basics.py +5 -9
  130. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/mockserver_tests/test_dbapi_autocommit.py +4 -5
  131. google_cloud_spanner-3.65.0/tests/mockserver_tests/test_dbapi_inline_begin.py +906 -0
  132. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/mockserver_tests/test_dbapi_isolation_level.py +19 -44
  133. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/mockserver_tests/test_request_id_header.py +8 -7
  134. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/mockserver_tests/test_tags.py +10 -13
  135. google_cloud_spanner-3.65.0/tests/system/_async/__init__.py +0 -0
  136. google_cloud_spanner-3.65.0/tests/system/_async/conftest.py +210 -0
  137. google_cloud_spanner-3.65.0/tests/system/_async/pytest.ini +4 -0
  138. google_cloud_spanner-3.65.0/tests/system/_async/test_database_api.py +194 -0
  139. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/_helpers.py +11 -5
  140. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/_sample_data.py +79 -0
  141. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/conftest.py +6 -2
  142. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/test_backup_api.py +3 -2
  143. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/test_database_api.py +6 -9
  144. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/test_dbapi.py +153 -94
  145. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/test_instance_api.py +0 -1
  146. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/test_session_api.py +26 -22
  147. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/test_table_api.py +2 -1
  148. {google_cloud_spanner-3.63.0/tests/unit → google_cloud_spanner-3.65.0/tests/system}/testdata/singer_pb2.py +1 -0
  149. google_cloud_spanner-3.65.0/tests/system/utils/__init__.py +0 -0
  150. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/utils/clear_streaming.py +3 -5
  151. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/utils/populate_streaming.py +12 -13
  152. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/utils/scrub_instances.py +1 -0
  153. google_cloud_spanner-3.65.0/tests/unit/_async/test_batch.py +301 -0
  154. google_cloud_spanner-3.65.0/tests/unit/_async/test_client.py +780 -0
  155. google_cloud_spanner-3.65.0/tests/unit/_async/test_client_extra.py +225 -0
  156. google_cloud_spanner-3.65.0/tests/unit/_async/test_database.py +4361 -0
  157. google_cloud_spanner-3.65.0/tests/unit/_async/test_database_extra.py +513 -0
  158. google_cloud_spanner-3.65.0/tests/unit/_async/test_helpers_extra.py +143 -0
  159. google_cloud_spanner-3.65.0/tests/unit/_async/test_instance_extra.py +207 -0
  160. google_cloud_spanner-3.65.0/tests/unit/_async/test_pool.py +954 -0
  161. google_cloud_spanner-3.65.0/tests/unit/_async/test_session.py +2822 -0
  162. google_cloud_spanner-3.65.0/tests/unit/_async/test_sessions_manager_extra.py +218 -0
  163. google_cloud_spanner-3.65.0/tests/unit/_async/test_snapshot.py +1142 -0
  164. google_cloud_spanner-3.65.0/tests/unit/_async/test_streamed.py +1336 -0
  165. google_cloud_spanner-3.65.0/tests/unit/_async/test_streamed_extra.py +114 -0
  166. google_cloud_spanner-3.65.0/tests/unit/_async/test_transaction.py +1596 -0
  167. google_cloud_spanner-3.65.0/tests/unit/_async/test_transaction_extra.py +235 -0
  168. google_cloud_spanner-3.65.0/tests/unit/conftest.py +18 -0
  169. google_cloud_spanner-3.65.0/tests/unit/gapic/conftest.py +20 -0
  170. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/gapic/spanner_admin_database_v1/test_database_admin.py +717 -500
  171. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/gapic/spanner_admin_instance_v1/test_instance_admin.py +601 -404
  172. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/gapic/spanner_v1/test_spanner.py +333 -292
  173. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/spanner_dbapi/test_checksum.py +16 -8
  174. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/spanner_dbapi/test_connect.py +13 -9
  175. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/spanner_dbapi/test_connection.py +32 -10
  176. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/spanner_dbapi/test_cursor.py +16 -11
  177. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/spanner_dbapi/test_globals.py +1 -3
  178. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/spanner_dbapi/test_parse_utils.py +4 -5
  179. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/spanner_dbapi/test_parser.py +28 -29
  180. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/spanner_dbapi/test_transaction_helper.py +5 -7
  181. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/spanner_dbapi/test_types.py +0 -1
  182. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test__helpers.py +157 -94
  183. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test__opentelemetry_tracing.py +7 -10
  184. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_atomic_counter.py +1 -0
  185. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_backup.py +24 -19
  186. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_batch.py +39 -27
  187. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_client.py +41 -29
  188. google_cloud_spanner-3.65.0/tests/unit/test_client_context.py +441 -0
  189. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_database.py +153 -86
  190. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_database_session_manager.py +62 -16
  191. google_cloud_spanner-3.65.0/tests/unit/test_decorators_extra.py +350 -0
  192. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_exceptions.py +1 -0
  193. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_instance.py +72 -49
  194. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_keyset.py +1 -2
  195. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_merged_result_set.py +3 -4
  196. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_metrics.py +34 -12
  197. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_metrics_capture.py +3 -1
  198. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_metrics_concurrency.py +2 -1
  199. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_metrics_exporter.py +18 -21
  200. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_metrics_interceptor.py +3 -1
  201. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_metrics_tracer.py +4 -3
  202. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_metrics_tracer_factory.py +3 -9
  203. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_param_types.py +10 -10
  204. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_pool.py +739 -293
  205. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_session.py +59 -46
  206. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_snapshot.py +58 -52
  207. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_spanner.py +42 -25
  208. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_spanner_metrics_tracer_factory.py +1 -0
  209. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_streamed.py +16 -23
  210. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_table.py +2 -6
  211. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_transaction.py +34 -26
  212. {google_cloud_spanner-3.63.0/tests/system → google_cloud_spanner-3.65.0/tests/unit}/testdata/singer_pb2.py +1 -0
  213. google_cloud_spanner-3.63.0/MANIFEST.in +0 -25
  214. google_cloud_spanner-3.63.0/tests/unit/conftest.py +0 -27
  215. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/LICENSE +0 -0
  216. {google_cloud_spanner-3.63.0/google/cloud/spanner_v1 → google_cloud_spanner-3.65.0/google/cloud/spanner}/py.typed +0 -0
  217. {google_cloud_spanner-3.63.0/google/cloud/spanner_admin_database_v1 → google_cloud_spanner-3.65.0/google/cloud/spanner_admin_database}/py.typed +0 -0
  218. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/gapic_metadata.json +0 -0
  219. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/services/__init__.py +0 -0
  220. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/services/database_admin/__init__.py +1 -1
  221. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_database_v1/types/__init__.py +2 -2
  222. {google_cloud_spanner-3.63.0/google/cloud/spanner_admin_instance_v1 → google_cloud_spanner-3.65.0/google/cloud/spanner_admin_instance}/py.typed +0 -0
  223. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/gapic_metadata.json +0 -0
  224. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/services/__init__.py +0 -0
  225. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/services/instance_admin/__init__.py +1 -1
  226. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_admin_instance_v1/types/__init__.py +1 -1
  227. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/checksum.py +0 -0
  228. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/client_side_statement_executor.py +6 -6
  229. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/client_side_statement_parser.py +2 -2
  230. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/exceptions.py +0 -0
  231. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/parsed_statement.py +0 -0
  232. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/parser.py +0 -0
  233. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_dbapi/utils.py +0 -0
  234. {google_cloud_spanner-3.63.0/google/cloud/spanner_v1 → google_cloud_spanner-3.65.0/google/cloud/spanner_v1/_async}/testing/__init__.py +0 -0
  235. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/exceptions.py +0 -0
  236. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/gapic_metadata.json +0 -0
  237. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/metrics/constants.py +0 -0
  238. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/request_id_header.py +0 -0
  239. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/services/__init__.py +0 -0
  240. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/services/spanner/__init__.py +1 -1
  241. {google_cloud_spanner-3.63.0/tests/mockserver_tests → google_cloud_spanner-3.65.0/google/cloud/spanner_v1/testing}/__init__.py +0 -0
  242. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google/cloud/spanner_v1/types/__init__.py +0 -0
  243. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google_cloud_spanner.egg-info/dependency_links.txt +0 -0
  244. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google_cloud_spanner.egg-info/not-zip-safe +0 -0
  245. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/google_cloud_spanner.egg-info/top_level.txt +0 -0
  246. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/setup.cfg +0 -0
  247. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/__init__.py +0 -0
  248. {google_cloud_spanner-3.63.0/tests/system → google_cloud_spanner-3.65.0/tests/mockserver_tests}/__init__.py +0 -0
  249. {google_cloud_spanner-3.63.0/tests/system/utils → google_cloud_spanner-3.65.0/tests/system}/__init__.py +0 -0
  250. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/test_metrics.py +1 -1
  251. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/test_observability_options.py +10 -10
  252. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/test_streaming_chunking.py +0 -0
  253. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/testdata/descriptors.pb +0 -0
  254. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/testdata/singer.proto +0 -0
  255. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/system/utils/streaming_utils.py +0 -0
  256. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/__init__.py +0 -0
  257. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/gapic/__init__.py +0 -0
  258. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/gapic/spanner_admin_database_v1/__init__.py +0 -0
  259. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/gapic/spanner_admin_instance_v1/__init__.py +0 -0
  260. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/gapic/spanner_v1/__init__.py +0 -0
  261. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/spanner_dbapi/__init__.py +0 -0
  262. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/spanner_dbapi/test__helpers.py +0 -0
  263. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/spanner_dbapi/test_batch_dml_executor.py +0 -0
  264. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/spanner_dbapi/test_client_side_statement_executor.py +0 -0
  265. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/spanner_dbapi/test_utils.py +0 -0
  266. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/streaming-read-acceptance-test.json +0 -0
  267. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_datatypes.py +1 -1
  268. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/test_packaging.py +0 -0
  269. {google_cloud_spanner-3.63.0 → google_cloud_spanner-3.65.0}/tests/unit/testdata/singer.proto +0 -0
@@ -0,0 +1,20 @@
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
+ include README.rst LICENSE
17
+ recursive-include google *.py *.pyi *.json *.proto py.typed
18
+ recursive-include tests *
19
+ global-exclude *.py[co]
20
+ global-exclude __pycache__
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-cloud-spanner
3
- Version: 3.63.0
3
+ Version: 3.65.0
4
4
  Summary: Google Cloud Spanner API client library
5
- Home-page: https://github.com/googleapis/python-spanner
5
+ Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-spanner
6
6
  Author: Google LLC
7
7
  Author-email: googleapis-packages@google.com
8
8
  License: Apache 2.0
@@ -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.13
19
20
  Classifier: Programming Language :: Python :: 3.14
20
21
  Classifier: Operating System :: OS Independent
21
22
  Classifier: Topic :: Internet
@@ -27,7 +28,7 @@ Requires-Dist: grpc-google-iam-v1<1.0.0,>=0.12.4
27
28
  Requires-Dist: proto-plus<2.0.0,>=1.22.0
28
29
  Requires-Dist: sqlparse>=0.4.4
29
30
  Requires-Dist: proto-plus<2.0.0,>=1.22.2; python_version >= "3.11"
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
31
+ Requires-Dist: protobuf<8.0.0,>=4.25.8
31
32
  Requires-Dist: grpc-interceptor>=0.15.4
32
33
  Requires-Dist: opentelemetry-api>=1.22.0
33
34
  Requires-Dist: opentelemetry-sdk>=1.22.0
@@ -53,29 +54,28 @@ Dynamic: summary
53
54
  Python Client for Cloud Spanner
54
55
  ===============================
55
56
 
56
- |GA| |pypi| |versions|
57
+ |stable| |pypi| |versions|
57
58
 
58
- `Cloud Spanner`_ is the world's first fully managed relational database service
59
- to offer both strong consistency and horizontal scalability for
60
- mission-critical online transaction processing (OLTP) applications. With Cloud
61
- Spanner you enjoy all the traditional benefits of a relational database; but
62
- unlike any other relational database service, Cloud Spanner scales horizontally
63
- to hundreds or thousands of servers to handle the biggest transactional
59
+ `Cloud Spanner`_: is the world's first fully managed relational database service
60
+ to offer both strong consistency and horizontal scalability for
61
+ mission-critical online transaction processing (OLTP) applications. With Cloud
62
+ Spanner you enjoy all the traditional benefits of a relational database; but
63
+ unlike any other relational database service, Cloud Spanner scales horizontally
64
+ to hundreds or thousands of servers to handle the biggest transactional
64
65
  workloads.
65
66
 
66
-
67
67
  - `Client Library Documentation`_
68
68
  - `Product Documentation`_
69
69
 
70
- .. |GA| image:: https://img.shields.io/badge/support-GA-gold.svg
71
- :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#general-availability
70
+ .. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg
71
+ :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels
72
72
  .. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-spanner.svg
73
73
  :target: https://pypi.org/project/google-cloud-spanner/
74
74
  .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-spanner.svg
75
75
  :target: https://pypi.org/project/google-cloud-spanner/
76
- .. _Cloud Spanner: https://cloud.google.com/spanner/
77
- .. _Client Library Documentation: https://cloud.google.com/python/docs/reference/spanner/latest
78
- .. _Product Documentation: https://cloud.google.com/spanner/docs
76
+ .. _Cloud Spanner: https://cloud.google.com/spanner/docs/
77
+ .. _Client Library Documentation: https://cloud.google.com/python/docs/reference/spanner/latest/summary_overview
78
+ .. _Product Documentation: https://cloud.google.com/spanner/docs/
79
79
 
80
80
  Quick Start
81
81
  -----------
@@ -84,49 +84,64 @@ In order to use this library, you first need to go through the following steps:
84
84
 
85
85
  1. `Select or create a Cloud Platform project.`_
86
86
  2. `Enable billing for your project.`_
87
- 3. `Enable the Google Cloud Spanner API.`_
88
- 4. `Setup Authentication.`_
87
+ 3. `Enable the Cloud Spanner.`_
88
+ 4. `Set up Authentication.`_
89
89
 
90
90
  .. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
91
91
  .. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
92
- .. _Enable the Google Cloud Spanner API.: https://cloud.google.com/spanner
93
- .. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
92
+ .. _Enable the Cloud Spanner.: https://cloud.google.com/spanner/docs/
93
+ .. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
94
94
 
95
95
  Installation
96
96
  ~~~~~~~~~~~~
97
97
 
98
- Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
99
- create isolated Python environments. The basic problem it addresses is one of
100
- dependencies and versions, and indirectly permissions.
98
+ Install this library in a virtual environment using `venv`_. `venv`_ is a tool that
99
+ creates isolated Python environments. These isolated environments can have separate
100
+ versions of Python packages, which allows you to isolate one project's dependencies
101
+ from the dependencies of other projects.
101
102
 
102
- With `virtualenv`_, it's possible to install this library without needing system
103
+ With `venv`_, it's possible to install this library without needing system
103
104
  install permissions, and without clashing with the installed system
104
105
  dependencies.
105
106
 
106
- .. _`virtualenv`: https://virtualenv.pypa.io/en/latest/
107
+ .. _`venv`: https://docs.python.org/3/library/venv.html
108
+
109
+
110
+ Code samples and snippets
111
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
112
+
113
+ Code samples and snippets live in the `samples/`_ folder.
114
+
115
+ .. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-spanner/samples
107
116
 
108
117
 
109
118
  Supported Python Versions
110
119
  ^^^^^^^^^^^^^^^^^^^^^^^^^
111
- Python >= 3.9
120
+ Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
121
+ Python.
112
122
 
113
- Deprecated Python Versions
114
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
115
- Python == 2.7.
116
- Python == 3.5.
117
- Python == 3.6.
118
- Python == 3.7.
119
- Python == 3.8.
123
+ Python >= 3.9, including 3.14
124
+
125
+ .. _active: https://devguide.python.org/devcycle/#in-development-main-branch
126
+ .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
127
+
128
+ Unsupported Python Versions
129
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
130
+ Python <= 3.8
131
+
132
+ If you are using an `end-of-life`_
133
+ version of Python, we recommend that you update as soon as possible to an actively supported version.
134
+
135
+ .. _end-of-life: https://devguide.python.org/devcycle/#end-of-life-branches
120
136
 
121
137
  Mac/Linux
122
138
  ^^^^^^^^^
123
139
 
124
140
  .. code-block:: console
125
141
 
126
- pip install virtualenv
127
- virtualenv <your-env>
142
+ python3 -m venv <your-env>
128
143
  source <your-env>/bin/activate
129
- <your-env>/bin/pip install google-cloud-spanner
144
+ pip install google-cloud-spanner
130
145
 
131
146
 
132
147
  Windows
@@ -134,10 +149,9 @@ Windows
134
149
 
135
150
  .. code-block:: console
136
151
 
137
- pip install virtualenv
138
- virtualenv <your-env>
139
- <your-env>\Scripts\activate
140
- <your-env>\Scripts\pip.exe install google-cloud-spanner
152
+ py -m venv <your-env>
153
+ .\<your-env>\Scripts\activate
154
+ pip install google-cloud-spanner
141
155
 
142
156
 
143
157
  Example Usage
@@ -243,7 +257,7 @@ To add one or more records to a table, use ``insert``:
243
257
  'citizens',
244
258
  columns=['email', 'first_name', 'last_name', 'age'],
245
259
  values=[
246
- ['phred@exammple.com', 'Phred', 'Phlyntstone', 32],
260
+ ['phred@example.com', 'Phred', 'Phlyntstone', 32],
247
261
  ['bharney@example.com', 'Bharney', 'Rhubble', 31],
248
262
  ],
249
263
  )
@@ -282,7 +296,7 @@ if any of the records does not already exist.
282
296
  'citizens',
283
297
  columns=['email', 'age'],
284
298
  values=[
285
- ['phred@exammple.com', 33],
299
+ ['phred@example.com', 33],
286
300
  ['bharney@example.com', 32],
287
301
  ],
288
302
  )
@@ -323,7 +337,101 @@ Auto-retry of aborted transactions is enabled only for ``!autocommit`` mode, as
323
337
  Next Steps
324
338
  ~~~~~~~~~~
325
339
 
326
- - See the `Client Library Documentation`_ to learn how to connect to Cloud
327
- Spanner using this Client Library.
328
- - Read the `Product documentation`_ to learn
329
- more about the product and see How-to Guides.
340
+ - Read the `Client Library Documentation`_ for Cloud Spanner
341
+ to see other available methods on the client.
342
+ - Read the `Cloud Spanner Product documentation`_ to learn
343
+ more about the product and see How-to Guides.
344
+ - View this `README`_ to see the full list of Cloud
345
+ APIs that we cover.
346
+
347
+ .. _Cloud Spanner Product documentation: https://cloud.google.com/spanner/docs/
348
+ .. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
349
+
350
+ Logging
351
+ -------
352
+
353
+ This library uses the standard Python :code:`logging` functionality to log some RPC events that could be of interest for debugging and monitoring purposes.
354
+ Note the following:
355
+
356
+ #. Logs may contain sensitive information. Take care to **restrict access to the logs** if they are saved, whether it be on local storage or on Google Cloud Logging.
357
+ #. Google may refine the occurrence, level, and content of various log messages in this library without flagging such changes as breaking. **Do not depend on immutability of the logging events**.
358
+ #. By default, the logging events from this library are not handled. You must **explicitly configure log handling** using one of the mechanisms below.
359
+
360
+ Simple, environment-based configuration
361
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
362
+
363
+ To enable logging for this library without any changes in your code, set the :code:`GOOGLE_SDK_PYTHON_LOGGING_SCOPE` environment variable to a valid Google
364
+ logging scope. This configures handling of logging events (at level :code:`logging.DEBUG` or higher) from this library in a default manner, emitting the logged
365
+ messages in a structured format. It does not currently allow customizing the logging levels captured nor the handlers, formatters, etc. used for any logging
366
+ event.
367
+
368
+ A logging scope is a period-separated namespace that begins with :code:`google`, identifying the Python module or package to log.
369
+
370
+ - Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc.
371
+ - Invalid logging scopes: :code:`foo`, :code:`123`, etc.
372
+
373
+ **NOTE**: If the logging scope is invalid, the library does not set up any logging handlers.
374
+
375
+ Environment-Based Examples
376
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
377
+
378
+ - Enabling the default handler for all Google-based loggers
379
+
380
+ .. code-block:: console
381
+
382
+ export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google
383
+
384
+ - Enabling the default handler for a specific Google module (for a client library called :code:`library_v1`):
385
+
386
+ .. code-block:: console
387
+
388
+ export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google.cloud.library_v1
389
+
390
+
391
+ Advanced, code-based configuration
392
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
393
+
394
+ You can also configure a valid logging scope using Python's standard `logging` mechanism.
395
+
396
+ Code-Based Examples
397
+ ^^^^^^^^^^^^^^^^^^^
398
+
399
+ - Configuring a handler for all Google-based loggers
400
+
401
+ .. code-block:: python
402
+
403
+ import logging
404
+
405
+ from google.cloud import library_v1
406
+
407
+ base_logger = logging.getLogger("google")
408
+ base_logger.addHandler(logging.StreamHandler())
409
+ base_logger.setLevel(logging.DEBUG)
410
+
411
+ - Configuring a handler for a specific Google module (for a client library called :code:`library_v1`):
412
+
413
+ .. code-block:: python
414
+
415
+ import logging
416
+
417
+ from google.cloud import library_v1
418
+
419
+ base_logger = logging.getLogger("google.cloud.library_v1")
420
+ base_logger.addHandler(logging.StreamHandler())
421
+ base_logger.setLevel(logging.DEBUG)
422
+
423
+ Logging details
424
+ ~~~~~~~~~~~~~~~
425
+
426
+ #. Regardless of which of the mechanisms above you use to configure logging for this library, by default logging events are not propagated up to the root
427
+ logger from the `google`-level logger. If you need the events to be propagated to the root logger, you must explicitly set
428
+ :code:`logging.getLogger("google").propagate = True` in your code.
429
+ #. You can mix the different logging configurations above for different Google modules. For example, you may want use a code-based logging configuration for
430
+ one library, but decide you need to also set up environment-based logging configuration for another library.
431
+
432
+ #. If you attempt to use both code-based and environment-based configuration for the same module, the environment-based configuration will be ineffectual
433
+ if the code -based configuration gets applied first.
434
+
435
+ #. The Google-specific logging configurations (default handlers for environment-based configuration; not propagating logging events to the root logger) get
436
+ executed the first time *any* client library is instantiated in your application, and only if the affected loggers have not been previously configured.
437
+ (This is the reason for 2.i. above.)
@@ -1,29 +1,28 @@
1
1
  Python Client for Cloud Spanner
2
2
  ===============================
3
3
 
4
- |GA| |pypi| |versions|
5
-
6
- `Cloud Spanner`_ is the world's first fully managed relational database service
7
- to offer both strong consistency and horizontal scalability for
8
- mission-critical online transaction processing (OLTP) applications. With Cloud
9
- Spanner you enjoy all the traditional benefits of a relational database; but
10
- unlike any other relational database service, Cloud Spanner scales horizontally
11
- to hundreds or thousands of servers to handle the biggest transactional
4
+ |stable| |pypi| |versions|
5
+
6
+ `Cloud Spanner`_: is the world's first fully managed relational database service
7
+ to offer both strong consistency and horizontal scalability for
8
+ mission-critical online transaction processing (OLTP) applications. With Cloud
9
+ Spanner you enjoy all the traditional benefits of a relational database; but
10
+ unlike any other relational database service, Cloud Spanner scales horizontally
11
+ to hundreds or thousands of servers to handle the biggest transactional
12
12
  workloads.
13
13
 
14
-
15
14
  - `Client Library Documentation`_
16
15
  - `Product Documentation`_
17
16
 
18
- .. |GA| image:: https://img.shields.io/badge/support-GA-gold.svg
19
- :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#general-availability
17
+ .. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg
18
+ :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels
20
19
  .. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-spanner.svg
21
20
  :target: https://pypi.org/project/google-cloud-spanner/
22
21
  .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-spanner.svg
23
22
  :target: https://pypi.org/project/google-cloud-spanner/
24
- .. _Cloud Spanner: https://cloud.google.com/spanner/
25
- .. _Client Library Documentation: https://cloud.google.com/python/docs/reference/spanner/latest
26
- .. _Product Documentation: https://cloud.google.com/spanner/docs
23
+ .. _Cloud Spanner: https://cloud.google.com/spanner/docs/
24
+ .. _Client Library Documentation: https://cloud.google.com/python/docs/reference/spanner/latest/summary_overview
25
+ .. _Product Documentation: https://cloud.google.com/spanner/docs/
27
26
 
28
27
  Quick Start
29
28
  -----------
@@ -32,49 +31,64 @@ In order to use this library, you first need to go through the following steps:
32
31
 
33
32
  1. `Select or create a Cloud Platform project.`_
34
33
  2. `Enable billing for your project.`_
35
- 3. `Enable the Google Cloud Spanner API.`_
36
- 4. `Setup Authentication.`_
34
+ 3. `Enable the Cloud Spanner.`_
35
+ 4. `Set up Authentication.`_
37
36
 
38
37
  .. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
39
38
  .. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
40
- .. _Enable the Google Cloud Spanner API.: https://cloud.google.com/spanner
41
- .. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
39
+ .. _Enable the Cloud Spanner.: https://cloud.google.com/spanner/docs/
40
+ .. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
42
41
 
43
42
  Installation
44
43
  ~~~~~~~~~~~~
45
44
 
46
- Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
47
- create isolated Python environments. The basic problem it addresses is one of
48
- dependencies and versions, and indirectly permissions.
45
+ Install this library in a virtual environment using `venv`_. `venv`_ is a tool that
46
+ creates isolated Python environments. These isolated environments can have separate
47
+ versions of Python packages, which allows you to isolate one project's dependencies
48
+ from the dependencies of other projects.
49
49
 
50
- With `virtualenv`_, it's possible to install this library without needing system
50
+ With `venv`_, it's possible to install this library without needing system
51
51
  install permissions, and without clashing with the installed system
52
52
  dependencies.
53
53
 
54
- .. _`virtualenv`: https://virtualenv.pypa.io/en/latest/
54
+ .. _`venv`: https://docs.python.org/3/library/venv.html
55
+
56
+
57
+ Code samples and snippets
58
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
59
+
60
+ Code samples and snippets live in the `samples/`_ folder.
61
+
62
+ .. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-spanner/samples
55
63
 
56
64
 
57
65
  Supported Python Versions
58
66
  ^^^^^^^^^^^^^^^^^^^^^^^^^
59
- Python >= 3.9
67
+ Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
68
+ Python.
60
69
 
61
- Deprecated Python Versions
62
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
63
- Python == 2.7.
64
- Python == 3.5.
65
- Python == 3.6.
66
- Python == 3.7.
67
- Python == 3.8.
70
+ Python >= 3.9, including 3.14
71
+
72
+ .. _active: https://devguide.python.org/devcycle/#in-development-main-branch
73
+ .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
74
+
75
+ Unsupported Python Versions
76
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
77
+ Python <= 3.8
78
+
79
+ If you are using an `end-of-life`_
80
+ version of Python, we recommend that you update as soon as possible to an actively supported version.
81
+
82
+ .. _end-of-life: https://devguide.python.org/devcycle/#end-of-life-branches
68
83
 
69
84
  Mac/Linux
70
85
  ^^^^^^^^^
71
86
 
72
87
  .. code-block:: console
73
88
 
74
- pip install virtualenv
75
- virtualenv <your-env>
89
+ python3 -m venv <your-env>
76
90
  source <your-env>/bin/activate
77
- <your-env>/bin/pip install google-cloud-spanner
91
+ pip install google-cloud-spanner
78
92
 
79
93
 
80
94
  Windows
@@ -82,10 +96,9 @@ Windows
82
96
 
83
97
  .. code-block:: console
84
98
 
85
- pip install virtualenv
86
- virtualenv <your-env>
87
- <your-env>\Scripts\activate
88
- <your-env>\Scripts\pip.exe install google-cloud-spanner
99
+ py -m venv <your-env>
100
+ .\<your-env>\Scripts\activate
101
+ pip install google-cloud-spanner
89
102
 
90
103
 
91
104
  Example Usage
@@ -191,7 +204,7 @@ To add one or more records to a table, use ``insert``:
191
204
  'citizens',
192
205
  columns=['email', 'first_name', 'last_name', 'age'],
193
206
  values=[
194
- ['phred@exammple.com', 'Phred', 'Phlyntstone', 32],
207
+ ['phred@example.com', 'Phred', 'Phlyntstone', 32],
195
208
  ['bharney@example.com', 'Bharney', 'Rhubble', 31],
196
209
  ],
197
210
  )
@@ -230,7 +243,7 @@ if any of the records does not already exist.
230
243
  'citizens',
231
244
  columns=['email', 'age'],
232
245
  values=[
233
- ['phred@exammple.com', 33],
246
+ ['phred@example.com', 33],
234
247
  ['bharney@example.com', 32],
235
248
  ],
236
249
  )
@@ -271,7 +284,101 @@ Auto-retry of aborted transactions is enabled only for ``!autocommit`` mode, as
271
284
  Next Steps
272
285
  ~~~~~~~~~~
273
286
 
274
- - See the `Client Library Documentation`_ to learn how to connect to Cloud
275
- Spanner using this Client Library.
276
- - Read the `Product documentation`_ to learn
277
- more about the product and see How-to Guides.
287
+ - Read the `Client Library Documentation`_ for Cloud Spanner
288
+ to see other available methods on the client.
289
+ - Read the `Cloud Spanner Product documentation`_ to learn
290
+ more about the product and see How-to Guides.
291
+ - View this `README`_ to see the full list of Cloud
292
+ APIs that we cover.
293
+
294
+ .. _Cloud Spanner Product documentation: https://cloud.google.com/spanner/docs/
295
+ .. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
296
+
297
+ Logging
298
+ -------
299
+
300
+ This library uses the standard Python :code:`logging` functionality to log some RPC events that could be of interest for debugging and monitoring purposes.
301
+ Note the following:
302
+
303
+ #. Logs may contain sensitive information. Take care to **restrict access to the logs** if they are saved, whether it be on local storage or on Google Cloud Logging.
304
+ #. Google may refine the occurrence, level, and content of various log messages in this library without flagging such changes as breaking. **Do not depend on immutability of the logging events**.
305
+ #. By default, the logging events from this library are not handled. You must **explicitly configure log handling** using one of the mechanisms below.
306
+
307
+ Simple, environment-based configuration
308
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
309
+
310
+ To enable logging for this library without any changes in your code, set the :code:`GOOGLE_SDK_PYTHON_LOGGING_SCOPE` environment variable to a valid Google
311
+ logging scope. This configures handling of logging events (at level :code:`logging.DEBUG` or higher) from this library in a default manner, emitting the logged
312
+ messages in a structured format. It does not currently allow customizing the logging levels captured nor the handlers, formatters, etc. used for any logging
313
+ event.
314
+
315
+ A logging scope is a period-separated namespace that begins with :code:`google`, identifying the Python module or package to log.
316
+
317
+ - Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc.
318
+ - Invalid logging scopes: :code:`foo`, :code:`123`, etc.
319
+
320
+ **NOTE**: If the logging scope is invalid, the library does not set up any logging handlers.
321
+
322
+ Environment-Based Examples
323
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
324
+
325
+ - Enabling the default handler for all Google-based loggers
326
+
327
+ .. code-block:: console
328
+
329
+ export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google
330
+
331
+ - Enabling the default handler for a specific Google module (for a client library called :code:`library_v1`):
332
+
333
+ .. code-block:: console
334
+
335
+ export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google.cloud.library_v1
336
+
337
+
338
+ Advanced, code-based configuration
339
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
340
+
341
+ You can also configure a valid logging scope using Python's standard `logging` mechanism.
342
+
343
+ Code-Based Examples
344
+ ^^^^^^^^^^^^^^^^^^^
345
+
346
+ - Configuring a handler for all Google-based loggers
347
+
348
+ .. code-block:: python
349
+
350
+ import logging
351
+
352
+ from google.cloud import library_v1
353
+
354
+ base_logger = logging.getLogger("google")
355
+ base_logger.addHandler(logging.StreamHandler())
356
+ base_logger.setLevel(logging.DEBUG)
357
+
358
+ - Configuring a handler for a specific Google module (for a client library called :code:`library_v1`):
359
+
360
+ .. code-block:: python
361
+
362
+ import logging
363
+
364
+ from google.cloud import library_v1
365
+
366
+ base_logger = logging.getLogger("google.cloud.library_v1")
367
+ base_logger.addHandler(logging.StreamHandler())
368
+ base_logger.setLevel(logging.DEBUG)
369
+
370
+ Logging details
371
+ ~~~~~~~~~~~~~~~
372
+
373
+ #. Regardless of which of the mechanisms above you use to configure logging for this library, by default logging events are not propagated up to the root
374
+ logger from the `google`-level logger. If you need the events to be propagated to the root logger, you must explicitly set
375
+ :code:`logging.getLogger("google").propagate = True` in your code.
376
+ #. You can mix the different logging configurations above for different Google modules. For example, you may want use a code-based logging configuration for
377
+ one library, but decide you need to also set up environment-based logging configuration for another library.
378
+
379
+ #. If you attempt to use both code-based and environment-based configuration for the same module, the environment-based configuration will be ineffectual
380
+ if the code -based configuration gets applied first.
381
+
382
+ #. The Google-specific logging configurations (default handlers for environment-based configuration; not propagating logging events to the root logger) get
383
+ executed the first time *any* client library is instantiated in your application, and only if the affected loggers have not been previously configured.
384
+ (This is the reason for 2.i. above.)
@@ -0,0 +1,19 @@
1
+ # Copyright 2024 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
+ from .cross_sync import CrossSync
16
+
17
+ __all__ = [
18
+ "CrossSync",
19
+ ]