$ the-wire Β· showcase
SQLModel narrows SQLAlchemy type handling in Field, drops dataclass_transform shim
By RepoJournal Β· Filed Β· About FastAPI & Pydantic Β· Composed from the cited sources Β· methodology
Both of today's SQLModel changes land in the type layer where the library's runtime behavior and its annotations have historically disagreed, and both are staged to ship together.
π Fix SQLAlchemy type handling in `Field` tiangolo/sqlmodel
The fix narrows `sa_type` to SQLAlchemy type classes and instances instead of the broader positional Column argument type, preserving the core correction from the superseded work that first flagged the runtime/type-annotation mismatch. If you were annotating `Field(sa_type=...)` with a full Column, expect a narrower accepted type.
β»οΈ Replace the dataclass_transform shim with typing_extensions tiangolo/sqlmodel
The hand-rolled dataclass_transform shim is gone, replaced by the implementation in typing_extensions. That shifts the annotation behavior from SQLModel's own copy to the upstream one, which matters if your type checker resolves `dataclass_transform` semantics differently at the older edge of your supported Python range.
π Fix SQLAlchemy type handling in `Field` (#2095) tiangolo/sqlmodel
The type-handling fix is now on main as a squash of the reviewed PR, so it is no longer just a candidate commit for anyone tracking the branch. Both changes carry an AI disclaimer: made with Codex on `gpt-6-astra` and manually reviewed.