Skip to content

Conversation

adhami3310
Copy link
Member

No description provided.

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 and reflex/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

Copy link

codspeed-hq bot commented Jun 12, 2025

CodSpeed Performance Report

Merging #5438 will degrade performances by 5.87%

Comparing move-pydantic,-sqlmodel,-alembic-to-optional-dependencies (bff5a23) with main (40cc4ef)

Summary

❌ 1 (👁 1) regressions
✅ 7 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
👁 test_evaluate_page[_stateful_page] 6.1 ms 6.4 ms -5.87%

@benedikt-bartscher
Copy link
Contributor

Closes #5155

thanks, @adhami3310

This was linked to issues Jun 12, 2025
keywords = ["web", "framework"]
requires-python = ">=3.10,<4.0"
dependencies = [
"alembic >=1.15.2,<2.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still needed?

Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make sqlmodel dependency optional Upgrade to Pydantic 2.0
3 participants