forked from orbit-oss/flask
use IO[bytes] instead of BinaryIO for wider compatibility (#5777)
This commit is contained in:
commit
1dfd7cd555
2 changed files with 2 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ Unreleased
|
|||
|
||||
- When using ``follow_redirects`` in the test client, the final state
|
||||
of ``session`` is correct. :issue:`5786`
|
||||
- Relax type hint for passing bytes IO to ``send_file``. :issue:`5776`
|
||||
|
||||
|
||||
Version 3.1.1
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ def _prepare_send_file_kwargs(**kwargs: t.Any) -> dict[str, t.Any]:
|
|||
|
||||
|
||||
def send_file(
|
||||
path_or_file: os.PathLike[t.AnyStr] | str | t.BinaryIO,
|
||||
path_or_file: os.PathLike[t.AnyStr] | str | t.IO[bytes],
|
||||
mimetype: str | None = None,
|
||||
as_attachment: bool = False,
|
||||
download_name: str | None = None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue