[spanner] RequestOptions.transaction_tag is unexpectedly mutated to '' when passed to snapshot.read()
メンテナーはふだん 1 日以内に返信
@steotia がすでに取り組んでいます。
2026年7月31日 から。
評価
この issue はまだ評価されていません。
説明
Determine this is the right repository
- I determined this is the correct repository in which to report this bug.
Summary of the issue
When passing a RequestOptions instance with a transaction_tag to snapshot.read(), the transaction_tag attribute of the original object is unexpectedly mutated to '' (empty string).
API client name and version
google-cloud-spanner==3.69.0
Reproduction steps: code
from google.cloud import spanner
from google.cloud.spanner_v1.types import RequestOptions
spanner_client = spanner.Client()
instance = spanner_client.instance("your-instance-id")
database = instance.database("your-database-id")
request_opts = RequestOptions(transaction_tag="tran1")
print("Before read:", request_opts.transaction_tag)
with database.snapshot() as snapshot:
snapshot.read(
table="Singers",
columns=("SingerId", "FirstName"),
keyset=spanner.KeySet(all_=True),
request_options=request_opts,
)
print("After read:", request_opts.transaction_tag)
Reproduction steps: supporting files
No response
Reproduction steps: actual results
Before read: tran1
After read:
Reproduction steps: expected results
Before read: tran1
After read: tran1
OS & version + platform
Windows 11
Python environment
Python 3.14.6
Python dependencies
pip list
Package Version
certifi 2026.7.22
cffi 2.1.0
charset-normalizer 3.4.9
cryptography 49.0.0
google-api-core 2.33.0
google-auth 2.56.2
google-cloud-core 2.6.0
google-cloud-monitoring 2.31.0
google-cloud-spanner 3.69.0
google-cloud-storage 3.13.0
google-crc32c 1.8.0
google-resumable-media 2.10.0
googleapis-common-protos 1.75.0
grpc-google-iam-v1 0.14.4
grpc-interceptor 0.15.4
grpcio 1.82.1
grpcio-status 1.82.1
idna 3.18
mmh3 5.2.1
opentelemetry-api 1.44.0
opentelemetry-resourcedetector-gcp 1.12.0a0
opentelemetry-sdk 1.44.0
opentelemetry-semantic-conventions 0.65b0
pip 26.1.2
proto-plus 1.28.2
protobuf 7.35.1
pyasn1 0.6.4
pyasn1_modules 0.4.2
pycparser 3.0
requests 2.34.2
sqlparse 0.5.5
typing_extensions 4.16.0
urllib3 2.7.0
Additional context
Passing an object as an argument should not destructively mutate the caller's input object.
- 主要言語
- Python
- スター
- 5.4k
- フォーク
- 1.8k
- 平均マージ
- 2日 18時間
- マージ済み PR(30日)
- 148
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
googleapis/google-cloud-python のほかの issue
-
api: spanner type: feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
googleapis/google-cloud-python#18584 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
googleapis/google-cloud-python#18532 ·
メンテナーはふだん 1 日以内に返信
-
auth: call_client_cert_callback() discards passphrase for encrypted keys対応中かも @kwy404 が 7 日前に担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
googleapis/google-cloud-python#18467 ·
メンテナーはふだん 1 日以内に返信
-
auth: `impersonated_credentials` loses `subject` on copy, so `with_scopes()` and `with_quota_project()` turn off domain wide delegation対応中かも @Om-singhaI が 19 日前に担当しました。 オープンauth priority: p2 type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
googleapis/google-cloud-python#18428 ·
メンテナーはふだん 1 日以内に返信
-
priority: p2 type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
googleapis/google-cloud-python#18375 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
googleapis/google-cloud-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pyjanitor-devs/pyjanitor#1758 ·
メンテナーはふだん 1 日以内に返信
-
bug ready for review
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
odysseus-dev/odysseus#6641 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
happypawspillaro/happypaws#78 ·
メンテナーはふだん 4 日以内に返信
-
pydanty:is-working
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
pydantic/pydantic-ai#10020 ·
メンテナーはふだん 1 日以内に返信
-
stdlib type-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
python/cpython#159044 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信