diff --git a/litestar/config/app.py b/litestar/config/app.py index a314b9e9e3..170598a422 100644 --- a/litestar/config/app.py +++ b/litestar/config/app.py @@ -230,3 +230,6 @@ def __post_init__(self) -> None: class ExperimentalFeatures(str, enum.Enum): DTO_CODEGEN = "DTO_CODEGEN" + """Enable DTO codegen.""" + FUTURE = "FUTURE" + """Enable future features that may be considered breaking or changing.""" diff --git a/tests/unit/test_app.py b/tests/unit/test_app.py index 87a779628c..084e0572fa 100644 --- a/tests/unit/test_app.py +++ b/tests/unit/test_app.py @@ -454,6 +454,11 @@ def test_use_dto_codegen_feature_flag_warns() -> None: Litestar(experimental_features=[ExperimentalFeatures.DTO_CODEGEN]) +def test_use_future_feature_flag_warns() -> None: + app = Litestar(experimental_features=[ExperimentalFeatures.FUTURE]) + assert app.experimental_features == frozenset([ExperimentalFeatures.FUTURE]) + + def test_using_custom_path_parameter() -> None: @get() def my_route_handler() -> None: ...