]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
wsgi: Avoid deprecated typing.Text alias
authorBen Darnell <ben@bendarnell.com>
Thu, 13 Jun 2024 18:49:03 +0000 (14:49 -0400)
committerBen Darnell <ben@bendarnell.com>
Thu, 13 Jun 2024 18:49:03 +0000 (14:49 -0400)
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

index 6ef2ed656d448b7f24ac6d554d6112b04ebeb8ce..c189562acb7a4479e3466eb1758b10bab6ee6c3e 100644 (file)
@@ -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