diff --git a/tests/test_compat.py b/tests/test_compat.py index 470a7050d..0eccabd7f 100644 --- a/tests/test_compat.py +++ b/tests/test_compat.py @@ -95,7 +95,7 @@ def test_propagates_pydantic2_model_config(): value: Union[str, Missing] = Missing() @app.post("/") - def foo(req: Model) -> str | None: + def foo(req: Model) -> Union[str, None]: return req.value or None client = TestClient(app)