diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 5fc5daa317..b8edda51cf 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:8555f0e37e6261408f792bfd6635102d2da5ad73f8f09bcb24f25e6afb5fac97 + digest: sha256:2e247c7bf5154df7f98cce087a20ca7605e236340c7d6d1a14447e5c06791bd6 diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in index 882178ce60..ec867d9fd6 100644 --- a/.kokoro/requirements.in +++ b/.kokoro/requirements.in @@ -5,6 +5,6 @@ typing-extensions twine wheel setuptools -nox +nox>=2022.11.21 # required to remove dependency on py charset-normalizer<3 click<8.1.0 diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index fa99c12908..66a2172a76 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -1,6 +1,6 @@ # -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: # # pip-compile --allow-unsafe --generate-hashes requirements.in # @@ -335,9 +335,9 @@ more-itertools==9.0.0 \ --hash=sha256:250e83d7e81d0c87ca6bd942e6aeab8cc9daa6096d12c5308f3f92fa5e5c1f41 \ --hash=sha256:5a6257e40878ef0520b1803990e3e22303a41b5714006c32a3fd8304b26ea1ab # via jaraco-classes -nox==2022.8.7 \ - --hash=sha256:1b894940551dc5c389f9271d197ca5d655d40bdc6ccf93ed6880e4042760a34b \ - --hash=sha256:96cca88779e08282a699d672258ec01eb7c792d35bbbf538c723172bce23212c +nox==2022.11.21 \ + --hash=sha256:0e41a990e290e274cb205a976c4c97ee3c5234441a8132c8c3fd9ea3c22149eb \ + --hash=sha256:e21c31de0711d1274ca585a2c5fde36b1aa962005ba8e9322bf5eeed16dcd684 # via -r requirements.in packaging==21.3 \ --hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \ @@ -380,10 +380,6 @@ protobuf==3.20.3 \ # gcp-docuploader # gcp-releasetool # google-api-core -py==1.11.0 \ - --hash=sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719 \ - --hash=sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378 - # via nox pyasn1==0.4.8 \ --hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d \ --hash=sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 413eb22511..76a2556c17 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.28.0" + ".": "3.29.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 616e60c8d3..5fac18fe0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,23 @@ [1]: https://pypi.org/project/google-cloud-spanner/#history +## [3.29.0](https://github.com/googleapis/python-spanner/compare/v3.28.0...v3.29.0) (2023-03-23) + + +### Features + +* Adding new fields for Serverless analytics ([#906](https://github.com/googleapis/python-spanner/issues/906)) ([2a5a636](https://github.com/googleapis/python-spanner/commit/2a5a636fc296ad0a7f86ace6a5f361db1e2ee26d)) + + +### Bug Fixes + +* Correcting the proto field Id for field data_boost_enabled ([#915](https://github.com/googleapis/python-spanner/issues/915)) ([428aa1e](https://github.com/googleapis/python-spanner/commit/428aa1e5e4458649033a5566dc3017d2fadbd2a0)) + + +### Documentation + +* Fix formatting of request arg in docstring ([#918](https://github.com/googleapis/python-spanner/issues/918)) ([c022bf8](https://github.com/googleapis/python-spanner/commit/c022bf859a3ace60c0a9ddb86896bc83f85e327f)) + ## [3.28.0](https://github.com/googleapis/python-spanner/compare/v3.27.1...v3.28.0) (2023-02-28) diff --git a/google/cloud/spanner_admin_database_v1/gapic_version.py b/google/cloud/spanner_admin_database_v1/gapic_version.py index f2fd25602f..16c2618143 100644 --- a/google/cloud/spanner_admin_database_v1/gapic_version.py +++ b/google/cloud/spanner_admin_database_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.28.0" # {x-release-please-version} +__version__ = "3.29.0" # {x-release-please-version} diff --git a/google/cloud/spanner_admin_database_v1/services/database_admin/async_client.py b/google/cloud/spanner_admin_database_v1/services/database_admin/async_client.py index cc3768f664..f0fd218cce 100644 --- a/google/cloud/spanner_admin_database_v1/services/database_admin/async_client.py +++ b/google/cloud/spanner_admin_database_v1/services/database_admin/async_client.py @@ -688,19 +688,19 @@ async def sample_update_database_ddl(): Args: request (Optional[Union[google.cloud.spanner_admin_database_v1.types.UpdateDatabaseDdlRequest, dict]]): - The request object. Enqueues the given DDL statements to - be applied, in order but not necessarily all at once, to - the database schema at some point (or points) in the - future. The server checks that the statements are - executable (syntactically valid, name tables that exist, - etc.) before enqueueing them, but they may still fail - upon + The request object. Enqueues the given DDL statements to be applied, in + order but not necessarily all at once, to the database + schema at some point (or points) in the future. The + server checks that the statements are executable + (syntactically valid, name tables that exist, etc.) + before enqueueing them, but they may still fail upon later execution (e.g., if a statement from another batch of statements is applied first and it conflicts in some way, or if there is some data-related problem like a - `NULL` value in a column to which `NOT NULL` would be - added). If a statement fails, all subsequent statements - in the batch are automatically cancelled. + ``NULL`` value in a column to which ``NOT NULL`` would + be added). If a statement fails, all subsequent + statements in the batch are automatically cancelled. + Each batch of statements is assigned a name which can be used with the [Operations][google.longrunning.Operations] API to @@ -1072,8 +1072,7 @@ async def sample_set_iam_policy(): Args: request (Optional[Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]]): - The request object. Request message for `SetIamPolicy` - method. + The request object. Request message for ``SetIamPolicy`` method. resource (:class:`str`): REQUIRED: The resource for which the policy is being specified. See the @@ -1247,8 +1246,7 @@ async def sample_get_iam_policy(): Args: request (Optional[Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]]): - The request object. Request message for `GetIamPolicy` - method. + The request object. Request message for ``GetIamPolicy`` method. resource (:class:`str`): REQUIRED: The resource for which the policy is being requested. See the @@ -1434,8 +1432,7 @@ async def sample_test_iam_permissions(): Args: request (Optional[Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]]): - The request object. Request message for - `TestIamPermissions` method. + The request object. Request message for ``TestIamPermissions`` method. resource (:class:`str`): REQUIRED: The resource for which the policy detail is being requested. See diff --git a/google/cloud/spanner_admin_database_v1/services/database_admin/client.py b/google/cloud/spanner_admin_database_v1/services/database_admin/client.py index 08bd43e2fe..8628469e19 100644 --- a/google/cloud/spanner_admin_database_v1/services/database_admin/client.py +++ b/google/cloud/spanner_admin_database_v1/services/database_admin/client.py @@ -994,19 +994,19 @@ def sample_update_database_ddl(): Args: request (Union[google.cloud.spanner_admin_database_v1.types.UpdateDatabaseDdlRequest, dict]): - The request object. Enqueues the given DDL statements to - be applied, in order but not necessarily all at once, to - the database schema at some point (or points) in the - future. The server checks that the statements are - executable (syntactically valid, name tables that exist, - etc.) before enqueueing them, but they may still fail - upon + The request object. Enqueues the given DDL statements to be applied, in + order but not necessarily all at once, to the database + schema at some point (or points) in the future. The + server checks that the statements are executable + (syntactically valid, name tables that exist, etc.) + before enqueueing them, but they may still fail upon later execution (e.g., if a statement from another batch of statements is applied first and it conflicts in some way, or if there is some data-related problem like a - `NULL` value in a column to which `NOT NULL` would be - added). If a statement fails, all subsequent statements - in the batch are automatically cancelled. + ``NULL`` value in a column to which ``NOT NULL`` would + be added). If a statement fails, all subsequent + statements in the batch are automatically cancelled. + Each batch of statements is assigned a name which can be used with the [Operations][google.longrunning.Operations] API to @@ -1348,8 +1348,7 @@ def sample_set_iam_policy(): Args: request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]): - The request object. Request message for `SetIamPolicy` - method. + The request object. Request message for ``SetIamPolicy`` method. resource (str): REQUIRED: The resource for which the policy is being specified. See the @@ -1520,8 +1519,7 @@ def sample_get_iam_policy(): Args: request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]): - The request object. Request message for `GetIamPolicy` - method. + The request object. Request message for ``GetIamPolicy`` method. resource (str): REQUIRED: The resource for which the policy is being requested. See the @@ -1694,8 +1692,7 @@ def sample_test_iam_permissions(): Args: request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]): - The request object. Request message for - `TestIamPermissions` method. + The request object. Request message for ``TestIamPermissions`` method. resource (str): REQUIRED: The resource for which the policy detail is being requested. See diff --git a/google/cloud/spanner_admin_database_v1/services/database_admin/transports/rest.py b/google/cloud/spanner_admin_database_v1/services/database_admin/transports/rest.py index 9251d03b9f..dfe0289b05 100644 --- a/google/cloud/spanner_admin_database_v1/services/database_admin/transports/rest.py +++ b/google/cloud/spanner_admin_database_v1/services/database_admin/transports/rest.py @@ -955,7 +955,6 @@ def __call__( request (~.backup.CopyBackupRequest): The request object. The request for [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1055,7 +1054,6 @@ def __call__( request (~.gsad_backup.CreateBackupRequest): The request object. The request for [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1153,7 +1151,6 @@ def __call__( request (~.spanner_database_admin.CreateDatabaseRequest): The request object. The request for [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1251,7 +1248,6 @@ def __call__( request (~.backup.DeleteBackupRequest): The request object. The request for [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1327,7 +1323,6 @@ def __call__( request (~.spanner_database_admin.DropDatabaseRequest): The request object. The request for [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1403,7 +1398,6 @@ def __call__( request (~.backup.GetBackupRequest): The request object. The request for [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1491,7 +1485,6 @@ def __call__( request (~.spanner_database_admin.GetDatabaseRequest): The request object. The request for [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1579,7 +1572,6 @@ def __call__( request (~.spanner_database_admin.GetDatabaseDdlRequest): The request object. The request for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1721,7 +1713,8 @@ def __call__( "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", - "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } ], @@ -1845,7 +1838,6 @@ def __call__( request (~.backup.ListBackupOperationsRequest): The request object. The request for [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1937,7 +1929,6 @@ def __call__( request (~.backup.ListBackupsRequest): The request object. The request for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2027,7 +2018,6 @@ def __call__( request (~.spanner_database_admin.ListDatabaseOperationsRequest): The request object. The request for [ListDatabaseOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseOperations]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2121,7 +2111,6 @@ def __call__( request (~.spanner_database_admin.ListDatabaseRolesRequest): The request object. The request for [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2213,7 +2202,6 @@ def __call__( request (~.spanner_database_admin.ListDatabasesRequest): The request object. The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2303,7 +2291,6 @@ def __call__( request (~.spanner_database_admin.RestoreDatabaseRequest): The request object. The request for [RestoreDatabase][google.spanner.admin.database.v1.DatabaseAdmin.RestoreDatabase]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2453,7 +2440,8 @@ def __call__( "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", - "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } ], @@ -2686,7 +2674,6 @@ def __call__( request (~.gsad_backup.UpdateBackupRequest): The request object. The request for [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2800,7 +2787,6 @@ def __call__( monitor progress. See the [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] field for more details. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. diff --git a/google/cloud/spanner_admin_instance_v1/gapic_version.py b/google/cloud/spanner_admin_instance_v1/gapic_version.py index f2fd25602f..16c2618143 100644 --- a/google/cloud/spanner_admin_instance_v1/gapic_version.py +++ b/google/cloud/spanner_admin_instance_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.28.0" # {x-release-please-version} +__version__ = "3.29.0" # {x-release-please-version} diff --git a/google/cloud/spanner_admin_instance_v1/services/instance_admin/async_client.py b/google/cloud/spanner_admin_instance_v1/services/instance_admin/async_client.py index 85acc5c434..ab718c2e6c 100644 --- a/google/cloud/spanner_admin_instance_v1/services/instance_admin/async_client.py +++ b/google/cloud/spanner_admin_instance_v1/services/instance_admin/async_client.py @@ -1876,8 +1876,7 @@ async def sample_set_iam_policy(): Args: request (Optional[Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]]): - The request object. Request message for `SetIamPolicy` - method. + The request object. Request message for ``SetIamPolicy`` method. resource (:class:`str`): REQUIRED: The resource for which the policy is being specified. See the @@ -2047,8 +2046,7 @@ async def sample_get_iam_policy(): Args: request (Optional[Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]]): - The request object. Request message for `GetIamPolicy` - method. + The request object. Request message for ``GetIamPolicy`` method. resource (:class:`str`): REQUIRED: The resource for which the policy is being requested. See the @@ -2231,8 +2229,7 @@ async def sample_test_iam_permissions(): Args: request (Optional[Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]]): - The request object. Request message for - `TestIamPermissions` method. + The request object. Request message for ``TestIamPermissions`` method. resource (:class:`str`): REQUIRED: The resource for which the policy detail is being requested. See diff --git a/google/cloud/spanner_admin_instance_v1/services/instance_admin/client.py b/google/cloud/spanner_admin_instance_v1/services/instance_admin/client.py index 51b5de4014..2a8b569a45 100644 --- a/google/cloud/spanner_admin_instance_v1/services/instance_admin/client.py +++ b/google/cloud/spanner_admin_instance_v1/services/instance_admin/client.py @@ -2070,8 +2070,7 @@ def sample_set_iam_policy(): Args: request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]): - The request object. Request message for `SetIamPolicy` - method. + The request object. Request message for ``SetIamPolicy`` method. resource (str): REQUIRED: The resource for which the policy is being specified. See the @@ -2238,8 +2237,7 @@ def sample_get_iam_policy(): Args: request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]): - The request object. Request message for `GetIamPolicy` - method. + The request object. Request message for ``GetIamPolicy`` method. resource (str): REQUIRED: The resource for which the policy is being requested. See the @@ -2409,8 +2407,7 @@ def sample_test_iam_permissions(): Args: request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]): - The request object. Request message for - `TestIamPermissions` method. + The request object. Request message for ``TestIamPermissions`` method. resource (str): REQUIRED: The resource for which the policy detail is being requested. See diff --git a/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/rest.py b/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/rest.py index 665dbb8b1e..b390156555 100644 --- a/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/rest.py +++ b/google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/rest.py @@ -707,7 +707,6 @@ def __call__( request (~.spanner_instance_admin.CreateInstanceRequest): The request object. The request for [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -805,7 +804,6 @@ def __call__( request (~.spanner_instance_admin.CreateInstanceConfigRequest): The request object. The request for [CreateInstanceConfigRequest][InstanceAdmin.CreateInstanceConfigRequest]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -905,7 +903,6 @@ def __call__( request (~.spanner_instance_admin.DeleteInstanceRequest): The request object. The request for [DeleteInstance][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -981,7 +978,6 @@ def __call__( request (~.spanner_instance_admin.DeleteInstanceConfigRequest): The request object. The request for [DeleteInstanceConfigRequest][InstanceAdmin.DeleteInstanceConfigRequest]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1109,7 +1105,8 @@ def __call__( "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", - "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } ], @@ -1228,7 +1225,6 @@ def __call__( request (~.spanner_instance_admin.GetInstanceRequest): The request object. The request for [GetInstance][google.spanner.admin.instance.v1.InstanceAdmin.GetInstance]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1319,7 +1315,6 @@ def __call__( request (~.spanner_instance_admin.GetInstanceConfigRequest): The request object. The request for [GetInstanceConfigRequest][google.spanner.admin.instance.v1.InstanceAdmin.GetInstanceConfig]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1414,7 +1409,6 @@ def __call__( request (~.spanner_instance_admin.ListInstanceConfigOperationsRequest): The request object. The request for [ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1510,7 +1504,6 @@ def __call__( request (~.spanner_instance_admin.ListInstanceConfigsRequest): The request object. The request for [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1602,7 +1595,6 @@ def __call__( request (~.spanner_instance_admin.ListInstancesRequest): The request object. The request for [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1742,7 +1734,8 @@ def __call__( "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", - "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", + "expression": "request.time < + timestamp('2020-10-01T00:00:00.000Z')", } } ], @@ -1958,7 +1951,6 @@ def __call__( request (~.spanner_instance_admin.UpdateInstanceRequest): The request object. The request for [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -2056,7 +2048,6 @@ def __call__( request (~.spanner_instance_admin.UpdateInstanceConfigRequest): The request object. The request for [UpdateInstanceConfigRequest][InstanceAdmin.UpdateInstanceConfigRequest]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. diff --git a/google/cloud/spanner_v1/gapic_version.py b/google/cloud/spanner_v1/gapic_version.py index f2fd25602f..16c2618143 100644 --- a/google/cloud/spanner_v1/gapic_version.py +++ b/google/cloud/spanner_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "3.28.0" # {x-release-please-version} +__version__ = "3.29.0" # {x-release-please-version} diff --git a/google/cloud/spanner_v1/services/spanner/async_client.py b/google/cloud/spanner_v1/services/spanner/async_client.py index 6a4f45b9ee..a4fe85882e 100644 --- a/google/cloud/spanner_v1/services/spanner/async_client.py +++ b/google/cloud/spanner_v1/services/spanner/async_client.py @@ -1205,8 +1205,8 @@ async def sample_read(): Args: request (Optional[Union[google.cloud.spanner_v1.types.ReadRequest, dict]]): - The request object. The request for - [Read][google.spanner.v1.Spanner.Read] and + The request object. The request for [Read][google.spanner.v1.Spanner.Read] + and [StreamingRead][google.spanner.v1.Spanner.StreamingRead]. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1303,8 +1303,8 @@ async def sample_streaming_read(): Args: request (Optional[Union[google.cloud.spanner_v1.types.ReadRequest, dict]]): - The request object. The request for - [Read][google.spanner.v1.Spanner.Read] and + The request object. The request for [Read][google.spanner.v1.Spanner.Read] + and [StreamingRead][google.spanner.v1.Spanner.StreamingRead]. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/google/cloud/spanner_v1/services/spanner/client.py b/google/cloud/spanner_v1/services/spanner/client.py index 88c71525e1..ef06269ecd 100644 --- a/google/cloud/spanner_v1/services/spanner/client.py +++ b/google/cloud/spanner_v1/services/spanner/client.py @@ -1401,8 +1401,8 @@ def sample_read(): Args: request (Union[google.cloud.spanner_v1.types.ReadRequest, dict]): - The request object. The request for - [Read][google.spanner.v1.Spanner.Read] and + The request object. The request for [Read][google.spanner.v1.Spanner.Read] + and [StreamingRead][google.spanner.v1.Spanner.StreamingRead]. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -1491,8 +1491,8 @@ def sample_streaming_read(): Args: request (Union[google.cloud.spanner_v1.types.ReadRequest, dict]): - The request object. The request for - [Read][google.spanner.v1.Spanner.Read] and + The request object. The request for [Read][google.spanner.v1.Spanner.Read] + and [StreamingRead][google.spanner.v1.Spanner.StreamingRead]. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/google/cloud/spanner_v1/services/spanner/transports/rest.py b/google/cloud/spanner_v1/services/spanner/transports/rest.py index 02df5f4654..582e260a13 100644 --- a/google/cloud/spanner_v1/services/spanner/transports/rest.py +++ b/google/cloud/spanner_v1/services/spanner/transports/rest.py @@ -608,7 +608,6 @@ def __call__( request (~.spanner.BatchCreateSessionsRequest): The request object. The request for [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -709,7 +708,6 @@ def __call__( request (~.spanner.BeginTransactionRequest): The request object. The request for [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -808,7 +806,6 @@ def __call__( request (~.spanner.CommitRequest): The request object. The request for [Commit][google.spanner.v1.Spanner.Commit]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -907,7 +904,6 @@ def __call__( request (~.spanner.CreateSessionRequest): The request object. The request for [CreateSession][google.spanner.v1.Spanner.CreateSession]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1004,7 +1000,6 @@ def __call__( request (~.spanner.DeleteSessionRequest): The request object. The request for [DeleteSession][google.spanner.v1.Spanner.DeleteSession]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1080,7 +1075,6 @@ def __call__( request (~.spanner.ExecuteBatchDmlRequest): The request object. The request for [ExecuteBatchDml][google.spanner.v1.Spanner.ExecuteBatchDml]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1218,7 +1212,6 @@ def __call__( The request object. The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1318,7 +1311,6 @@ def __call__( The request object. The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1421,7 +1413,6 @@ def __call__( request (~.spanner.GetSessionRequest): The request object. The request for [GetSession][google.spanner.v1.Spanner.GetSession]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1509,7 +1500,6 @@ def __call__( request (~.spanner.ListSessionsRequest): The request object. The request for [ListSessions][google.spanner.v1.Spanner.ListSessions]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1599,7 +1589,6 @@ def __call__( request (~.spanner.PartitionQueryRequest): The request object. The request for [PartitionQuery][google.spanner.v1.Spanner.PartitionQuery] - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1700,7 +1689,6 @@ def __call__( request (~.spanner.PartitionReadRequest): The request object. The request for [PartitionRead][google.spanner.v1.Spanner.PartitionRead] - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1802,7 +1790,6 @@ def __call__( The request object. The request for [Read][google.spanner.v1.Spanner.Read] and [StreamingRead][google.spanner.v1.Spanner.StreamingRead]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1901,7 +1888,6 @@ def __call__( request (~.spanner.RollbackRequest): The request object. The request for [Rollback][google.spanner.v1.Spanner.Rollback]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. @@ -1987,7 +1973,6 @@ def __call__( The request object. The request for [Read][google.spanner.v1.Spanner.Read] and [StreamingRead][google.spanner.v1.Spanner.StreamingRead]. - retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. diff --git a/google/cloud/spanner_v1/types/spanner.py b/google/cloud/spanner_v1/types/spanner.py index dfd5584d78..d829df618f 100644 --- a/google/cloud/spanner_v1/types/spanner.py +++ b/google/cloud/spanner_v1/types/spanner.py @@ -476,6 +476,14 @@ class ExecuteSqlRequest(proto.Message): given query. request_options (google.cloud.spanner_v1.types.RequestOptions): Common options for this request. + data_boost_enabled (bool): + If this is for a partitioned query and this field is set to + ``true``, the request will be executed via Spanner + independent compute resources. + + If the field is set to ``true`` but the request does not set + ``partition_token``, the API will return an + ``INVALID_ARGUMENT`` error. """ class QueryMode(proto.Enum): @@ -615,6 +623,10 @@ class QueryOptions(proto.Message): number=11, message="RequestOptions", ) + data_boost_enabled: bool = proto.Field( + proto.BOOL, + number=16, + ) class ExecuteBatchDmlRequest(proto.Message): @@ -1125,6 +1137,14 @@ class ReadRequest(proto.Message): create this partition_token. request_options (google.cloud.spanner_v1.types.RequestOptions): Common options for this request. + data_boost_enabled (bool): + If this is for a partitioned read and this field is set to + ``true``, the request will be executed via Spanner + independent compute resources. + + If the field is set to ``true`` but the request does not set + ``partition_token``, the API will return an + ``INVALID_ARGUMENT`` error. """ session: str = proto.Field( @@ -1170,6 +1190,10 @@ class ReadRequest(proto.Message): number=11, message="RequestOptions", ) + data_boost_enabled: bool = proto.Field( + proto.BOOL, + number=15, + ) class BeginTransactionRequest(proto.Message): diff --git a/samples/generated_samples/snippet_metadata_google.spanner.admin.database.v1.json b/samples/generated_samples/snippet_metadata_google.spanner.admin.database.v1.json index 48e89648b1..d27129ac69 100644 --- a/samples/generated_samples/snippet_metadata_google.spanner.admin.database.v1.json +++ b/samples/generated_samples/snippet_metadata_google.spanner.admin.database.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-spanner-admin-database", - "version": "3.28.0" + "version": "3.29.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.spanner.admin.instance.v1.json b/samples/generated_samples/snippet_metadata_google.spanner.admin.instance.v1.json index fffb16d354..91f4d1cdfc 100644 --- a/samples/generated_samples/snippet_metadata_google.spanner.admin.instance.v1.json +++ b/samples/generated_samples/snippet_metadata_google.spanner.admin.instance.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-spanner-admin-instance", - "version": "3.28.0" + "version": "3.29.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.spanner.v1.json b/samples/generated_samples/snippet_metadata_google.spanner.v1.json index e7e3decdcf..aa8600b373 100644 --- a/samples/generated_samples/snippet_metadata_google.spanner.v1.json +++ b/samples/generated_samples/snippet_metadata_google.spanner.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-spanner", - "version": "3.28.0" + "version": "3.29.0" }, "snippets": [ { diff --git a/samples/samples/requirements-test.txt b/samples/samples/requirements-test.txt index d02197d488..c64ef17f42 100644 --- a/samples/samples/requirements-test.txt +++ b/samples/samples/requirements-test.txt @@ -1,4 +1,4 @@ -pytest==7.2.1 +pytest==7.2.2 pytest-dependency==0.5.1 mock==5.0.1 google-cloud-testutils==1.3.3 diff --git a/samples/samples/requirements.txt b/samples/samples/requirements.txt index d82843ee11..6c8964d745 100644 --- a/samples/samples/requirements.txt +++ b/samples/samples/requirements.txt @@ -1,2 +1,2 @@ -google-cloud-spanner==3.27.1 +google-cloud-spanner==3.28.0 futures==3.4.0; python_version < "3" diff --git a/scripts/fixup_spanner_v1_keywords.py b/scripts/fixup_spanner_v1_keywords.py index ed532c0d8f..b897807106 100644 --- a/scripts/fixup_spanner_v1_keywords.py +++ b/scripts/fixup_spanner_v1_keywords.py @@ -45,15 +45,15 @@ class spannerCallTransformer(cst.CSTTransformer): 'create_session': ('database', 'session', ), 'delete_session': ('name', ), 'execute_batch_dml': ('session', 'transaction', 'statements', 'seqno', 'request_options', ), - 'execute_sql': ('session', 'sql', 'transaction', 'params', 'param_types', 'resume_token', 'query_mode', 'partition_token', 'seqno', 'query_options', 'request_options', ), - 'execute_streaming_sql': ('session', 'sql', 'transaction', 'params', 'param_types', 'resume_token', 'query_mode', 'partition_token', 'seqno', 'query_options', 'request_options', ), + 'execute_sql': ('session', 'sql', 'transaction', 'params', 'param_types', 'resume_token', 'query_mode', 'partition_token', 'seqno', 'query_options', 'request_options', 'data_boost_enabled', ), + 'execute_streaming_sql': ('session', 'sql', 'transaction', 'params', 'param_types', 'resume_token', 'query_mode', 'partition_token', 'seqno', 'query_options', 'request_options', 'data_boost_enabled', ), 'get_session': ('name', ), 'list_sessions': ('database', 'page_size', 'page_token', 'filter', ), 'partition_query': ('session', 'sql', 'transaction', 'params', 'param_types', 'partition_options', ), 'partition_read': ('session', 'table', 'key_set', 'transaction', 'index', 'columns', 'partition_options', ), - 'read': ('session', 'table', 'columns', 'key_set', 'transaction', 'index', 'limit', 'resume_token', 'partition_token', 'request_options', ), + 'read': ('session', 'table', 'columns', 'key_set', 'transaction', 'index', 'limit', 'resume_token', 'partition_token', 'request_options', 'data_boost_enabled', ), 'rollback': ('session', 'transaction_id', ), - 'streaming_read': ('session', 'table', 'columns', 'key_set', 'transaction', 'index', 'limit', 'resume_token', 'partition_token', 'request_options', ), + 'streaming_read': ('session', 'table', 'columns', 'key_set', 'transaction', 'index', 'limit', 'resume_token', 'partition_token', 'request_options', 'data_boost_enabled', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: