diff --git a/requirements.txt b/requirements.txt index 5652a865e..e828ffeb9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,9 @@ # Optionals -e .[full] +# TODO: We need to delete the following line when fixing the test suite for anyio 4.4.0. +anyio==4.3.0 + # Testing coverage==7.4.3 importlib-metadata==7.0.1 diff --git a/starlette/templating.py b/starlette/templating.py index 01af5e9bb..8e1737f61 100644 --- a/starlette/templating.py +++ b/starlette/templating.py @@ -66,9 +66,7 @@ class Jinja2Templates: @typing.overload def __init__( self, - directory: str - | PathLike[typing.AnyStr] - | typing.Sequence[str | PathLike[typing.AnyStr]], + directory: str | PathLike[str] | typing.Sequence[str | PathLike[str]], *, context_processors: list[typing.Callable[[Request], dict[str, typing.Any]]] | None = None, @@ -89,8 +87,8 @@ def __init__( def __init__( self, directory: str - | PathLike[typing.AnyStr] - | typing.Sequence[str | PathLike[typing.AnyStr]] + | PathLike[str] + | typing.Sequence[str | PathLike[str]] | None = None, *, context_processors: list[typing.Callable[[Request], dict[str, typing.Any]]] @@ -117,9 +115,7 @@ def __init__( def _create_env( self, - directory: str - | PathLike[typing.AnyStr] - | typing.Sequence[str | PathLike[typing.AnyStr]], + directory: str | PathLike[str] | typing.Sequence[str | PathLike[str]], **env_options: typing.Any, ) -> jinja2.Environment: loader = jinja2.FileSystemLoader(directory)