GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore(spanner): Issue#1163 Remove dependency of spanner dbapi from sp… · googleapis/python-spanner@fe20d41

This repository was archived by the owner on Jun 8, 2026. It is now read-only.

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • google/cloud
    • spanner_dbapi
      • partition_helper.py
    • spanner_v1
      • __init__.py
      • database.py
      • transaction.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎google/cloud/spanner_dbapi/partition_helper.py‎

Copy file name to clipboardExpand all lines: google/cloud/spanner_dbapi/partition_helper.py
+2-7Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
import pickle
2020
import base64
2121

22+
from google.cloud.spanner_v1 import BatchTransactionId
23+
2224

2325
def decode_from_string(encoded_partition_id):
2426
gzip_bytes = base64.b64decode(bytes(encoded_partition_id, "utf-8"))
@@ -33,13 +35,6 @@ def encode_to_string(batch_transaction_id, partition_result):
3335
return str(base64.b64encode(gzip_bytes), "utf-8")
3436

3537

36-
@dataclass
37-
class BatchTransactionId:
38-
transaction_id: str
39-
session_id: str
40-
read_timestamp: Any
41-
42-
4338
@dataclass
4439
class PartitionId:
4540
batch_transaction_id: BatchTransactionId
Collapse file

‎google/cloud/spanner_v1/__init__.py‎

Copy file name to clipboardExpand all lines: google/cloud/spanner_v1/__init__.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
from .types.type import TypeAnnotationCode
6565
from .types.type import TypeCode
6666
from .data_types import JsonObject
67+
from .transaction import BatchTransactionId
6768

6869
from google.cloud.spanner_v1 import param_types
6970
from google.cloud.spanner_v1.client import Client
@@ -147,4 +148,5 @@
147148
# google.cloud.spanner_v1.services
148149
"SpannerClient",
149150
"SpannerAsyncClient",
151+
"BatchTransactionId",
150152
)
Collapse file

‎google/cloud/spanner_v1/database.py‎

Copy file name to clipboardExpand all lines: google/cloud/spanner_v1/database.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
from google.cloud.spanner_admin_database_v1 import RestoreDatabaseRequest
4141
from google.cloud.spanner_admin_database_v1 import UpdateDatabaseDdlRequest
4242
from google.cloud.spanner_admin_database_v1.types import DatabaseDialect
43-
from google.cloud.spanner_dbapi.partition_helper import BatchTransactionId
43+
from google.cloud.spanner_v1.transaction import BatchTransactionId
4444
from google.cloud.spanner_v1 import ExecuteSqlRequest
4545
from google.cloud.spanner_v1 import Type
4646
from google.cloud.spanner_v1 import TypeCode
Collapse file

‎google/cloud/spanner_v1/transaction.py‎

Copy file name to clipboardExpand all lines: google/cloud/spanner_v1/transaction.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
from google.cloud.spanner_v1 import RequestOptions
3737
from google.api_core import gapic_v1
3838
from google.api_core.exceptions import InternalServerError
39+
from dataclasses import dataclass
40+
from typing import Any
3941

4042

4143
class Transaction(_SnapshotBase, _BatchBase):
@@ -554,3 +556,10 @@ def __exit__(self, exc_type, exc_val, exc_tb):
554556
self.commit()
555557
else:
556558
self.rollback()
559+
560+
561+
@dataclass
562+
class BatchTransactionId:
563+
transaction_id: str
564+
session_id: str
565+
read_timestamp: Any

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.