Skip to content

chore: upgrade dependencies, pin sqlalchemy below 2.1 - #43

Merged
lesnik512 merged 1 commit into
mainfrom
chore/upgrade-deps
Sep 27, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
chore/upgrade-deps

Conversation

@lesnik512

@lesnik512 lesnik512 commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Upgrades all locked dependencies (`uv lock --upgrade`) and adapts to the breaking changes.

  • modern-di 2 -> 3 (modern-di-litestar 2 -> 3): `cache_settings=` is renamed to `cache=`.
  • `psycopg2` -> `psycopg`, and Alembic now names the driver explicitly (`postgresql+psycopg`), so migrations don't depend on SQLAlchemy's default Postgres driver, which changes in 2.1.
  • ruff 0.16: ignore `CPY001` (copyright header).
  • ty 0.0.84: drop a `ty: ignore` that is no longer needed.

Why sqlalchemy is pinned below 2.1

On SQLAlchemy 2.1 the asyncpg adapter no longer includes the `DETAIL: Key (...)=(...) already exists.` line in `exc.orig.args`. advanced-alchemy 1.11.0 (latest) detects duplicate keys with regexes that need that line, so a unique violation surfaces as a generic `IntegrityError` instead of `DuplicateKeyError` and the API returns 500 instead of 400. `tests/test_cards.py::test_create_cards` catches this.

Upstream: litestar-org/advanced-alchemy#803. Remove the pin once a fixed release is out.

@lesnik512
lesnik512 merged commit da8ad8e into main Sep 27, 2026
2 checks passed
@lesnik512
lesnik512 deleted the chore/upgrade-deps branch September 27, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant