From: Ben Darnell Date: Thu, 13 Jun 2024 18:49:03 +0000 (-0400) Subject: wsgi: Avoid deprecated typing.Text alias X-Git-Tag: v6.5.0b1~47^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad277a7222a12e294708dd651a6a43f47d520863;p=thirdparty%2Ftornado.git wsgi: Avoid deprecated typing.Text alias This alias existed only for python 2 compatibility. This commit was partially made by pyupgrade and then I manually fixed the unused import. --- diff --git a/tornado/wsgi.py b/tornado/wsgi.py index 6ef2ed65..c189562a 100644 --- a/tornado/wsgi.py +++ b/tornado/wsgi.py @@ -38,7 +38,7 @@ from tornado import httputil from tornado.ioloop import IOLoop from tornado.log import access_log -from typing import List, Tuple, Optional, Callable, Any, Dict, Text +from typing import List, Tuple, Optional, Callable, Any, Dict from types import TracebackType import typing @@ -204,7 +204,7 @@ class WSGIContainer: request.connection.finish() self._log(status_code, request) - def environ(self, request: httputil.HTTPServerRequest) -> Dict[Text, Any]: + def environ(self, request: httputil.HTTPServerRequest) -> Dict[str, Any]: """Converts a `tornado.httputil.HTTPServerRequest` to a WSGI environment. .. versionchanged:: 6.3