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 11 commits into
Conversation
Merging this PR will improve performance by 4.72%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | test_evaluate_page[_complicated_page] |
27.3 ms | 25.9 ms | +5.49% |
| ⚡ | Simulation | test_evaluate_page_with_hooks[_complicated_page] |
27.6 ms | 26.1 ms | +5.44% |
| ⚡ | Simulation | test_evaluate_page[_stateful_page] |
4.5 ms | 4.3 ms | +4.81% |
| ⚡ | Simulation | test_evaluate_page_with_hooks[_stateful_page] |
4.7 ms | 4.5 ms | +4.45% |
| ⚡ | Simulation | test_console_log |
373.7 µs | 361.3 µs | +3.44% |
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 (79217a1) with main (f35b493)
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 support and ports native and cached lazy-loading behavior.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/reflex-base/src/reflex_base/utils/lazy_loader.py | Adds validated native lazy-import bindings for Python 3.15 and caches attributes resolved by the classic loader. |
| packages/reflex-base/src/reflex_base/utils/compat.py | Introduces a public-sentinel-derived replacement for the private dataclasses missing-value type removed in Python 3.15. |
| packages/reflex-base/src/reflex_base/utils/types.py | Normalizes PEP 728 NoExtraItems sentinels when validating TypedDict values. |
| packages/reflex-base/src/reflex_base/components/component.py | Migrates component-field annotations from the removed private dataclasses type to the compatibility alias. |
| packages/reflex-base/src/reflex_base/vars/base.py | Migrates state-field annotations to the Python 3.15-compatible missing-value type alias. |
| pyproject.toml | Uses pure-Python psycopg on Python 3.15 where psycopg-binary wheels are not yet available. |
| .github/workflows/unit_tests.yml | Extends the cross-platform unit-test matrix to Python 3.15. |
| .github/workflows/integration_app_harness.yml | Extends integration and Playwright matrices to Python 3.15. |
Reviews (10): Last reviewed commit: "Merge branch 'main' into use-lazy-loader..." | 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