Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add future flag to experimental_features #3864

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions litestar/config/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
5 changes: 5 additions & 0 deletions tests/unit/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...
Expand Down
Loading