Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0975a73
Remove CrateDB service from CI workflows and update test matrix for C…
bgunebakan Oct 13, 2026
40b1aa8
Remove CrateDB version variable and delete unused integration and set…
bgunebakan Oct 13, 2026
7a15cf6
Add network marker
bgunebakan Oct 13, 2026
e752d3d
Remove unused tests and update connection test for network marking
bgunebakan Oct 13, 2026
915cdd3
Remove network marker from pytest configuration and connection test
bgunebakan Oct 13, 2026
98814c4
Refactor test fixtures to include CrateDB version and asset path conf…
bgunebakan Oct 13, 2026
b743a1c
Fix error trace assertion for CrateDB 5.x compatibility
bgunebakan Oct 13, 2026
a854359
Add minimum server version check for UUID type in tests
bgunebakan Oct 13, 2026
2568651
Add pytest fixture to provide CrateDB engine for query caching tests
bgunebakan Oct 13, 2026
1bb7921
Update connection url in documentation
bgunebakan Oct 13, 2026
153b5fd
Update CrateDB version to 'latest' in CI
bgunebakan Oct 13, 2026
7b74207
Update Docs
bgunebakan Oct 13, 2026
fab8c0d
refactor integration.py file to test_documentation.py
bgunebakan Oct 14, 2026
c14751f
Update CLAUDE.md to reflect changes in testing commands and environme…
bgunebakan Oct 14, 2026
26be46d
Update SQLAlchemy version constraints in workflows and dependencies
bgunebakan Oct 14, 2026
d38d465
Remove compatibility support for SQLAlchemy 1.3 and related deprecati…
bgunebakan Oct 14, 2026
f69f858
Remove skiptest decorators for v1.3
bgunebakan Oct 14, 2026
ac6f382
Remove compatibility checks and imports in tests
bgunebakan Oct 14, 2026
4784d24
Update docs for removing support and compability checks
bgunebakan Oct 14, 2026
ee79bd4
Add deprecation warning for SQLAlchemy 1.4 and update tests
bgunebakan Oct 14, 2026
594023b
Update changelog and documentation for SQLAlchemy 1.4 support; drop S…
bgunebakan Oct 14, 2026
89d1247
Fix warning category from DeprecationWarning to FutureWarning
bgunebakan Oct 14, 2026
24e6e00
Update SQLALCHEMY_VERSION to <2.2 and enhance warning test description
bgunebakan Oct 14, 2026
4387fa9
Merge branch 'main' into bilal/303-ci-test-against-real-cratedb-versions
bgunebakan Oct 16, 2026
dbac073
Merge branch 'bilal/303-ci-test-against-real-cratedb-versions' into b…
bgunebakan Oct 16, 2026
2d4b481
Merge branch 'main' into bilal/303-drop-sqlalchemy-1.3
bgunebakan Oct 19, 2026
3a9a012
Merge branch 'main' into bilal/303-drop-sqlalchemy-1.3
bgunebakan Oct 19, 2026
d5e9fbe
Update changelog to reflect breaking changes and support drop for SQL…
bgunebakan Oct 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
fail-fast: false
matrix:
language: [ python ]
sqla-version: ['<1.4', '<1.5', '<2.1']
sqla-version: ['<1.5', '<2.1', '<2.2']

steps:
- name: Acquire sources
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,9 @@ jobs:
os: ['ubuntu-22.04']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
cratedb-version: ['latest']
sqla-version: ['<1.4', '<1.5', '<2.1', '<2.2']
sqla-version: ['<1.5', '<2.1', '<2.2']
pip-allow-prerelease: ['false']

exclude:
# SQLAlchemy 1.3 is not supported on Python 3.12 and higher.
- python-version: '3.12'
sqla-version: '<1.4'
- python-version: '3.13'
sqla-version: '<1.4'
- python-version: '3.14'
sqla-version: '<1.4'

include:
- os: 'ubuntu-22.04'
python-version: '3.14'
Expand Down
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## Unreleased
- BREAKING: Dropped support for SQLAlchemy 1.3, which is EOL since 2021.
The minimum supported version is SQLAlchemy 1.4
- Deprecated support for SQLAlchemy 1.4, which is EOL. Importing the dialect
with SQLAlchemy 1.4 emits a `FutureWarning`. A future release will
require SQLAlchemy 2.0

