Repository navigation
Skip reflex_components_* frames in deprecation warning locations - #7811
Conversation
Deprecation warnings name the first frame outside the framework, but the exclude roots did not cover the component packages split out of reflex, so `on_change=client_state.set_value` reported a file inside `site-packages/reflex_components_*` instead of the app's line. Add every importable `reflex_components_*` package root to the exclude roots, computed once with the existing roots. Found in the reflex 0.11.0a1 pre-release testing (FINDING-028). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Dxjadq3qkhKnqZR2b9WBFi
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Dxjadq3qkhKnqZR2b9WBFi
[Low impact] The PR appears safe to merge; no actionable issues remain. SummaryDeprecation warnings now skip installed
Reviews (4) · Last reviewed commit: "Skip reflex_components_* frames in depre..." · Reviewed by Greptile |
Merging this PR will degrade performance by 4.98%1 warning
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing |
|
CodSpeed is red here ( Generated by Claude Code |
Deprecation warnings name the first frame outside the framework, but the exclude roots did not cover the component packages split out of reflex, so `on_change=client_state.set_value` reported a file inside `site-packages/reflex_components_*` instead of the app's line. Add every importable `reflex_components_*` package root to the exclude roots, computed once with the existing roots. Found in the reflex 0.11.0a1 pre-release testing (FINDING-028). Claude-Session: https://claude.ai/code/session_01Dxjadq3qkhKnqZR2b9WBFi Co-authored-by: Claude <[email protected]> (cherry picked from commit 8c2cb7d)
…the train Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Dxjadq3qkhKnqZR2b9WBFi
Type of change
Description
Found in the reflex 0.11.0a1 pre-release testing (FINDING-028).
A deprecation warning names the first stack frame outside the framework.
_exclude_paths_from_frame_infoinreflex_base/utils/log.pyexcluded reflex, reflex_base, click, socketio, granian, typing_extensions and the stdlib, but not the component packages split out of reflex. Sorx.input(on_change=client_state.set_value)reported a file insidereflex_components_*(for example.../site-packages/reflex_components_core/el/elements/forms.py:857) instead of the app's line.This PR adds the root of every importable
reflex_components_*package to the exclude roots. The names come frompkgutil.iter_modules(), which lists thesys.pathentries and costs about 10 ms. They are resolved through the samefind_specpath as the stdlib roots, inside the existing@oncefunction, so the work happens once per process.Checked end to end: a script calling
rx.input(on_change=cs.set_value)reportsreflex-components-radix/src/reflex_components_radix/...on main and(user_app.py:5)with this change.Changes To Core Features:
New test:
tests/units/reflex_base/utils/test_log.py::test_component_packages_are_framework_code. It fails on main and passes with this change.tests/units/reflex_base/utilsandtests/units/utilspass, and ruff, ruff format, pyright and pre-commit are clean on the changed files.Generated by Claude Code