Skip to content

Commit c86a4b3

Browse files
committed
Split dialect from driver, part 3: Swap in SQLAlchemy dialect and tests
Move SQLAlchemy dialect implementation to the top level.
1 parent 0a0b920 commit c86a4b3

40 files changed

+169
-374
lines changed

.github/workflows/tests.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
sqla-version: ['<1.4', '<1.5', '<2.1']
2525
pip-allow-prerelease: ['false']
2626

27-
# To save resources, only use the most recent Python versions on macOS.
2827
exclude:
28+
# To save resources, only use the most recent Python versions on macOS.
2929
- os: 'macos-latest'
3030
python-version: '3.7'
3131
- os: 'macos-latest'
@@ -34,6 +34,13 @@ jobs:
3434
python-version: '3.9'
3535
- os: 'macos-latest'
3636
python-version: '3.10'
37+
# SQLAlchemy 1.3 is not supported on Python 3.12 and higher.
38+
- os: 'ubuntu-latest'
39+
python-version: '3.12'
40+
sqla-version: '<1.4'
41+
- os: 'macos-latest'
42+
python-version: '3.12'
43+
sqla-version: '<1.4'
3744

3845
# Another CI test matrix slot to test against prerelease versions of Python packages.
3946
include:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ library [crate-python].
2121
The package is available from [PyPI] at [sqlalchemy-cratedb].
2222
To install the most recent version, run:
2323
```shell
24-
pip install --upgrade cratedb-sqlalchemy
24+
pip install --upgrade sqlalchemy-cratedb
2525
```
2626

2727
## Documentation and help

backlog.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Backlog
2+
3+
## Iteration +1
4+
From dialect split-off.
5+
- Re-enable parameterized test cases.
6+
```
7+
tests.addTest(ParametrizedTestCase.parametrize(SqlAlchemyCompilerTest, param={"server_version_info": None}))
8+
tests.addTest(ParametrizedTestCase.parametrize(SqlAlchemyCompilerTest, param={"server_version_info": (4, 0, 12)}))
9+
tests.addTest(ParametrizedTestCase.parametrize(SqlAlchemyCompilerTest, param={"server_version_info": (4, 1, 10)}))
10+
```
11+
- Re-enable doctests.
12+

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ changelog = "https://github.com/crate-workbench/sqlalchemy-cratedb/blob/main/CHA
119119
documentation = "https://github.com/crate-workbench/sqlalchemy-cratedb"
120120
homepage = "https://github.com/crate-workbench/sqlalchemy-cratedb"
121121
repository = "https://github.com/crate-workbench/sqlalchemy-cratedb"
122+
[project.entry-points."sqlalchemy.dialects"]
123+
crate = "sqlalchemy_cratedb:CrateDialect"
122124

123125
[tool.black]
124126
line-length = 80

src/crate/client/sqlalchemy/__init__.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/crate/client/sqlalchemy/compat/__init__.py

Whitespace-only changes.

src/crate/client/test_util.py

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)