Skip to content
Myr

Async Iterable Response (#5659)

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 bfffe87, 410e5ab · Browse files · 2 files+6 added−0 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+6 added−0 removed

  • other:+6 added−0 removed

2 files+6 added−0 removed

modified:src/flask/typing.py+3 added
1from __future__ import annotations23import collections.abc as cabc4import typing as t56if t.TYPE_CHECKING: # pragma: no cover7 from _typeshed.wsgi import WSGIApplication # noqa: F401
9 unmodified lines
17 # Only dict is actually accepted, but Mapping allows for TypedDict.18 t.Mapping[str, t.Any],19 t.Iterator[str],20 t.Iterator[bytes],21 cabc.AsyncIterable[str], # for Quart, until App is generic.22 cabc.AsyncIterable[bytes],23]2425# the possible types for an individual HTTP header26# This should be a Union, but mypy doesn't pass unless it's a TypeVar.
67 unmodified lines
modified:CHANGES.rst+3 added
4 unmodified lines
56- Fix type hint for `cli_runner.invoke`. :issue:`5645`7- ``flask --help`` loads the app and plugins first to make sure all commands8 are shown. :issue:5673`9- Mark sans-io base class as being able to handle views that return10 ``AsyncIterable``. This is not accurate for Flask, but makes typing easier11 for Quart. :pr:`5659`121314Version 3.1.015-------------
1596 unmodified lines