Skip to content
Myr

use IO[bytes] instead of BinaryIO for wider compatibility (#5777)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by GitHub · parents c56c5ec, d44f1c6 · Browse files · 2 files+2 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−1 removed

  • other:+2 added−1 removed

2 files+2 added−1 removed

modified:src/flask/helpers.py+1 added-1 removed
396 unmodified lines
397 return kwargs398399400def send_file(401 path_or_file: os.PathLike[t.AnyStr] | str | t.BinaryIO,401 path_or_file: os.PathLike[t.AnyStr] | str | t.IO[bytes],402 mimetype: str | None = None,403 as_attachment: bool = False,404 download_name: str | None = None,405 conditional: bool = True,
229 unmodified lines
modified:CHANGES.rst+1 added
3 unmodified lines
4Unreleased56- When using ``follow_redirects`` in the test client, the final state7 of ``session`` is correct. :issue:`5786`8- Relax type hint for passing bytes IO to ``send_file``. :issue:`5776`91011Version 3.1.112-------------
1611 unmodified lines