diff --git a/stdlib/2/wsgiref/types.pyi b/stdlib/2/wsgiref/types.pyi index b7bd533f5..977ec8318 100644 --- a/stdlib/2/wsgiref/types.pyi +++ b/stdlib/2/wsgiref/types.pyi @@ -15,16 +15,17 @@ # you need to use 'WSGIApplication' and not simply WSGIApplication when type # hinting your code. Otherwise Python will raise NameErrors. -from typing import Callable, Dict, Iterable, List, Optional, Tuple, Type, Union +from typing import Callable, Dict, Iterable, List, Optional, Tuple, Type, Union, Any from types import TracebackType _exc_info = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]] _Text = Union[unicode, str] +WSGIEnvironment = Dict[_Text, Any] WSGIApplication = Callable[ [ - Dict[_Text, _Text], + WSGIEnvironment, Union[ Callable[[_Text, List[Tuple[_Text, _Text]]], Callable[[_Text], None]], Callable[[_Text, List[Tuple[_Text, _Text]], _exc_info], Callable[[_Text], None]] diff --git a/stdlib/3/wsgiref/types.pyi b/stdlib/3/wsgiref/types.pyi index a5fe0d823..1c0d350e3 100644 --- a/stdlib/3/wsgiref/types.pyi +++ b/stdlib/3/wsgiref/types.pyi @@ -15,15 +15,16 @@ # you need to use 'WSGIApplication' and not simply WSGIApplication when type # hinting your code. Otherwise Python will raise NameErrors. -from typing import Callable, Dict, Iterable, List, Optional, Tuple, Type, Union +from typing import Callable, Dict, Iterable, List, Optional, Tuple, Type, Union, Any from types import TracebackType _exc_info = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]] +WSGIEnvironment = Dict[str, Any] WSGIApplication = Callable[ [ - Dict[str, str], + WSGIEnvironment, Union[ Callable[[str, List[Tuple[str, str]]], Callable[[Union[bytes, str]], None]], Callable[[str, List[Tuple[str, str]], _exc_info], Callable[[Union[bytes, str]], None]]