Skip to content

Commit 2ef80fc

Browse files
authored
Apply updates for CRDB v25.3 (#274)
1 parent bc87688 commit 2ef80fc

File tree

6 files changed

+89
-30
lines changed

6 files changed

+89
-30
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ jobs:
4444
"cockroach:latest-v24.2",
4545
"cockroach:latest-v24.3",
4646
"cockroach:latest-v25.1",
47-
"cockroach:latest-v25.2"
47+
"cockroach:latest-v25.2",
48+
"cockroach:latest-v25.3"
4849
]
4950
db-alias: [
5051
"psycopg2",

dev-requirements.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
backports-tarfile==1.2.0
22
# via jaraco-context
3-
certifi==2025.4.26
3+
certifi==2025.8.3
44
# via requests
55
cffi==1.17.1
66
# via cryptography
7-
charset-normalizer==3.4.2
7+
charset-normalizer==3.4.3
88
# via requests
9-
cryptography==45.0.4
9+
cryptography==45.0.6
1010
# via secretstorage
11-
distlib==0.3.9
11+
distlib==0.4.0
1212
# via virtualenv
13-
docutils==0.21.2
13+
docutils==0.22
1414
# via readme-renderer
15-
filelock==3.18.0
15+
filelock==3.19.1
1616
# via
1717
# tox
1818
# virtualenv
@@ -28,7 +28,7 @@ jaraco-classes==3.4.0
2828
# via keyring
2929
jaraco-context==6.0.1
3030
# via keyring
31-
jaraco-functools==4.1.0
31+
jaraco-functools==4.3.0
3232
# via keyring
3333
jeepney==0.9.0
3434
# via
@@ -44,7 +44,7 @@ more-itertools==10.7.0
4444
# via
4545
# jaraco-classes
4646
# jaraco-functools
47-
nh3==0.2.21
47+
nh3==0.3.0
4848
# via readme-renderer
4949
packaging==25.0
5050
# via
@@ -58,13 +58,13 @@ py==1.11.0
5858
# via tox
5959
pycparser==2.22
6060
# via cffi
61-
pygments==2.19.1
61+
pygments==2.19.2
6262
# via
6363
# readme-renderer
6464
# rich
6565
readme-renderer==44.0
6666
# via twine
67-
requests==2.32.4
67+
requests==2.32.5
6868
# via
6969
# id
7070
# requests-toolbelt
@@ -73,7 +73,7 @@ requests-toolbelt==1.0.0
7373
# via twine
7474
rfc3986==2.0.0
7575
# via twine
76-
rich==14.0.0
76+
rich==14.1.0
7777
# via twine
7878
secretstorage==3.3.3
7979
# via keyring
@@ -85,13 +85,13 @@ tox==3.23.1
8585
# via -r dev-requirements.in
8686
twine==6.1.0
8787
# via -r dev-requirements.in
88-
typing-extensions==4.14.0
89-
# via rich
88+
typing-extensions==4.14.1
89+
# via virtualenv
9090
urllib3==2.5.0
9191
# via
9292
# requests
9393
# twine
94-
virtualenv==20.31.2
94+
virtualenv==20.34.0
9595
# via tox
9696
zipp==3.23.0
9797
# via importlib-metadata

sqlalchemy_cockroachdb/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ def initialize(self, connection):
139139
self._is_v243plus = self._is_v242plus and (" v24.2." not in sversion)
140140
self._is_v251plus = self._is_v243plus and (" v24.3." not in sversion)
141141
self._is_v252plus = self._is_v251plus and (" v25.1." not in sversion)
142+
self._is_v253plus = self._is_v252plus and (" v25.2." not in sversion)
142143
self._has_native_json = self._is_v2plus
143144
self._has_native_jsonb = self._is_v2plus
144145
self._supports_savepoints = self._is_v201plus

test-requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ mock
1111
more-itertools
1212
psycopg
1313
psycopg2
14-
pytest==7.1.3
14+
pytest
1515
sqlalchemy>=2.0.0

test-requirements.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
alembic==1.16.1
1+
alembic==1.16.4
22
# via -r test-requirements.in
33
async-timeout==5.0.1
44
# via asyncpg
55
asyncpg==0.30.0
66
# via -r test-requirements.in
7-
attrs==25.3.0
7+
exceptiongroup==1.3.0
88
# via pytest
99
futures==3.0.5
1010
# via -r test-requirements.in
11-
greenlet==3.2.3
11+
greenlet==3.2.4
1212
# via sqlalchemy
1313
iniconfig==2.1.0
1414
# via pytest
@@ -28,20 +28,21 @@ psycopg==3.2.9
2828
# via -r test-requirements.in
2929
psycopg2==2.9.10
3030
# via -r test-requirements.in
31-
py==1.11.0
31+
pygments==2.19.2
3232
# via pytest
33-
pytest==7.1.3
33+
pytest==8.4.1
3434
# via -r test-requirements.in
35-
sqlalchemy==2.0.41
35+
sqlalchemy==2.0.43
3636
# via
3737
# -r test-requirements.in
3838
# alembic
3939
tomli==2.2.1
4040
# via
4141
# alembic
4242
# pytest
43-
typing-extensions==4.14.0
43+
typing-extensions==4.14.1
4444
# via
4545
# alembic
46+
# exceptiongroup
4647
# psycopg
4748
# sqlalchemy

test/test_suite_sqlalchemy.py

Lines changed: 63 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
from sqlalchemy.testing.suite import (
55
ComponentReflectionTest as _ComponentReflectionTest,
66
)
7+
from sqlalchemy.testing.suite import (
8+
ComponentReflectionTestExtra as _ComponentReflectionTestExtra,
9+
)
710
from sqlalchemy.testing.suite import HasIndexTest as _HasIndexTest
811
from sqlalchemy.testing.suite import HasTableTest as _HasTableTest
912
from sqlalchemy.testing.suite import IntegerTest as _IntegerTest
@@ -18,6 +21,7 @@
1821
)
1922
from sqlalchemy.testing.suite import TrueDivTest as _TrueDivTest
2023
from sqlalchemy.testing.suite import UnicodeSchemaTest as _UnicodeSchemaTest
24+
import sqlalchemy.types as sql_types
2125

