Skip to content

port lazy_loader perf and native PEP810 + add python3.15 support - #6930

Open
benedikt-bartscher wants to merge 13 commits into
reflex-dev:mainfrom
benedikt-bartscher:use-lazy-loader-branch
Open

port lazy_loader perf and native PEP810 + add python3.15 support#6930
benedikt-bartscher wants to merge 13 commits into
reflex-dev:mainfrom
benedikt-bartscher:use-lazy-loader-branch

Conversation

@benedikt-bartscher

@benedikt-bartscher benedikt-bartscher commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

@codspeed-hq

codspeed-hq Bot commented Aug 22, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 5.22%

⚡ 4 improved benchmarks
✅ 28 untouched benchmarks
⏩ 8 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation test_evaluate_page[_complicated_page] 26.7 ms 25.2 ms +6%
Simulation test_evaluate_page_with_hooks[_complicated_page] 26.9 ms 25.4 ms +5.9%
Simulation test_evaluate_page[_stateful_page] 4.6 ms 4.4 ms +4.58%
Simulation test_evaluate_page_with_hooks[_stateful_page] 4.8 ms 4.6 ms +4.4%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing benedikt-bartscher:use-lazy-loader-branch (bd08a51) with main (dd96aea)

Open in CodSpeed

Footnotes

  1. 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-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds Python 3.15 support and introduces native PEP 810 lazy imports while optimizing classic lazy attribute resolution.

  • Adds Python 3.15 to unit and integration CI matrices.
  • Introduces a Python 3.15-compatible dataclass missing-value type and TypedDict sentinel handling.
  • Uses native lazy imports on Python 3.15 and caches resolved attributes on older runtimes.
  • Adjusts development dependencies and test expectations for current Python 3.15 package compatibility.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains in the eligible review scope.

No blocking failure remains.

Important Files Changed

Filename Overview
packages/reflex-base/src/reflex_base/utils/lazy_loader.py Adds native PEP 810 bindings and package-level caching for resolved lazy attributes.
packages/reflex-base/src/reflex_base/utils/compat.py Provides a public compatibility alias for the dataclass missing-value sentinel type.
packages/reflex-base/src/reflex_base/utils/types.py Normalizes Python and typing-extensions NoExtraItems sentinels during TypedDict validation.
pyproject.toml Selects pure-Python psycopg on Python 3.15 while retaining the binary extra on older versions.
uv.lock Regenerates Python-version resolution partitions and psycopg markers for Python 3.15.
.github/workflows/unit_tests.yml Extends Linux, Windows, and macOS unit-test matrices to Python 3.15.

Reviews (12): Last reviewed commit: "Merge branch 'main' into use-lazy-loader..." | Re-trigger Greptile

@benedikt-bartscher benedikt-bartscher changed the title port lazy_loader performance improvements and native PEP810 port lazy_loader perf and native PEP810 + add python3.15 support Aug 22, 2026
@benedikt-bartscher
benedikt-bartscher marked this pull request as ready for review August 22, 2026 14:40
@benedikt-bartscher
benedikt-bartscher requested a review from a team as a code owner August 22, 2026 14:40

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 17 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread .github/workflows/unit_tests.yml
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.

1 participant