{"action":"created","comment":{"url":"https://api.github.com/repos/python/typeshed/pulls/comments/190123128","pull_request_review_id":122433298,"id":190123128,"diff_hunk":"@@ -1,50 +1,53 @@\n import sys\n-from typing import Any\n+from typing import Any, Iterable, Iterator, Optional, NoReturn, Callable\n+\n+from wsgiref.types import WSGIApplication, InputStream, ErrorStream\n \n class WSGIWarning(Warning): ...\n \n-def validator(application): ...\n+def validator(application: WSGIApplication) -> WSGIApplication: ...\n \n class InputWrapper:\n-    input = ...  # type: Any\n-    def __init__(self, wsgi_input): ...\n-    def read(self, *args): ...\n+    input: InputStream\n+    def __init__(self, wsgi_input: InputStream) -> None: ...\n     if sys.version_info < (3,):\n-        def readline(self): ...\n+        def read(self, size: int = ...) -> bytes: ...\n+        def readline(self) -> bytes: ...\n     else:\n-        def readline(self, *args): ...\n-    def readlines(self, *args): ...\n-    def __iter__(self): ...\n-    def close(self): ...\n+        def read(self, size: int) -> bytes: ...\n+        def readline(self, size: int = ...) -> bytes: ...\n+    def readlines(self, hint: int = ...) -> bytes: ...\n+    def __iter__(self) -> Iterable[bytes]: ...\n+    def close(self) -> NoReturn: ...\n \n class ErrorWrapper:\n-    errors = ...  # type: Any\n-    def __init__(self, wsgi_errors): ...\n-    def write(self, s): ...\n-    def flush(self): ...\n-    def writelines(self, seq): ...\n-    def close(self): ...\n+    errors: ErrorStream\n+    def __init__(self, wsgi_errors: ErrorStream) -> None: ...\n+    def write(self, s: str) -> None: ...\n+    def flush(self) -> None: ...\n+    def writelines(self, seq: Iterable[str]) -> None: ...\n+    def close(self) -> NoReturn: ...\n \n class WriteWrapper:\n-    writer = ...  # type: Any\n-    def __init__(self, wsgi_writer): ...\n-    def __call__(self, s): ...\n+    writer: Callable[[bytes], None]","path":"stdlib/2and3/wsgiref/validate.pyi","position":51,"original_position":51,"commit_id":"b1757e546a4024b9c105da101f6577455695770b","original_commit_id":"b1757e546a4024b9c105da101f6577455695770b","user":{"login":"JelleZijlstra","id":906600,"avatar_url":"https://avatars0.githubusercontent.com/u/906600?v=4","gravatar_id":"","url":"https://api.github.com/users/JelleZijlstra","html_url":"https://github.com/JelleZijlstra","followers_url":"https://api.github.com/users/JelleZijlstra/followers","following_url":"https://api.github.com/users/JelleZijlstra/following{/other_user}","gists_url":"https://api.github.com/users/JelleZijlstra/gists{/gist_id}","starred_url":"https://api.github.com/users/JelleZijlstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JelleZijlstra/subscriptions","organizations_url":"https://api.github.com/users/JelleZijlstra/orgs","repos_url":"https://api.github.com/users/JelleZijlstra/repos","events_url":"https://api.github.com/users/JelleZijlstra/events{/privacy}","received_events_url":"https://api.github.com/users/JelleZijlstra/received_events","type":"User","site_admin":false},"body":"I'd prefer `object` or `Any` as the return type. The return value is ignored, but I'd be worried that people who pass a function that returns something would get an error. For example, `write()` methods on file-like objects return an int.","created_at":"2018-05-23T04:59:38Z","updated_at":"2018-05-23T04:59:44Z","html_url":"https://github.com/python/typeshed/pull/2145#discussion_r190123128","pull_request_url":"https://api.github.com/repos/python/typeshed/pulls/2145","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/python/typeshed/pulls/comments/190123128"},"html":{"href":"https://github.com/python/typeshed/pull/2145#discussion_r190123128"},"pull_request":{"href":"https://api.github.com/repos/python/typeshed/pulls/2145"}}},"pull_request":{"url":"https://api.github.com/repos/python/typeshed/pulls/2145","id":188805446,"html_url":"https://github.com/python/typeshed/pull/2145","diff_url":"https://github.com/python/typeshed/pull/2145.diff","patch_url":"https://github.com/python/typeshed/pull/2145.patch","issue_url":"https://api.github.com/repos/python/typeshed/issues/2145","number":2145,"state":"open","locked":false,"title":"Improve wsgiref stubs","user":{"login":"srittau","id":52799,"avatar_url":"https://avatars3.githubusercontent.com/u/52799?v=4","gravatar_id":"","url":"https://api.github.com/users/srittau","html_url":"https://github.com/srittau","followers_url":"https://api.github.com/users/srittau/followers","following_url":"https://api.github.com/users/srittau/following{/other_user}","gists_url":"https://api.github.com/users/srittau/gists{/gist_id}","starred_url":"https://api.github.com/users/srittau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srittau/subscriptions","organizations_url":"https://api.github.com/users/srittau/orgs","repos_url":"https://api.github.com/users/srittau/repos","events_url":"https://api.github.com/users/srittau/events{/privacy}","received_events_url":"https://api.github.com/users/srittau/received_events","type":"User","site_admin":false},"body":"* Add `InputStream` and `ErrorStream` WSGI protocols\r\n* Fix return type of `WSGIApplication`\r\n* Add type hints to `wsgiref.validate`\r\n* Add `wsgiref.util` and `wsgiref.headers`","created_at":"2018-05-17T17:15:36Z","updated_at":"2018-05-23T04:59:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"893c745c560b1138993abaaf06fd3ceeaf74b123","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/python/typeshed/pulls/2145/commits","review_comments_url":"https://api.github.com/repos/python/typeshed/pulls/2145/comments","review_comment_url":"https://api.github.com/repos/python/typeshed/pulls/comments{/number}","comments_url":"https://api.github.com/repos/python/typeshed/issues/2145/comments","statuses_url":"https://api.github.com/repos/python/typeshed/statuses/b1757e546a4024b9c105da101f6577455695770b","head":{"label":"srittau:wsgiref","ref":"wsgiref","sha":"b1757e546a4024b9c105da101f6577455695770b","user":{"login":"srittau","id":52799,"avatar_url":"https://avatars3.githubusercontent.com/u/52799?v=4","gravatar_id":"","url":"https://api.github.com/users/srittau","html_url":"https://github.com/srittau","followers_url":"https://api.github.com/users/srittau/followers","following_url":"https://api.github.com/users/srittau/following{/other_user}","gists_url":"https://api.github.com/users/srittau/gists{/gist_id}","starred_url":"https://api.github.com/users/srittau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srittau/subscriptions","organizations_url":"https://api.github.com/users/srittau/orgs","repos_url":"https://api.github.com/users/srittau/repos","events_url":"https://api.github.com/users/srittau/events{/privacy}","received_events_url":"https://api.github.com/users/srittau/received_events","type":"User","site_admin":false},"repo":{"id":108254577,"name":"typeshed","full_name":"srittau/typeshed","owner":{"login":"srittau","id":52799,"avatar_url":"https://avatars3.githubusercontent.com/u/52799?v=4","gravatar_id":"","url":"https://api.github.com/users/srittau","html_url":"https://github.com/srittau","followers_url":"https://api.github.com/users/srittau/followers","following_url":"https://api.github.com/users/srittau/following{/other_user}","gists_url":"https://api.github.com/users/srittau/gists{/gist_id}","starred_url":"https://api.github.com/users/srittau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srittau/subscriptions","organizations_url":"https://api.github.com/users/srittau/orgs","repos_url":"https://api.github.com/users/srittau/repos","events_url":"https://api.github.com/users/srittau/events{/privacy}","received_events_url":"https://api.github.com/users/srittau/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/srittau/typeshed","description":"Collection of library stubs for Python, with static types","fork":true,"url":"https://api.github.com/repos/srittau/typeshed","forks_url":"https://api.github.com/repos/srittau/typeshed/forks","keys_url":"https://api.github.com/repos/srittau/typeshed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/srittau/typeshed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/srittau/typeshed/teams","hooks_url":"https://api.github.com/repos/srittau/typeshed/hooks","issue_events_url":"https://api.github.com/repos/srittau/typeshed/issues/events{/number}","events_url":"https://api.github.com/repos/srittau/typeshed/events","assignees_url":"https://api.github.com/repos/srittau/typeshed/assignees{/user}","branches_url":"https://api.github.com/repos/srittau/typeshed/branches{/branch}","tags_url":"https://api.github.com/repos/srittau/typeshed/tags","blobs_url":"https://api.github.com/repos/srittau/typeshed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/srittau/typeshed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/srittau/typeshed/git/refs{/sha}","trees_url":"https://api.github.com/repos/srittau/typeshed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/srittau/typeshed/statuses/{sha}","languages_url":"https://api.github.com/repos/srittau/typeshed/languages","stargazers_url":"https://api.github.com/repos/srittau/typeshed/stargazers","contributors_url":"https://api.github.com/repos/srittau/typeshed/contributors","subscribers_url":"https://api.github.com/repos/srittau/typeshed/subscribers","subscription_url":"https://api.github.com/repos/srittau/typeshed/subscription","commits_url":"https://api.github.com/repos/srittau/typeshed/commits{/sha}","git_commits_url":"https://api.github.com/repos/srittau/typeshed/git/commits{/sha}","comments_url":"https://api.github.com/repos/srittau/typeshed/comments{/number}","issue_comment_url":"https://api.github.com/repos/srittau/typeshed/issues/comments{/number}","contents_url":"https://api.github.com/repos/srittau/typeshed/contents/{+path}","compare_url":"https://api.github.com/repos/srittau/typeshed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/srittau/typeshed/merges","archive_url":"https://api.github.com/repos/srittau/typeshed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/srittau/typeshed/downloads","issues_url":"https://api.github.com/repos/srittau/typeshed/issues{/number}","pulls_url":"https://api.github.com/repos/srittau/typeshed/pulls{/number}","milestones_url":"https://api.github.com/repos/srittau/typeshed/milestones{/number}","notifications_url":"https://api.github.com/repos/srittau/typeshed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/srittau/typeshed/labels{/name}","releases_url":"https://api.github.com/repos/srittau/typeshed/releases{/id}","deployments_url":"https://api.github.com/repos/srittau/typeshed/deployments","created_at":"2017-10-25T10:23:29Z","updated_at":"2018-05-18T08:10:51Z","pushed_at":"2018-05-19T18:16:16Z","git_url":"git://github.com/srittau/typeshed.git","ssh_url":"git@github.com:srittau/typeshed.git","clone_url":"https://github.com/srittau/typeshed.git","svn_url":"https://github.com/srittau/typeshed","homepage":null,"size":3340,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"python:master","ref":"master","sha":"f7f00c52af249a0a305908ba6a0016ce25d4064e","user":{"login":"python","id":1525981,"avatar_url":"https://avatars3.githubusercontent.com/u/1525981?v=4","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"Organization","site_admin":false},"repo":{"id":31696383,"name":"typeshed","full_name":"python/typeshed","owner":{"login":"python","id":1525981,"avatar_url":"https://avatars3.githubusercontent.com/u/1525981?v=4","gravatar_id":"","url":"https://api.github.com/users/python","html_url":"https://github.com/python","followers_url":"https://api.github.com/users/python/followers","following_url":"https://api.github.com/users/python/following{/other_user}","gists_url":"https://api.github.com/users/python/gists{/gist_id}","starred_url":"https://api.github.com/users/python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python/subscriptions","organizations_url":"https://api.github.com/users/python/orgs","repos_url":"https://api.github.com/users/python/repos","events_url":"https://api.github.com/users/python/events{/privacy}","received_events_url":"https://api.github.com/users/python/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/python/typeshed","description":"Collection of library stubs for Python, with static types","fork":false,"url":"https://api.github.com/repos/python/typeshed","forks_url":"https://api.github.com/repos/python/typeshed/forks","keys_url":"https://api.github.com/repos/python/typeshed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python/typeshed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python/typeshed/teams","hooks_url":"https://api.github.com/repos/python/typeshed/hooks","issue_events_url":"https://api.github.com/repos/python/typeshed/issues/events{/number}","events_url":"https://api.github.com/repos/python/typeshed/events","assignees_url":"https://api.github.com/repos/python/typeshed/assignees{/user}","branches_url":"https://api.github.com/repos/python/typeshed/branches{/branch}","tags_url":"https://api.github.com/repos/python/typeshed/tags","blobs_url":"https://api.github.com/repos/python/typeshed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/python/typeshed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/python/typeshed/git/refs{/sha}","trees_url":"https://api.github.com/repos/python/typeshed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python/typeshed/statuses/{sha}","languages_url":"https://api.github.com/repos/python/typeshed/languages","stargazers_url":"https://api.github.com/repos/python/typeshed/stargazers","contributors_url":"https://api.github.com/repos/python/typeshed/contributors","subscribers_url":"https://api.github.com/repos/python/typeshed/subscribers","subscription_url":"https://api.github.com/repos/python/typeshed/subscription","commits_url":"https://api.github.com/repos/python/typeshed/commits{/sha}","git_commits_url":"https://api.github.com/repos/python/typeshed/git/commits{/sha}","comments_url":"https://api.github.com/repos/python/typeshed/comments{/number}","issue_comment_url":"https://api.github.com/repos/python/typeshed/issues/comments{/number}","contents_url":"https://api.github.com/repos/python/typeshed/contents/{+path}","compare_url":"https://api.github.com/repos/python/typeshed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python/typeshed/merges","archive_url":"https://api.github.com/repos/python/typeshed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python/typeshed/downloads","issues_url":"https://api.github.com/repos/python/typeshed/issues{/number}","pulls_url":"https://api.github.com/repos/python/typeshed/pulls{/number}","milestones_url":"https://api.github.com/repos/python/typeshed/milestones{/number}","notifications_url":"https://api.github.com/repos/python/typeshed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python/typeshed/labels{/name}","releases_url":"https://api.github.com/repos/python/typeshed/releases{/id}","deployments_url":"https://api.github.com/repos/python/typeshed/deployments","created_at":"2015-03-05T04:51:28Z","updated_at":"2018-05-23T04:57:15Z","pushed_at":"2018-05-23T04:57:12Z","git_url":"git://github.com/python/typeshed.git","ssh_url":"git@github.com:python/typeshed.git","clone_url":"https://github.com/python/typeshed.git","svn_url":"https://github.com/python/typeshed","homepage":null,"size":3335,"stargazers_count":722,"watchers_count":722,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":433,"mirror_url":null,"archived":false,"open_issues_count":130,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":433,"open_issues":130,"watchers":722,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/python/typeshed/pulls/2145"},"html":{"href":"https://github.com/python/typeshed/pull/2145"},"issue":{"href":"https://api.github.com/repos/python/typeshed/issues/2145"},"comments":{"href":"https://api.github.com/repos/python/typeshed/issues/2145/comments"},"review_comments":{"href":"https://api.github.com/repos/python/typeshed/pulls/2145/comments"},"review_comment":{"href":"https://api.github.com/repos/python/typeshed/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/python/typeshed/pulls/2145/commits"},"statuses":{"href":"https://api.github.com/repos/python/typeshed/statuses/b1757e546a4024b9c105da101f6577455695770b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"JelleZijlstra"}}