From cc80a47f5be6c60e53c42ef9378e6db3b0e183b1 Mon Sep 17 00:00:00 2001 From: pgjones Date: Sun, 16 Jul 2023 14:04:23 +0100 Subject: [PATCH] Widen the response typing Whilst not strictly true for Flask, it is true for Flask and Quart and hence makes it much easier for Quart to extend Flask classes. The alternatives are generic usage in the sansio codebase or mixed usage within Flask. I think this is a good compromise. --- src/flask/typing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flask/typing.py b/src/flask/typing.py index 0cd4b3e7..66bc0a54 100644 --- a/src/flask/typing.py +++ b/src/flask/typing.py @@ -5,7 +5,7 @@ import typing as t if t.TYPE_CHECKING: # pragma: no cover from _typeshed.wsgi import WSGIApplication # noqa: F401 from werkzeug.datastructures import Headers # noqa: F401 - from werkzeug.wrappers import Response # noqa: F401 + from werkzeug.sansio.response import Response # noqa: F401 # The possible types that are directly convertible or are a Response object. ResponseValue = t.Union[