{"action":"created","issue":{"url":"https://api.github.com/repos/python/typeshed/issues/2394","repository_url":"https://api.github.com/repos/python/typeshed","labels_url":"https://api.github.com/repos/python/typeshed/issues/2394/labels{/name}","comments_url":"https://api.github.com/repos/python/typeshed/issues/2394/comments","events_url":"https://api.github.com/repos/python/typeshed/issues/2394/events","html_url":"https://github.com/python/typeshed/issues/2394","id":351739155,"node_id":"MDU6SXNzdWUzNTE3MzkxNTU=","number":2394,"title":"The argument to urllib.parse.urlunparse/urlunsplit can contain None.","user":{"login":"Solumin","id":930857,"node_id":"MDQ6VXNlcjkzMDg1Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/930857?v=4","gravatar_id":"","url":"https://api.github.com/users/Solumin","html_url":"https://github.com/Solumin","followers_url":"https://api.github.com/users/Solumin/followers","following_url":"https://api.github.com/users/Solumin/following{/other_user}","gists_url":"https://api.github.com/users/Solumin/gists{/gist_id}","starred_url":"https://api.github.com/users/Solumin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Solumin/subscriptions","organizations_url":"https://api.github.com/users/Solumin/orgs","repos_url":"https://api.github.com/users/Solumin/repos","events_url":"https://api.github.com/users/Solumin/events{/privacy}","received_events_url":"https://api.github.com/users/Solumin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-17T21:08:42Z","updated_at":"2018-08-20T04:39:04Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"urllib.parse.urlunparse and .urlunsplit take fixed-size sequences that may use None to fill in the missing values. For example:\r\n\r\n```\r\n>>> parse.urlunparse(('a', 'b', 'c', 'd', 'e', 'f'))\r\n'a://b/c;d?e#f'\r\n>>> parse.urlunparse(('a', 'b', 'c', 'd', 'e', None))\r\n'a://b/c;d?e'\r\n```\r\n\r\nHowever, the pyi for this library does not account for this.\r\nThis problem is also present in the 2.7 urlparse.pyi."},"comment":{"url":"https://api.github.com/repos/python/typeshed/issues/comments/414195314","html_url":"https://github.com/python/typeshed/issues/2394#issuecomment-414195314","issue_url":"https://api.github.com/repos/python/typeshed/issues/2394","id":414195314,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDE5NTMxNA==","user":{"login":"Solumin","id":930857,"node_id":"MDQ6VXNlcjkzMDg1Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/930857?v=4","gravatar_id":"","url":"https://api.github.com/users/Solumin","html_url":"https://github.com/Solumin","followers_url":"https://api.github.com/users/Solumin/followers","following_url":"https://api.github.com/users/Solumin/following{/other_user}","gists_url":"https://api.github.com/users/Solumin/gists{/gist_id}","starred_url":"https://api.github.com/users/Solumin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Solumin/subscriptions","organizations_url":"https://api.github.com/users/Solumin/orgs","repos_url":"https://api.github.com/users/Solumin/repos","events_url":"https://api.github.com/users/Solumin/events{/privacy}","received_events_url":"https://api.github.com/users/Solumin/received_events","type":"User","site_admin":false},"created_at":"2018-08-20T04:39:04Z","updated_at":"2018-08-20T04:39:04Z","author_association":"CONTRIBUTOR","body":"It looks like the last three (or last two, for `urlunsplit`) values in the `components` sequence may be `None`, *or* all six (five) values may be None.\r\n\r\nI agree that using empty strings is greatly preferable.\r\n\r\nI do not agree that support for None shouldn't be included in typeshed. Two reasons:\r\n- It is already being used with None in the wild.\r\n- typeshed's own [CONTRIBUTING.md](https://github.com/python/typeshed/blob/master/CONTRIBUTING.md#what-to-do-when-a-projects-documentation-and-implementation-disagree) says that if the documentation does not match the implementation, then the pyi should match the implementation and the documentation updated.\r\n\r\n(I don't dispute that support for None may be accidental.)\r\n\r\nI think a good solution -- if we are to support None, at least -- would be to add:\r\n`urlunparse(components: Tuple[None, None, None, None, None, None]) -> None`\r\nand modify the existing signature to:\r\n`urlunparse(components: Tuple[AnyStr, AnyStr, AnyStr, Optional[AnyStr], Optional[AnyStr], Optional[AnyStr]) -> AnyStr`. (Or perhaps the first signature should be `urlunparse(components: Sequence[None]) -> None` for simplicity's sake?)"}}
{"actor":{"display_login":"Solumin"}}