diff --git a/pyproject.toml b/pyproject.toml index c8c748c..c53ec82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,7 +84,7 @@ dynamic = [ ] dependencies = [ 'backports.zoneinfo<1; python_version < "3.9"', - "crate", + "crate @ git+https://github.com/crate/crate-python.git@no-sqlalchemy", "geojson<4,>=2.5", 'importlib-resources; python_version < "3.9"', "sqlalchemy<2.1,>=1", @@ -120,7 +120,7 @@ documentation = "https://github.com/crate-workbench/sqlalchemy-cratedb" homepage = "https://github.com/crate-workbench/sqlalchemy-cratedb" repository = "https://github.com/crate-workbench/sqlalchemy-cratedb" [project.entry-points."sqlalchemy.dialects"] -crate = "sqlalchemy_cratedb:CrateDialect" +crate = "sqlalchemy_cratedb.dialect:dialect" [tool.black] line-length = 80 diff --git a/src/sqlalchemy_cratedb/dialect.py b/src/sqlalchemy_cratedb/dialect.py index 2ed0953..ed901f9 100644 --- a/src/sqlalchemy_cratedb/dialect.py +++ b/src/sqlalchemy_cratedb/dialect.py @@ -367,3 +367,6 @@ def has_ilike_operator(self): class DateTrunc(functions.GenericFunction): name = "date_trunc" type = sqltypes.TIMESTAMP + + +dialect = CrateDialect diff --git a/tests/__init__.py b/tests/__init__.py index 3584363..874c043 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -2,7 +2,7 @@ from sqlalchemy_cratedb.compat.api13 import monkeypatch_amend_select_sa14, monkeypatch_add_connectionfairy_driver_connection from sqlalchemy_cratedb.sa_version import SA_1_4, SA_VERSION -from crate.client.test_util import ParametrizedTestCase +from .util import ParametrizedTestCase # `sql.select()` of SQLAlchemy 1.3 uses old calling semantics, # but the test cases already need the modern ones.