Skip to content

Bump sqlmodel to 0.0.47, sqladmin to 0.32.0 and alembic to 1.20.0 - #361

Merged
Uxío (Uxio0) merged 2 commits into
mainfrom
chore/bump-sqlmodel-sqladmin-alembic
Oct 6, 2026
Merged

Uxío (Uxio0) merged 2 commits into
mainfrom
chore/bump-sqlmodel-sqladmin-alembic

Conversation

@Uxio0

@Uxio0 Uxío (Uxio0) commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Make sure these boxes are checked! 📦✅

  • You ran ./run_tests.sh (not run locally, CI runs the tests)
  • You ran pre-commit run -a

What was wrong? 👾

Dependabot PR #358 fails the mypy step. sqlmodel 0.0.47 now types the model __init__ from the fields, so mypy checks every argument passed to the models.

Supersedes the sqlmodel, sqladmin and alembic part of #358.

How was it fixed? 🎯

  • Bump sqlmodel 0.0.42 -> 0.0.47. It also moves sqlalchemy 2.0.52 -> 2.0.54.
  • Bump sqladmin[full] 0.31.1 -> 0.32.0 and alembic 1.19.2 -> 1.20.0.
  • Type Abi.abi_json (and the get_abi/get_or_create_abi params) as Sequence[Mapping[str, Any]] | Mapping[str, Any]. list[dict] | dict does not accept the eth_typing ABI TypedDicts, Mapping does. This also removes the old cast in AbiService. The DB column is set by sa_column, so it does not change.
  • Remove unused type: ignore comments in TimeStampedSQLModel.
  • Remove the name argument from the Project test. The model and the table have no such column.
  • sqlmodel 0.0.45 makes UTCDateTime the default type for datetime fields. All datetime fields here set sa_type=DateTime(timezone=True), so no migration is needed.

SQLAlchemy 2.1

SQLAlchemy stays on 2.0.x: sqlmodel 0.0.47 requires SQLAlchemy>=2.0.14,<2.1.0. The What's New in SQLAlchemy 2.1 guide applies once sqlmodel allows 2.1. sqlmodel changes are in its release notes.

- sqlmodel 0.0.42 -> 0.0.47 (sqlalchemy 2.0.52 -> 2.0.54)
- sqladmin 0.31.1 -> 0.32.0
- alembic 1.19.2 -> 1.20.0

sqlmodel 0.0.47 types the model `__init__` from the fields. Fix the new
mypy errors:
- Cast `eth_typing.ABI` values to `list[dict]` when creating `Abi`.
- Remove unused `type: ignore` comments in `TimeStampedSQLModel`.
- Remove the `name` argument from the `Project` test, the model has no
  such field.
@Uxio0
Uxío (Uxio0) requested a review from a team as a code owner October 5, 2026 09:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T09:50:57.097914Z ef1f292 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

`list[dict] | dict` does not accept the `eth_typing` ABI TypedDicts, so
every caller needed a cast. `Sequence[Mapping[str, Any]] | Mapping[str, Any]`
accepts both plain dicts and the ABI TypedDicts. The DB column is set by
`sa_column`, so it does not change.
@Uxio0
Uxío (Uxio0) merged commit b5e595a into main Oct 6, 2026
8 checks passed
@Uxio0
Uxío (Uxio0) deleted the chore/bump-sqlmodel-sqladmin-alembic branch October 6, 2026 09:15
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants