Follow-up to #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): uqfoundation/dill#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
dill in uv.lock (uv lock --upgrade-package dill).
- Drop both markers and the accompanying
TODO comments.
- Confirm
test_fallback_pickle and the redis-backed test_dynamic_components pass on 3.15.
- Consider raising the declared minimum
dill version so downstream users on 3.15 get the fix instead of a runtime serialization error.
Follow-up to #6930 (Python 3.15 support).
dill <= 0.4.1cannot serialize functions on Python 3.15 (it usescode.co_lnotab, removed in 3.15): uqfoundation/dill#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
Callablefield, dynamic components) fails to serialize at runtime.When a dill release fixing uqfoundation/dill#753 is out:
dillinuv.lock(uv lock --upgrade-package dill).TODOcomments.test_fallback_pickleand the redis-backedtest_dynamic_componentspass on 3.15.dillversion so downstream users on 3.15 get the fix instead of a runtime serialization error.