diff --git a/duckdb_engine/__init__.py b/duckdb_engine/__init__.py index 356b3084..344b995b 100644 --- a/duckdb_engine/__init__.py +++ b/duckdb_engine/__init__.py @@ -16,7 +16,6 @@ import duckdb import sqlalchemy -from packaging.version import Version from sqlalchemy import pool, text from sqlalchemy import types as sqltypes from sqlalchemy import util @@ -39,9 +38,9 @@ from .datatypes import ISCHEMA_NAMES, register_extension_types __version__ = "0.9.5" -sqlalchemy_version = Version(sqlalchemy.__version__) +sqlalchemy_version = sqlalchemy.__version__ duckdb_version: str = duckdb.__version__ # type: ignore[attr-defined] -supports_attach: bool = Version(duckdb_version) >= Version("0.7.0") +supports_attach: bool = duckdb_version >= "0.7.0" if TYPE_CHECKING: from sqlalchemy.base import Connection @@ -52,7 +51,7 @@ class DBAPI: - paramstyle = "numeric_dollar" if sqlalchemy_version >= Version("2.0.0") else "qmark" + paramstyle = "numeric_dollar" if sqlalchemy_version >= "2.0.0" else "qmark" apilevel = duckdb.apilevel threadsafety = duckdb.threadsafety