Skip to content

0.22.1

Choose a tag to compare

@igorbenav igorbenav released this 27 May 06:26
· 7 commits to main since this release
2dc438b

FastCRUD 0.22.1 Release Notes

Important

Python 3.14 Compatibility: This patch fixes a startup crash that prevented fastcrud from being imported on Python 3.14. All users on 3.14 should upgrade.

FastCRUD 0.22.1 is a single-fix patch release addressing a PEP 649 annotation-evaluation collision in the internal Filter model that crashed any FastAPI app at module load under Python 3.14.

Fixed

Python 3.14 PEP 649 Startup Crash

Under Python 3.14, importing fastcrud crashed with:

TypeError: unsupported operand type(s) for |: 'property' and 'NoneType'
Unable to evaluate type annotation 'type | None'.

Root cause: the internal Filter Pydantic model declares both field annotations like wrap_type: type | None and a @computed_field def type(self) method. On Python ≤ 3.13, annotations are evaluated at class-definition time — before the computed field is installed — so type resolves to the builtin. Under PEP 649, annotations are evaluated lazily against the class namespace, where type now resolves to the property descriptor that @computed_field installed. <property> | <NoneType> then raises TypeError.

Fix: qualify the four affected annotations in Filter as builtins.type. No public API change, no rename of the type computed field, and behavior is unchanged on Python 3.10/3.11/3.12/3.13.

Reported and fixed by @mhills88 (#327).


What's Changed

  • Fix Python 3.14 PEP 649 startup crash: qualify Filter type annotations as builtins.type by @mhills88 in #327
  • Mirror PEP 649 regression test under tests/sqlmodel/core/ by @igorbenav in #328

New Contributors

Full Changelog: v0.22.0...v0.22.1