port lazy_loader perf and native PEP810 + add python3.15 support - #6930
port lazy_loader perf and native PEP810 + add python3.15 support#6930benedikt-bartscher wants to merge 8 commits into
Conversation
Merging this PR will improve performance by 4.63%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | test_evaluate_page[_complicated_page] |
27.2 ms | 25.9 ms | +5.17% |
| ⚡ | Simulation | test_evaluate_page_with_hooks[_complicated_page] |
27.4 ms | 26.1 ms | +5.04% |
| ⚡ | Simulation | test_evaluate_page[_stateful_page] |
4.5 ms | 4.3 ms | +4.83% |
| ⚡ | Simulation | test_evaluate_page_with_hooks[_stateful_page] |
4.7 ms | 4.5 ms | +4.55% |
| ⚡ | Simulation | test_console_log |
372.5 µs | 359.7 µs | +3.58% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing benedikt-bartscher:use-lazy-loader-branch (3f63842) with main (d86f167)
Footnotes
-
8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Greptile SummaryThe PR adds Python 3.15 CI coverage and compatibility while optimizing lazy imports.
Confidence Score: 5/5The PR appears safe to merge because no blocking follow-up-eligible failure or outstanding prior finding was established. No blocking failure remains in the review’s eligible finding set.
|
| Filename | Overview |
|---|---|
| packages/reflex-base/src/reflex_base/utils/lazy_loader.py | Adds native Python 3.15 lazy-import bindings and caches attributes resolved through the legacy loader; no follow-up-eligible finding was established. |
| packages/reflex-base/src/reflex_base/utils/compat.py | Introduces a public compatibility alias for the dataclasses missing-value type removed from Python 3.15. |
| packages/reflex-base/src/reflex_base/utils/types.py | Normalizes PEP 728 NoExtraItems sentinels before validating TypedDict extra values. |
| pyproject.toml | Selects pure-Python psycopg on Python 3.15 because binary wheels are unavailable. |
| uv.lock | Re-resolves dependency markers for Python 3.15 and records the version-specific psycopg selections. |
| tests/units/test_state.py | Marks the dill fallback serialization test as an expected Python 3.15 failure pending upstream compatibility. |
| tests/integration/test_dynamic_components.py | Skips the Redis dynamic-components scenario affected by the known dill incompatibility on Python 3.15. |
Reviews (7): Last reviewed commit: "revert" | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed across 17 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
scientific-python/lazy-loader#172
scientific-python/lazy-loader#173