github reflex-dev/reflex v0.8.15

2 days ago

Release Notes

Deprecations

rx.Base is deprecated.

Now that pydantic is an optional dependency, Reflex will no longer maintain a custom wrapper over BaseModel. You have a few options for replacing your rx.Base subclasses:

  • Continue to use pydantic -- minimal code/behavior changes
    • Ensure pydantic is part of your app dependency list
    • Extend from pydantic.BaseModel instead of rx.Base
  • Move to dataclasses.dataclass -- use the python stdlib
  • Move to typing.TypedDict -- uses a plain dict, but has extra type hints to make Var Operations work correctly

sqlmodel.SQLModel is now recommended over rx.Model.

  • Change your db models to inherit from sqlmodel.SQLModel instead of rx.Model.
  • Ensure the model has an explicit primary_key column. The default previously used to be:
    • id: int | None = sqlmodel.Field(default=None, primary_key=True)
  • Use sqlmodel.select(MyModel) instead of MyModel.select().

Python 3.14 is now supported! Python 3.10 deprecated D:

Python 3.14 got release on 10/07 and now Reflex supports it! It gives us very considerable performance improvements just by bumping.

In theory, you can use reflex with python free threaded, although we don't officially support it just yet. If you do run into issues with it, do report it!

Make pydantic, sqlmodel, and alembic optional

We will still install them by default until 0.9. You can ease into the transition by setting your reflex dependency to reflex[db]. You can uninstall them and reflex will continue to work assuming you don't use those in your app.

Upcast enum values to their enum type on event handlers

  • Upcast str or int to annotated Enum type in event handlers by @masenf in #5855

Performance Improvements

Bugfixes

  • make on load lambda work by @adhami3310 in #5856
  • Apply attribute access rules for Model or SQLModel by @masenf in #5875
  • Munge router_data["pathname"] consistently in event processing path by @masenf in #5873
  • ENG-7948: Fix hanging frontend and other reconnection woes by @masenf in #5884
  • check domain before redirecting in codespaces by @adhami3310 in #5886

Chores

Full Changelog: v0.8.14...v0.8.15

Don't miss a new reflex release

NewReleases is sending notifications on new releases.