File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ Unreleased
35
35
same blueprint to be registered multiple times with unique names for
36
36
``url_for ``. Registering the same blueprint with the same name
37
37
multiple times is deprecated. :issue: `1091 `
38
+ - Improve typing for ``stream_with_context ``. :issue: `4052 `
38
39
39
40
40
41
Version 2.0.0
Original file line number Diff line number Diff line change @@ -64,8 +64,10 @@ def get_load_dotenv(default: bool = True) -> bool:
64
64
65
65
66
66
def stream_with_context (
67
- generator_or_function : t .Union [t .Generator , t .Callable ]
68
- ) -> t .Generator :
67
+ generator_or_function : t .Union [
68
+ t .Iterator [t .AnyStr ], t .Callable [..., t .Iterator [t .AnyStr ]]
69
+ ]
70
+ ) -> t .Iterator [t .AnyStr ]:
69
71
"""Request contexts disappear when the response is started on the server.
70
72
This is done for efficiency reasons and to make it less likely to encounter
71
73
memory leaks with badly written WSGI middlewares. The downside is that if
You can’t perform that action at this time.
0 commit comments