Skip to content

Commit 7b76ba7

Browse files
authored
Switch sqlalchemy-cratedb from dev branch to released 0.43.1 (#1867)
* Update sqlalchemy-cratedb requirement to >=0.43.1 and adjust test skips for async dialects * skip for unsupported psycopg dialect * Update insert_records value with CrateDB statement length limit * Update insert_records
1 parent dbbb0a1 commit 7b76ba7

4 files changed

Lines changed: 13 additions & 6 deletions

File tree

by-dataframe/pandas/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ colorlog<7
33
crate>=2.1.2
44
pandas>=2.3,<3.1
55
pueblo>=0.0.18
6-
sqlalchemy-cratedb[all] @ git+https://github.com/crate-workbench/sqlalchemy-cratedb@amo/postgresql-async
6+
sqlalchemy-cratedb[all]>=0.43.1

by-dataframe/pandas/test_read.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
import shlex
22
import subprocess
3+
import pytest
34

45

56
def run(command: str):
67
subprocess.check_call(shlex.split(command))
78

89

910
def test_read_urllib3():
10-
cmd = "time python read_pandas.py --dburi=crate+urllib3://crate@localhost:4200"
11+
cmd = "time python read_pandas.py --dburi=crate://crate@localhost:4200"
1112
run(cmd)
1213

1314

15+
# TODO: Remove skip when psycopg dialect is released in sqlalchemy-cratedb
16+
@pytest.mark.skip(reason="psycopg dialect not yet in released sqlalchemy-cratedb")
1417
def test_read_psycopg3():
1518
cmd = "time python read_pandas.py --dburi=crate+psycopg://crate@localhost:5432"
1619
run(cmd)

by-language/python-sqlalchemy/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ colorlog<7
33
crate>=2.1.2
44
pueblo>=0.0.18
55
sqlalchemy>=2.0.49,<2.1
6-
sqlalchemy-cratedb[all] @ git+https://github.com/crate-workbench/sqlalchemy-cratedb@amo/postgresql-async
6+
sqlalchemy-cratedb[all]>=0.43.1

by-language/python-sqlalchemy/test.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ def run(command: str):
88

99

1010
def test_insert_efficient_multirow():
11-
insert_records = 25_000
11+
# CrateDB enforces statement_max_length=262144; keep well under that limit.
12+
insert_records = 5_000
1213
cmd = f"time python insert_efficient.py cratedb multirow {insert_records}"
1314
run(cmd)
1415

1516

1617
def test_insert_efficient_batched():
17-
insert_records = 50_000
18+
insert_records = 5_000
1819
cmd = f"time python insert_efficient.py cratedb batched {insert_records}"
1920
run(cmd)
2021

@@ -26,17 +27,20 @@ def test_insert_efficient_unknown(capfd):
2627
out, err = capfd.readouterr()
2728
assert "ValueError: Unknown variant: unknown" in err
2829

29-
30+
# TODO: Remove skip when psycopg/asyncpg dialect is released in sqlalchemy-cratedb
31+
@pytest.mark.skip(reason="psycopg/asyncpg dialect not yet in released sqlalchemy-cratedb")
3032
def test_sync_table():
3133
cmd = "time python sync_table.py urllib3 psycopg"
3234
run(cmd)
3335

3436

37+
@pytest.mark.skip(reason="psycopg/asyncpg dialect not yet in released sqlalchemy-cratedb")
3538
def test_async_table():
3639
cmd = "time python async_table.py psycopg asyncpg"
3740
run(cmd)
3841

3942

43+
@pytest.mark.skip(reason="psycopg/asyncpg dialect not yet in released sqlalchemy-cratedb")
4044
def test_async_streaming():
4145
cmd = "time python async_streaming.py psycopg asyncpg"
4246
run(cmd)

0 commit comments

Comments
 (0)