Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.14"]
python-version: ["3.10", "3.15"]

steps:
- uses: actions/checkout@v4
Expand All @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.14"]
python-version: ["3.10", "3.15"]

steps:
- uses: actions/checkout@v4
Expand All @@ -63,7 +63,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
tests-command: ["test", "test-sqlalchemy14"]

services:
Expand Down Expand Up @@ -98,6 +98,10 @@ jobs:
- name: Install dependencies
run: uv pip install -e ".[dev,lint,test]"

- name: Install SQLAlchemy 1.4
if: matrix.tests-command == 'test-sqlalchemy14'
run: uv pip install "sqlalchemy~=1.4"

- name: Run tests
run: make ${{ matrix.tests-command }}
env:
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [1.1.2]

29/10/2026

- Add Python 3.15 support and extend the CI and tox test matrices through 3.15.
- Fix SQLAlchemy 1.4 tox inheritance and preserve test environment dependencies.
- Install SQLAlchemy 1.4 in its CI jobs and document how to run the test matrix.
- Select psycopg2 explicitly in tests for compatibility with SQLAlchemy 2.1.
- Correct SQLAlchemy 1.4 constraint expectations and two type annotations.
- Refresh `uv.lock` without changing the declared dependency ranges.

## [1.1.1]

12/12/2025
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ install-tox-uv:
# Tests
test: ARGS?=--cov
test:
uv run pytest tests $(ARGS) -m 'not is_sqlalchemy_1_4' \
uv run --active --no-sync pytest tests $(ARGS) -m 'not is_sqlalchemy_1_4' \
--db-user=$(DB_TEST_USER) \
--db-password=$(DB_TEST_PASSWORD) \
--db-host=$(DB_TEST_HOST) \
--db-port=$(DB_TEST_PORT)


test-sqlalchemy14:
uv run pytest tests --no-cov $(ARGS) -m 'is_sqlalchemy_1_4' \
uv run --active --no-sync pytest tests --no-cov $(ARGS) -m 'is_sqlalchemy_1_4' \
--db-user=$(DB_TEST_USER) \
--db-password=$(DB_TEST_PASSWORD) \
--db-host=$(DB_TEST_HOST) \
Expand Down
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,48 @@ A tool for comparing database schemas using SQLAlchemy.

## Requirements

- Python 3.10 or higher (supports 3.10, 3.11, 3.12, 3.13, 3.14)
- Python 3.10 or higher (supports 3.10, 3.11, 3.12, 3.13, 3.14, 3.15)
- SQLAlchemy >= 1.4

## Authors

- [Fabrizio Romano](https://github.com/gianchub)
- [Mark McArdle](https://github.com/mmcardle)

## Development and testing

Install [uv](https://docs.astral.sh/uv/) and Make. The integration tests also require
PostgreSQL. With Docker running, start the test database and install the test tools:

```sh
make docker-test-db-run
uv sync --extra test --extra lint
make test
make lint
```

`make test` runs the SQLAlchemy 2.x suite and requires 100% coverage. The database
defaults are `localhost:5433`, user `postgres`, and password `postgres`. To use an
existing PostgreSQL server, set `DB_TEST_HOST`, `DB_TEST_PORT`, `DB_TEST_USER`, and
`DB_TEST_PASSWORD`. The database user must be able to create and drop databases.

Run the full Python 3.10–3.15 matrix, including separate SQLAlchemy 1.4 environments:

```sh
uvx --with tox-uv tox
```

To run just the Python 3.15 environments:

```sh
uvx --with tox-uv tox -e py315,py315-sqlalchemy14
```

The SQLAlchemy 1.4 environments run the tests marked `is_sqlalchemy_1_4`, which
check its version-specific reflection results. The other environments run the
remaining tests with SQLAlchemy 2.x. The Make test targets use the active virtual
environment without syncing it, so tox's Python and SQLAlchemy versions are preserved.

# Usage

## Quick Start
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "sqlalchemy-diff"
version = "1.1.1"
version = "1.1.2"
authors = [
{ name = "Fabrizio Romano", email = "gianchub@gmail.com" },
{ name = "Mark McArdle", email = "m.mc4rdle@gmail.com" },
Expand All @@ -16,6 +16,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"License :: OSI Approved :: Apache Software License",

# Indicate who your project is intended for
Expand Down
4 changes: 2 additions & 2 deletions src/sqlalchemydiff/inspection/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import abc
import inspect as stdlib_inspect
from typing import Any
from typing import Any, cast

from sqlalchemy import inspect
from sqlalchemy.engine import Engine
Expand All @@ -22,7 +22,7 @@ class BaseInspectorMeta(abc.ABCMeta):
register = {}

def __new__(mcs, name: str, bases: tuple, attrs: dict) -> type:
cls = super().__new__(mcs, name, bases, attrs)
cls = cast("type[BaseInspector]", super().__new__(mcs, name, bases, attrs))

if stdlib_inspect.isabstract(cls):
return cls
Expand Down
2 changes: 1 addition & 1 deletion src/sqlalchemydiff/inspection/inspectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def inspect(self, engine: Engine, ignore_specs: list[IgnoreSpecType] | None = No
def diff(self, one: dict, two: dict) -> dict:
return self._listdiff(one, two)

def _process_types(self, column_dict: dict, engine: Engine) -> None:
def _process_types(self, column_dict: list, engine: Engine) -> None:
"""Process the SQLAlchemy Column Type ``type_``.

Calls :meth:`sqlalchemy.sql.type_api.TypeEngine.compile` on
Expand Down
Loading
Loading