mirror of https://github.com/pallets/flask.git
Accept `AsyncIterable` for responses
This commit is contained in:
parent
165af0a090
commit
75c0b75b3b
|
|
@ -4,6 +4,9 @@ Version 3.1.1
|
|||
Unreleased
|
||||
|
||||
- Fix type hint for `cli_runner.invoke`. :issue:`5645`
|
||||
- Mark sans-io base class as being able to handle views that return
|
||||
``AsyncIterable``. This is not accurate for Flask, but makes the type
|
||||
accurate for Quart. :pr:`5659`
|
||||
|
||||
|
||||
Version 3.1.0
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import collections.abc as cabc
|
||||
import typing as t
|
||||
|
||||
if t.TYPE_CHECKING: # pragma: no cover
|
||||
|
|
@ -17,6 +18,8 @@ ResponseValue = t.Union[
|
|||
t.Mapping[str, t.Any],
|
||||
t.Iterator[str],
|
||||
t.Iterator[bytes],
|
||||
cabc.AsyncIterable[str],
|
||||
cabc.AsyncIterable[bytes],
|
||||
]
|
||||
|
||||
# the possible types for an individual HTTP header
|
||||
|
|
|
|||
Loading…
Reference in New Issue