Name every method decorated above @rx.event in the deprecation warning
Merged
MA
3d ago+225+225+012345678901234567890123456789-9-9-0123456789
Closes #7840
The deprecation warning for decorators placed above @rx.event was deduplicated by feature name plus the class's source location, so in a state with several such methods only the first one was named, and users fixing the warning found the rest one restart at a time.
- Deduplication is now keyed per method (feature, class module, class qualname, method name), so each affected method is named once, and repeated setup of the same class in one process stays quiet.
_item_is_event_handlerbecomes a classmethod so it can build that key; its only callers are the twocls._item_is_event_handler(...)call sites inreflex/state.py.- The warning text, version fields and the call-time warning are unchanged, and no
reflex-baseAPI changes.
Tests: a unit test checks that two wrapped methods in one class both warn, and that re-running the check for an already-warned method doesn't warn again while a new method name does (fails on main). pytest tests/units/test_state.py: 324 passed; ruff check/format clean. A bugfix news fragment is included.
All Submissions:
- Have you followed the guidelines stated in CONTRIBUTING.md file?
- Have you checked to ensure there aren't any other open Pull Requests for the desired changed?
Type of change
- Bug fix (non-breaking change which fixes an issue)