This repository was archived by the owner on Mar 31, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 104
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
3.25 breaks pools #869
Copy link
Copy link
Closed
Labels
api: spannerIssues related to the googleapis/python-spanner API.Issues related to the googleapis/python-spanner API.
Description
Environment details
- linux / docker
- Python version:
3.8.10 - pip version:
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8) google-cloud-spannerversion:3.25.0
Code example
Hey folks -- simple one out of the latest release:
from google.cloud.spanner import Client, PingingPool
client = Client("[REDACTED]")
instance = client.instance("[REDACTED]")
pool = PingingPool(
size=1,
default_timeout=500,
ping_interval=1000,
)
db = instance.database("[REDACTED]", pool=pool)
with db.snapshot() as snapshot:
res = snapshot.execute_sql("SELECT 1")
for r in res:
print(r)This code works fine ([1]) in 3.24, but since the 3.25 release I get:
Traceback (most recent call last):
File "spanner.py", line 12, in <module>
db = instance.database("cache", pool=pool)
File "/home/alex/.local/lib/python3.8/site-packages/google/cloud/spanner_v1/instance.py", line 473, in database
return Database(
File "/home/alex/.local/lib/python3.8/site-packages/google/cloud/spanner_v1/database.py", line 163, in __init__
pool.bind(self)
File "/home/alex/.local/lib/python3.8/site-packages/google/cloud/spanner_v1/pool.py", line 413, in bind
resp = api.batch_create_sessions(
File "/home/alex/.local/lib/python3.8/site-packages/google/cloud/spanner_v1/services/spanner/client.py", line 662, in batch_create_sessions
raise ValueError(
ValueError: If the `request` argument is set, then none of the individual field arguments should be set.
I assume it's something related to v3.24.0...v3.25.0#diff-0fd6fa85fe799ea99ab5ce5a61a204f36d680580908bc18263885b3b0fe1a716R414
Note that if I don't use the pool (eg. db = instance.database("[REDACTED]")), everything works fine.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: spannerIssues related to the googleapis/python-spanner API.Issues related to the googleapis/python-spanner API.