Allow json.dump to dump to BinaryIO again (#2546)

PR #2516 aimed to widen the accepted file argument to json.dump, but
since `IO` is invariant in its argument, it actually disallowed
passing binary files.
This commit is contained in:
Michael J. Sullivan
2018-10-23 16:13:07 -07:00
committed by Jelle Zijlstra
parent da6e18caf7
commit 4badd35325

View File

@@ -20,7 +20,7 @@ def dumps(obj: Any,
**kwds: Any) -> str: ...
def dump(obj: Any,
fp: IO[Text],
fp: Union[IO[str], IO[Text]],
skipkeys: bool = ...,
ensure_ascii: bool = ...,
check_circular: bool = ...,