diff --git a/CHANGES.rst b/CHANGES.rst index ab1aafe3..c7ae2f65 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,11 @@ +Version 3.0.1 +------------- + +Unreleased + +- Correct type for ``path`` argument to ``send_file``. :issue:`5230` + + Version 3.0.0 ------------- diff --git a/pyproject.toml b/pyproject.toml index 652de0da..ca0eda79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "Flask" -version = "3.0.0" +version = "3.0.1.dev" description = "A simple framework for building complex web applications." readme = "README.rst" license = {file = "LICENSE.rst"} diff --git a/src/flask/helpers.py b/src/flask/helpers.py index 8601c2fd..84608912 100644 --- a/src/flask/helpers.py +++ b/src/flask/helpers.py @@ -387,7 +387,7 @@ def _prepare_send_file_kwargs(**kwargs: t.Any) -> dict[str, t.Any]: def send_file( - path_or_file: os.PathLike | str | t.BinaryIO, + path_or_file: os.PathLike[t.AnyStr] | str | t.BinaryIO, mimetype: str | None = None, as_attachment: bool = False, download_name: str | None = None,