Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit d7c2610

Browse files
authored
Merge branch 'main' into remove-python-37
2 parents 20dd91c + 4490721 commit d7c2610

15 files changed

+47
-17
lines changed

.github/workflows/integration-tests-against-emulator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
services:
1212
emulator:
13-
image: gcr.io/cloud-spanner-emulator/emulator:1.5.37
13+
image: gcr.io/cloud-spanner-emulator/emulator
1414
ports:
1515
- 9010:9010
1616
- 9020:9020

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "3.56.0"
2+
".": "3.57.0"
33
}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
[1]: https://pypi.org/project/google-cloud-spanner/#history
66

7+
## [3.57.0](https://github.com/googleapis/python-spanner/compare/v3.56.0...v3.57.0) (2025-08-14)
8+
9+
10+
### Features
11+
12+
* Support configuring logger in dbapi kwargs ([#1400](https://github.com/googleapis/python-spanner/issues/1400)) ([ffa5c9e](https://github.com/googleapis/python-spanner/commit/ffa5c9e627583ab0635dcaa5512b6e034d811d86))
13+
714
## [3.56.0](https://github.com/googleapis/python-spanner/compare/v3.55.0...v3.56.0) (2025-07-24)
815

916

google/cloud/spanner_admin_database_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "3.56.0" # {x-release-please-version}
16+
__version__ = "3.57.0" # {x-release-please-version}

google/cloud/spanner_admin_instance_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "3.56.0" # {x-release-please-version}
16+
__version__ = "3.57.0" # {x-release-please-version}

google/cloud/spanner_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "3.56.0" # {x-release-please-version}
16+
__version__ = "3.57.0" # {x-release-please-version}

google/cloud/spanner_v1/snapshot.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ def _restart_on_unavailable(
133133
# Update the transaction from the response.
134134
if transaction is not None:
135135
transaction._update_for_result_set_pb(item)
136-
if item.precommit_token is not None and transaction is not None:
136+
if (
137+
item._pb is not None
138+
and item._pb.HasField("precommit_token")
139+
and transaction is not None
140+
):
137141
transaction._update_for_precommit_token_pb(item.precommit_token)
138142

139143
if item.resume_token:
@@ -1029,7 +1033,7 @@ def _update_for_transaction_pb(self, transaction_pb: Transaction) -> None:
10291033
if self._transaction_id is None and transaction_pb.id:
10301034
self._transaction_id = transaction_pb.id
10311035

1032-
if transaction_pb.precommit_token:
1036+
if transaction_pb._pb.HasField("precommit_token"):
10331037
self._update_for_precommit_token_pb_unsafe(transaction_pb.precommit_token)
10341038

10351039
def _update_for_precommit_token_pb(

google/cloud/spanner_v1/transaction.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,20 @@ def before_next_retry(nth_retry, delay_in_seconds):
328328
# successfully commit, and must be retried with the new precommit token.
329329
# The mutations should not be included in the new request, and no further
330330
# retries or exception handling should be performed.
331-
if commit_response_pb.precommit_token:
331+
if commit_response_pb._pb.HasField("precommit_token"):
332332
add_span_event(span, commit_retry_event_name)
333+
nth_request = database._next_nth_request
333334
commit_response_pb = api.commit(
334335
request=CommitRequest(
335336
precommit_token=commit_response_pb.precommit_token,
336337
**common_commit_request_args,
337338
),
338-
metadata=metadata,
339+
metadata=database.metadata_with_request_id(
340+
nth_request,
341+
1,
342+
metadata,
343+
span,
344+
),
339345
)
340346

341347
add_span_event(span, "Commit Done")
@@ -521,7 +527,7 @@ def wrapped_method(*args, **kwargs):
521527
if is_inline_begin:
522528
self._lock.release()
523529

524-
if result_set_pb.precommit_token is not None:
530+
if result_set_pb._pb.HasField("precommit_token"):
525531
self._update_for_precommit_token_pb(result_set_pb.precommit_token)
526532

527533
return result_set_pb.stats.row_count_exact

samples/generated_samples/snippet_metadata_google.spanner.admin.database.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-spanner-admin-database",
11-
"version": "3.56.0"
11+
"version": "3.57.0"
1212
},
1313
"snippets": [
1414
{

samples/generated_samples/snippet_metadata_google.spanner.admin.instance.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-spanner-admin-instance",
11-
"version": "3.56.0"
11+
"version": "3.57.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)