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

Commit 61d836b

Browse files
asthamohtaIlyaFaersurbhigarg92
authored
feat: feat: SQLAlchemy 2.0 support (#314)
* feat: SQLAlchemy 2.0 support * sqlalchemy 2.0 support changes * more change for SQLAlchemy 2.0 support * more change for SQLAlchemy 2.0 support * github workflow * fixing reset * fix * changes * changes * skipping test * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * multi indexes * fix: sqlalchemy 2.0 test cases * temp removing test_has_index * changes * changes * changes * multi_index * multi_index * multi_index * multi_index * changes * changes * changes * multi_index * changes * changes * Changes * Changes * Changes * multi fk * changes * changes * multi_index * changes * changes * changes * changes * changes * changes * changes * changes * fix: test_has_index * changes * changes * changes * fix: test_has_index * fix * fix * changes * changes * changes * fix * changes * changes * changes * fix * adding kokoro test * changes * view test cases * changes * changes * changes * test changes * test changes * lint * docs * review comments * view testing * view testing * view testing * review fixes --------- Co-authored-by: IlyaFaer <gurovilya9@gmail.com> Co-authored-by: surbhigarg92 <surbhigarg.92@gmail.com>
1 parent c9ce478 commit 61d836b

7 files changed

Lines changed: 3761 additions & 144 deletions

File tree

.github/workflows/test_suite.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,30 @@ jobs:
8787
GOOGLE_CLOUD_PROJECT: appdev-soda-spanner-staging
8888
SQLALCHEMY_SILENCE_UBER_WARNING: 1
8989

90+
compliance_tests_20:
91+
runs-on: ubuntu-latest
92+
93+
services:
94+
emulator-0:
95+
image: gcr.io/cloud-spanner-emulator/emulator:latest
96+
ports:
97+
- 9010:9010
98+
99+
steps:
100+
- name: Checkout code
101+
uses: actions/checkout@v2
102+
- name: Setup Python
103+
uses: actions/setup-python@v4
104+
with:
105+
python-version: 3.8
106+
- name: Install nox
107+
run: python -m pip install nox
108+
- name: Run Compliance Tests
109+
run: nox -s compliance_test_20
110+
env:
111+
SPANNER_EMULATOR_HOST: localhost:9010
112+
GOOGLE_CLOUD_PROJECT: appdev-soda-spanner-staging
113+
90114
migration_tests:
91115
runs-on: ubuntu-latest
92116

google/cloud/sqlalchemy_spanner/requirements.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
from sqlalchemy.testing import exclusions
1616
from sqlalchemy.testing.requirements import SuiteRequirements
17+
from sqlalchemy.testing.exclusions import against, only_on
1718

1819

1920
class Requirements(SuiteRequirements): # pragma: no cover
@@ -45,6 +46,15 @@ def foreign_key_constraint_name_reflection(self):
4546
def schema_reflection(self):
4647
return exclusions.open()
4748

49+
@property
50+
def array_type(self):
51+
return only_on([lambda config: against(config, "postgresql")])
52+
53+
@property
54+
def uuid_data_type(self):
55+
"""Return databases that support the UUID datatype."""
56+
return only_on(("postgresql >= 8.3", "mariadb >= 10.7.0"))
57+
4858
@property
4959
def implicitly_named_constraints(self):
5060
return exclusions.open()
@@ -99,3 +109,8 @@ def precision_numerics_enotation_large(self):
99109
"""target backend supports Decimal() objects using E notation
100110
to represent very large values."""
101111
return exclusions.open()
112+
113+
@property
114+
def views(self):
115+
"""Target database must support VIEWs."""
116+
return exclusions.open()

0 commit comments

Comments
 (0)