Re-enable dill-based state fallback pickling on Python 3.15 once dill#753 is released
Author: masenfCreated Sep 14, 2026Updated Sep 14, 2026
Follow-up to https://github.com/reflex-dev/reflex/pull/6930 (Python 3.15 support).
dill <= 0.4.1 cannot serialize functions on Python 3.15 (it uses code.co_lnotab, removed in 3.15): https://github.com/uqfoundation/dill/issues/753. As of today, 0.4.1 is still the latest release on PyPI, so #6930 marked the affected tests instead of fixing anything in Reflex:
tests/units/test_state.py::test_fallback_pickle—@pytest.mark.xfail(sys.version_info >= (3, 15), raises=StateSerializationError)tests/integration/test_dynamic_components.py::test_dynamic_components—@pytest.mark.skipif(sys.version_info >= (3, 15) and bool(os.environ.get("REFLEX_REDIS_URL")))
Note this is not test-only fallout: on Python 3.15 with redis state, any state that needs the dill fallback (e.g. a Callable field, dynamic components) fails to serialize at runtime.
When a dill release fixing uqfoundation/dill#753 is out:
- Bump
dillinuv.lock(uv lock --upgrade-package dill). - Drop both markers and the accompanying
TODOcomments. - Confirm
test_fallback_pickleand the redis-backedtest_dynamic_componentspass on 3.15. - Consider raising the declared minimum
dillversion so downstream users on 3.15 get the fix instead of a runtime serialization error.
Source: reflex-dev/reflex