From ad277a7222a12e294708dd651a6a43f47d520863 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Thu, 13 Jun 2024 14:49:03 -0400 Subject: [PATCH] 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. --- tornado/wsgi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.47.3