2226

2327
class ComponentReflectionTest(_ComponentReflectionTest):
@@ -242,7 +246,12 @@ def test_get_multi_indexes(self):
242246
{
243247
"column_names": ["data"],
244248
"column_sorting": {"data": ("nulls_first",)},
245-
"dialect_options": {"postgresql_using": "prefix"},
249+
"dialect_options": {
250+
"postgresql_ops": {
251+
"data": None,
252+
},
253+
"postgresql_using": "prefix",
254+
},
246255
"duplicates_constraint": "dingalings_data_key",
247256
"name": "dingalings_data_key",
248257
"unique": True,
@@ -253,7 +262,13 @@ def test_get_multi_indexes(self):
253262
"address_id": ("nulls_first",),
254263
"dingaling_id": ("nulls_first",),
255264
},
256-
"dialect_options": {"postgresql_using": "prefix"},
265+
"dialect_options": {
266+
"postgresql_ops": {
267+
"address_id": None,
268+
"dingaling_id": None,
269+
},
270+
"postgresql_using": "prefix",
271+
},
257272
"duplicates_constraint": "zz_dingalings_multiple",
258273
"name": "zz_dingalings_multiple",
259274
"unique": True,
@@ -263,7 +278,12 @@ def test_get_multi_indexes(self):
263278
{
264279
"column_names": ["email_address"],
265280
"column_sorting": {"email_address": ("nulls_first",)},
266-
"dialect_options": {"postgresql_using": "prefix"},
281+
"dialect_options": {
282+
"postgresql_ops": {
283+
"email_address": None,
284+
},
285+
"postgresql_using": "prefix",
286+
},
267287
"name": "ix_email_addresses_email_address",
268288
"unique": False,
269289
}
@@ -273,7 +293,12 @@ def test_get_multi_indexes(self):
273293
{
274294
"column_names": ["q"],
275295
"column_sorting": {"q": ("desc", "nulls_last")},
276-
"dialect_options": {"postgresql_using": "prefix"},
296+
"dialect_options": {
297+
"postgresql_ops": {
298+
"q": None,
299+
},
300+
"postgresql_using": "prefix",
301+
},
277302
"name": "noncol_idx_nopk",
278303
"unique": False,
279304
}
@@ -282,7 +307,12 @@ def test_get_multi_indexes(self):
282307
{
283308
"column_names": ["q"],
284309
"column_sorting": {"q": ("desc", "nulls_last")},
285-
"dialect_options": {"postgresql_using": "prefix"},
310+
"dialect_options": {
311+
"postgresql_ops": {
312+
"q": None,
313+
},
314+
"postgresql_using": "prefix",
315+
},
286316
"name": "noncol_idx_pk",
287317
"unique": False,
288318
}
@@ -295,14 +325,27 @@ def test_get_multi_indexes(self):
295325
"test2": ("nulls_first",),
296326
"user_id": ("nulls_first",),
297327
},
298-
"dialect_options": {"postgresql_using": "prefix"},
328+
"dialect_options": {
329+
"postgresql_ops": {
330+
"test1": None,
331+
"test2": None,
332+
"user_id": None,
333+
},
334+
"postgresql_using": "prefix",
335+
},
299336
"name": "users_all_idx",
300337
"unique": False,
301338
},
302339
{
303340
"column_names": ["test1", "test2"],
304341
"column_sorting": {"test1": ("nulls_first",), "test2": ("nulls_first",)},
305-
"dialect_options": {"postgresql_using": "prefix"},
342+
"dialect_options": {
343+
"postgresql_ops": {
344+
"test1": None,
345+
"test2": None,
346+
},
347+
"postgresql_using": "prefix",
348+
},
306349
"duplicates_constraint": "users_t_idx",
307350
"name": "users_t_idx",
308351
"unique": True,
@@ -378,6 +421,19 @@ def test_not_existing_table(self):
378421
pass
379422

380423

424+
class ComponentReflectionTestExtra(_ComponentReflectionTestExtra):
425+
@testing.combinations(
426+
sql_types.String,
427+
sql_types.VARCHAR,
428+
# sql_types.CHAR, # we return VARCHAR(length=52)
429+
(sql_types.NVARCHAR, testing.requires.nvarchar_types),
430+
(sql_types.NCHAR, testing.requires.nvarchar_types),
431+
argnames="type_",
432+
)
433+
def test_string_length_reflection(self, connection, metadata, type_):
434+
super().test_string_length_reflection(connection, metadata, type_, [])
435+
436+
381437
class HasIndexTest(_HasIndexTest):
382438
@skip("cockroachdb")
383439
def test_has_index(self):

0 commit comments

Comments
 (0)