Repository navigation
Releases
Releases · sqlalchemy-continuum/sqlalchemy-continuum
2.0.0
What's changed
Breaking
- SQLAlchemy 1.4 support dropped (1.4 is end-of-life; its last release, 1.4.54, shipped in September 2024). The supported range is now
SQLAlchemy>=2.0.2,<2.2. The floor is 2.0.2 because version classes for joined-table inheritance fail to map on 2.0.0 and 2.0.1. Installs on SQLAlchemy 1.4 keep resolving to SQLAlchemy-Continuum 1.9.x. RelationshipBuilder.process_query()is removed.- The version fetchers'
previous_query()andnext_query()return aSelectinstead of aQuery; run them withsession.scalars().
Added
- SQLModel support. SQLModel table models can be versioned the same way as plain SQLAlchemy models, without adding a dependency on SQLModel (#271). See the SQLModel docs page.
Changed
- Version lookups (
previous,next,index,version_at(),all_versions()), version relationships,changed_entities,vacuum(),count_versions()andActivityPluginuse 2.0-styleselect()instead of the legacyQueryAPI, so SQLModel sessions no longer warn about them. Results are unchanged, and dynamic relationships such asversionsstill return aQuery. - CI tests SQLAlchemy 2.0 and 2.1 on Python 3.11 through 3.15, on SQLite, PostgreSQL (including native versioning) and MySQL.
Upgrading to 2.0
- Move your project to SQLAlchemy 2.0.2 or newer first; until then, pin
SQLAlchemy-Continuum<2. Version tables and the transaction table are unchanged, so no database migration is needed.
Full changelog: 1.9.0...2.0.0
1.9.0
What's changed
Breaking
- Python 3.10 support dropped (3.10 reached end-of-life on October 1, 2026). The minimum supported Python is now 3.11. Installs on Python 3.10 keep resolving to SQLAlchemy-Continuum 1.8.0.
Added
- Python 3.15 support. CI runs the test suite on Python 3.11 through 3.15 against SQLAlchemy 1.4, 2.0 and 2.1, on SQLite, PostgreSQL (including native versioning) and MySQL.
Changed
- Updated ruff to 0.17, which also formats the code examples in the documentation.
Full changelog: 1.8.0...1.9.0
1.8.0
What's changed
Added
- SQLAlchemy 2.1 support. The supported range is now
SQLAlchemy>=1.4.53,<2.2. SQLAlchemy 2.1 requires Python 3.11+, so installs on Python 3.10 keep resolving to SQLAlchemy 2.0.
Fixed
- The
Transactionmodel no longer picks up strayregistry,Baseanduser_clsclass attributes whenuser_clsis configured.Transaction.registryshadowed the declarative registry, and SQLAlchemy 2.1 raises anSAWarningfor it. - An exception during mapper configuration no longer silently disables version model building for every later configuration.
generic_relationship(used byActivityPlugin) no longer raisesValueErroron SQLAlchemy pre-release versions such as2.1.0rc2.count_versions()no longer flushes pending session changes on SQLAlchemy 2.1, which autoflushes textual SQL. The count matches SQLAlchemy 1.4 and 2.0.
Changed
- CI now tests SQLAlchemy 1.4, 2.0 and 2.1 as separate matrix legs, and the lint job runs the repository's pinned pre-commit hooks.
Upgrading to SQLAlchemy 2.1
- SQLAlchemy 2.1 maps bare
postgresql://URLs to psycopg 3 instead of psycopg2. Install psycopg 3 (pip install "psycopg[binary]", or plainpsycopgif the system libpq is available), or keep psycopg2 by using an explicitpostgresql+psycopg2://URL. Continuum, including native versioning, works with either driver.
Full changelog: 1.7.0...1.8.0
1.7.0
What's changed
Breaking
- Python 3.9 support dropped (3.9 reached end-of-life in October 2025). The minimum supported Python is now 3.10.
- Test/dev/docs dependencies moved to PEP 735
[dependency-groups]; package extras are now user-facing only (flask,flask-login,flask-sqlalchemy). If you installedSQLAlchemy-Continuum[test], install thetestdependency group instead.
Fixed
- Removed a leftover
breakpoint()call inTransactionChangesPlugin. - Fixed a latent
AttributeErrorinVersioningManager.append_association_operation. - Fixed broken user guide examples (
session.commit(article),sync_trigger(conn, ...),Transaction.query,create_sessionremoved in SQLAlchemy 2.0); documented examples are now exercised bytests/test_user_guide_examples.py.
Changed
- Codebase modernized to Python 3.10+ syntax (PEP 604 unions, built-in generics, plain dicts instead of
OrderedDict). - Documentation migrated from Sphinx to Zensical and now published at https://sqlalchemy-continuum.github.io/ (old URLs redirect).
- Releases are now published to PyPI via GitHub Actions trusted publishing.
- Expanded ruff lint rules (E/W/F/I/B/C4/UP); Dependabot, issue/PR templates, CONTRIBUTING.md and SECURITY.md added.
Full changelog: 1.6.0...1.7.0
1.6.0
What's New
- Add
version_at()class method on version objects for efficient retrieval of the version active at a specific transaction (#376) - Add
all_versions()class method withlinkoption to batch fetch all versions for an entity in a single query, avoiding N+1 queries by pre-populating previous/next navigation caches (#376) - Add automatic composite indexes on version tables for optimized version lookups (#376)
- Add
create_composite_indexconfiguration option to control composite index creation (#376)
Full Changelog: 1.5.2...1.6.0
1.5.2
- Added python 3.14 support by @josecsotomorales in #374
1.5.0
- Migrate to
ruff <https://docs.astral.sh/ruff/>_ for code linting and formatting, replacing flake8 with a faster Rust-based tool. (#364) - Add Python 3.13 support. (#364)
- Drop Python 3.8 support. (#364)
- Add comprehensive pre-commit hooks configuration with ruff, pyupgrade, and code quality checks
- Add
pyupgrade <https://github.com/asottile/pyupgrade>_ integration to automatically modernize Python 3.9+ syntax - Enhance tox configuration with matrix testing for multiple Python (3.9-3.13) and SQLAlchemy versions (1.4, 2.x)
- Add dedicated ruff testing environment in tox for consistent code quality checks
- Modernize codebase with Python 3.9+ idioms and formatting improvements
- Migrate to modern Python packaging with pyproject.toml
- Remove SQLAlchemy-i18n support
- Fix SQLAlchemy 2.0 deprecation warnings: replace Query.get() with Session.get() for improved compatibility
- Fix datetime.utcnow() deprecation warnings with cross-version compatibility function supporting Python 3.9-3.13+
- Eliminate cartesian product warnings in many-to-many relationship queries with non-versioned classes
- Improve code quality by modernizing mixed string formatting patterns to f-strings