-
Notifications
You must be signed in to change notification settings - Fork 1.5k
move pydantic, sqlmodel, alembic to optional dependencies #5438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
move pydantic, sqlmodel, alembic to optional dependencies #5438
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Major architectural change that makes database-related dependencies (Pydantic, SQLModel, Alembic) optional rather than required, improving modularity and reducing base installation size.
- Replaced Pydantic models with Python dataclasses in
reflex/config.py
andreflex/components/datadisplay/dataeditor.py
- Added conditional dependency loading in
reflex/model.py
with helpful error messages when database packages are missing - Moved database dependencies to optional [db] extra group in
pyproject.toml
- Fixed typing issues in
tests/integration/test_tailwind.py
to accommodate optional Pydantic - Added conditional Pydantic imports across multiple core files using importlib.util.find_spec
23 files reviewed, 4 comments
Edit PR Review Bot Settings | Greptile
CodSpeed Performance ReportMerging #5438 will degrade performances by 5.87%Comparing Summary
Benchmarks breakdown
|
Closes #5155 thanks, @adhami3310 |
keywords = ["web", "framework"] | ||
requires-python = ">=3.10,<4.0" | ||
dependencies = [ | ||
"alembic >=1.15.2,<2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, for now we are preserving "still install everything" till we reach 0.9.0
No description provided.