reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Python 3.14: state_auto_setters=True in rxconfig.py generates no set_<var> setters in the backend worker

Open masenf opened this issue 1 month ago • 4 comments

Severity: LOW, pre-existing (0.9.12, 0.10.0a1, 0.10.0a2); the option is deprecated, but packages that need generated setters (e.g. reflex-dynoselect) break on 3.14 (AttributeError: 'UserState' object has no attribute 'set_extra').

On 3.14 the worker imports the app module before anything calls get_config(), and reflex_base.config.get_state_auto_setters() returns the cached flag only when a Config was built in that process, else the env var, else False. 3.12 works; exporting REFLEX_STATE_AUTO_SETTERS=true fixes it. Server-less proof: importing the app module before get_config() yields no set_extra on 3.12 as well. macOS spawn behaviour untested.

Repro: thirdparty_a2/apps/cfgprobe + drivers/drive_cfgprobe.py; evidence thirdparty_a2/logs/cfgprobe-*.log, logs/tp_patterns-py314-dev.log; finding N-043 in FINDINGS.md.

masenf avatar Oct 07 '26 14:10 masenf

ENG-13151

linear-code[bot] avatar Oct 07 '26 14:10 linear-code[bot]

Hi @masenf, I’d like to work on this if it’s open to contributors

nilaychugh avatar Oct 10 '26 09:10 nilaychugh

@nilaychugh you may work on it

masenf avatar Oct 16 '26 16:10 masenf

hi @masenf i have raised a PR. can you please check

nilaychugh avatar Oct 18 '26 04:10 nilaychugh