## 2026/10/19 0.44.0
- Types: Fixed `sa.Time` raising `Cannot find data type: time`. `Time` columns
are created as `STRING` and hold values in ISO 8601 format.
Expand Down
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Project Overview

`sqlalchemy-cratedb` is a SQLAlchemy dialect for CrateDB, a distributed SQL database. It supports SQLAlchemy 1.3 through 2.1 (with ongoing 2.1 compatibility work on the current branch).
`sqlalchemy-cratedb` is a SQLAlchemy dialect for CrateDB, a distributed SQL database. It supports SQLAlchemy 1.4 through 2.1.

## Development Setup

Expand Down Expand Up @@ -44,7 +44,7 @@ Select the CrateDB version with `CRATEDB_VERSION`, an image tag (default: `lates
- **`compiler.py`** — SQL/DDL compilation: `CrateDDLCompiler`, `CrateTypeCompiler`, `CrateIdentifierPreparer`, and `rewrite_update()` for partial object updates
- **`predicate.py`** — `match()` predicate for full-text search
- **`sa_version.py`** — Version detection; exports `SA_VERSION`, `SA_1_4`, `SA_2_0`, `SA_2_1` constants
- **`compat/`** — Multi-version SQLAlchemy compatibility: `core10.py`, `core14.py`, `core20.py`, `core21.py`, `api13.py`
- **`compat/`** — Multi-version SQLAlchemy compatibility: `core14.py` (SQLAlchemy 1.4), `core20.py` (2.0 and 2.1)
- **`type/`** — Custom CrateDB types: `ObjectType` (JSON objects), `ObjectArray`, `FloatVector`, `Geopoint`, `Geoshape`
- **`support/`** — Integrations and polyfills: `pandas.py` (bulk insert), `polyfill.py` (refresh-after-DML, uniqueness, autoincrement timestamps), `util.py`

Expand All @@ -65,7 +65,7 @@ Tests in `tests/` follow two patterns:
- `tests/test_documentation.py`: runs the doctests in `docs/*.rst` against the same CrateDB instance

The `conftest.py` provides:
- `cratedb_service`: session-scoped, starts one CrateDB container (`crate:$CRATEDB_VERSION`, or `crate/crate:nightly` for `nightly`) with `tests/assets` mounted at `/assets`
- `cratedb_service`: session-scoped, starts one CrateDB container (`crate/crate:$CRATEDB_VERSION`) with `tests/assets` mounted at `/assets`
- `crate_host`: the container's `host:port`, used by the doctests
- `offline_default_server`: autouse, answers the driver's connect-time server version probe for the default address `localhost:4200`.
## Code Style
Expand Down
2 changes: 1 addition & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# set -x

# Default variables.
SQLALCHEMY_VERSION=${SQLALCHEMY_VERSION:-<2.1}
SQLALCHEMY_VERSION=${SQLALCHEMY_VERSION:-<2.2}


function print_header() {
Expand Down
5 changes: 1 addition & 4 deletions docs/advanced-querying.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ Import the relevant symbols:

>>> import sqlalchemy as sa
>>> from sqlalchemy.orm import sessionmaker
>>> try:
... from sqlalchemy.orm import declarative_base
... except ImportError:
... from sqlalchemy.ext.declarative import declarative_base
>>> from sqlalchemy.orm import declarative_base
>>> from uuid import uuid4

Establish a connection to the database, see also :ref:`sa:engines_toplevel`
Expand Down
5 changes: 1 addition & 4 deletions docs/crud.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ Import the relevant symbols:
>>> from datetime import datetime
>>> from sqlalchemy import delete, func, text
>>> from sqlalchemy.orm import sessionmaker
>>> try:
... from sqlalchemy.orm import declarative_base
... except ImportError:
... from sqlalchemy.ext.declarative import declarative_base
>>> from sqlalchemy.orm import declarative_base
>>> from sqlalchemy_cratedb import ObjectArray

Establish a connection to the database, see also :ref:`sa:engines_toplevel`
Expand Down
5 changes: 1 addition & 4 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ Import the relevant symbols:

>>> import sqlalchemy as sa
>>> from sqlalchemy.orm import sessionmaker
>>> try:
... from sqlalchemy.orm import declarative_base
... except ImportError:
... from sqlalchemy.ext.declarative import declarative_base
>>> from sqlalchemy.orm import declarative_base

Establish a connection to the database, see also :ref:`sa:engines_toplevel`
and :ref:`connect`:
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ About
*****

The :ref:`CrateDB dialect <using-sqlalchemy>` for `SQLAlchemy`_ provides adapters
for `CrateDB`_ and SQLAlchemy. The supported versions are 1.3, 1.4, and 2.0.
for `CrateDB`_ and SQLAlchemy. The supported versions are 1.4, 2.0, and 2.1.
The package is available from `PyPI`_ at `sqlalchemy-cratedb`_.

The connector can be used to connect to both `CrateDB`_ and `CrateDB
Expand Down
2 changes: 1 addition & 1 deletion docs/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The ``sqlalchemy-cratedb`` package provides the :ref:`SQLAlchemy dialect
installation time, and can be used without further configuration.

The CrateDB SQLAlchemy dialect is validated to work with SQLAlchemy versions
``1.3``, ``1.4``, and ``2.0``.
``1.4``, ``2.0``, and ``2.1``.

.. SEEALSO::

Expand Down
5 changes: 1 addition & 4 deletions docs/working-with-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ Import the relevant symbols:
>>> from sqlalchemy import delete, func, text
>>> from sqlalchemy.orm import sessionmaker
>>> from sqlalchemy.sql import operators
>>> try:
... from sqlalchemy.orm import declarative_base
... except ImportError:
... from sqlalchemy.ext.declarative import declarative_base
>>> from sqlalchemy.orm import declarative_base
>>> from uuid import uuid4

Establish a connection to the database, see also :ref:`sa:engines_toplevel`
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ dynamic = [
dependencies = [
"crate>=2.2.1,<3",
"geojson>=2.5,<4",
"sqlalchemy>=1,<2.2",
"sqlalchemy>=1.4,<2.2",
"verlib2<26.3",
]
optional-dependencies.all = [
Expand Down
23 changes: 8 additions & 15 deletions src/sqlalchemy_cratedb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@
# with Crate these terms will supersede the license and you may use the
# software solely pursuant to the terms of the relevant commercial agreement.

from .compat.api13 import monkeypatch_add_exec_driver_sql
from .dialect import dialect
from .predicate import match
from .sa_version import SA_1_4, SA_VERSION
from .sa_version import SA_1_4, SA_2_0, SA_VERSION # noqa: F401 # Re-exported for compatibility.
from .support import insert_bulk
from .type.array import ObjectArray
from .type.geo import Geopoint, Geoshape
Expand All @@ -31,28 +30,22 @@
from .type.unresolved import UnresolvedType
from .type.vector import FloatVector, knn_match

if SA_VERSION < SA_1_4:
if SA_VERSION < SA_2_0:
import textwrap
import warnings

# SQLAlchemy 1.3 is effectively EOL.
SA13_DEPRECATION_WARNING = textwrap.dedent(
SA14_DEPRECATION_WARNING = textwrap.dedent(
"""
WARNING: SQLAlchemy 1.3 is effectively EOL.
WARNING: SQLAlchemy 1.4 is EOL.

SQLAlchemy 1.3 is EOL since 2023-01-27.
Future versions of the CrateDB SQLAlchemy dialect will drop support for SQLAlchemy 1.3.
It is recommended that you transition to using SQLAlchemy 1.4 or 2.0:
SQLAlchemy 1.4 is no longer maintained, its last release was 1.4.54 in September 2024.
Future versions of the CrateDB SQLAlchemy dialect will drop support for SQLAlchemy 1.4.
It is recommended that you transition to using SQLAlchemy 2.0 or later:

- https://docs.sqlalchemy.org/en/14/changelog/migration_14.html
- https://docs.sqlalchemy.org/en/20/changelog/migration_20.html
""".lstrip("\n")
)
warnings.warn(message=SA13_DEPRECATION_WARNING, category=DeprecationWarning, stacklevel=2)

# SQLAlchemy 1.3 does not have the `exec_driver_sql` method, so add it.
monkeypatch_add_exec_driver_sql()

warnings.warn(message=SA14_DEPRECATION_WARNING, category=FutureWarning, stacklevel=2)

try:
from importlib.metadata import PackageNotFoundError, version
Expand Down
152 changes: 0 additions & 152 deletions src/sqlalchemy_cratedb/compat/api13.py

This file was deleted.

Loading
Loading