github litestar-org/litestar v2.0.0beta3

latest releases: v2.12.1, v2.12.0, v2.11.0...
pre-release14 months ago

Highlights

As of this release, Pydantic is an optional dependency.

What does that mean?
For you as an end user, not much; It is still supported in the same capacity as before, it's just not required anymore.
We have migrated all of our internals that previously relied on Pydantic (mainly for parsing and validation) to the amazing msgspec library, with Pydantic now being handled by an internal plugin.

The important thing is: Everything that has worked before with Pydantic will continue to work, and if you're not using Pydantic, but instead want to use attrs or pure msgspec, you won't have a required Pydantic dependency anymore.

Pydantic 2 support

Another change related to Pydantic is that this release adds support for Pydantic 2, which offers lots of improvements, new features and performance gains. Pydantic 1 is still fully supported and will be for the foreseeable future.

What's Changed

New features

  • DTO: Support piccolo ORM with PiccoloDTO by @Goldziher in #1896
  • DTO: Add include option to DTOConfig by @Goldziher in #1950
  • SQLAlchemyDTO: column/relationship type inference by @peterschutt in #1879
  • SQLAlchemy repository: New auto_commit, auto_refresh and auto_expunge options by @cofin in #1900
  • Allow customization of OpenAPIController.path from OpenAPIConfig by @jaykv in #1886
  • Include path name in ImproperlyConfiguredException message for missing param type by @euri10 in #1935

Bugfixes

  • Breaking SQLAlchemy repository: Fix spanner support by renaming the _sentinel column to sa_orm_sentinel by @cofin in #1933
  • SQLAlchemy repository: Fix audit columns created_at and updated_at defaulting to app startup time by @MatthewNewland in #1894
  • SQLAlchemyDTO: Fix handling of Sequence with defaults by @peterschutt in #1883
  • DTO / OpenAPI: Fix detection of required fields for Pydantic and msgspec by @abdulhaq-e in #1946
  • Allow JSON as redirect response by @cofin in #1908

Other changes

New Contributors

Full Changelog: v2.0.0beta2...v2.0.0beta3

Don't miss a new litestar release

NewReleases is sending notifications on new releases.