make pydantic optional - #6786
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
Greptile SummaryThis PR makes pydantic an optional dependency for both
Confidence Score: 5/5Safe to merge — the change is additive, existing users of The change is mechanical (moving a dep to an extra) and well-tested. No behavioural logic is altered; the only coupling risk is the duplicate pydantic version pin between the Files Needing Attention: No files require special attention beyond the duplicate pydantic version pin in
|
| Filename | Overview |
|---|---|
| pyproject.toml | Adds pydantic optional-dependencies entry that delegates to reflex-base[pydantic]; the db extra retains a direct pydantic pin which duplicates the version constraint. |
| packages/reflex-base/pyproject.toml | Removes pydantic from core dependencies and adds it as an optional [pydantic] extra; straightforward and correct. |
| tests/units/test_optional_pydantic.py | New subprocess-based test that blocks pydantic via meta_path filter and sys.modules purge, then verifies core reflex import/state/component/serializer functionality still works. |
| uv.lock | Lockfile updated to reflect the new optional pydantic extras for both reflex and reflex-base; mechanically correct. |
| news/+pydantic-optional.breaking.md | Changelog entry documenting the breaking change for the reflex package. |
| packages/reflex-base/news/+pydantic-optional.breaking.md | Changelog entry documenting the breaking change for the reflex-base package. |
Reviews (5): Last reviewed commit: "Merge remote-tracking branch 'upstream/m..." | Re-trigger Greptile
masenf
left a comment
There was a problem hiding this comment.
interesting; i thought we had pydantic as optional for some time now, but i guess not...
I remember reading some git commits or changelogs which mentioned this as well - however somehow it currently isn't optional. I guess this is ready for review now. |
No description provided.