Skip to content

Extract WSGIEnvironment and change value type to Any #1745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions stdlib/2/wsgiref/types.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
5 changes: 3 additions & 2 deletions stdlib/3/wsgiref/types.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down