8000 typing: accept buffers in typing.IO.write by JelleZijlstra · Pull Request #9084 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

typing: accept buffers in typing.IO.write #9084

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

Closed
wants to merge 17 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
no picklebuffer in 3.7
  • Loading branch information
JelleZijlstra committed Mar 10, 2023
commit 7f10fc821abc40a7be0e0a19789b329235a2fcf4
4 changes: 2 additions & 2 deletions test_cases/stdlib/typing/check_io.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pickle
import mmap
from typing import IO, AnyStr


def check_write(io_bytes: IO[bytes], io_str: IO[str], io_anystr: IO[AnyStr], any_str: AnyStr, buf: pickle.PickleBuffer) -> None:
def check_write(io_bytes: IO[bytes], io_str: IO[str], io_anystr: IO[AnyStr], any_str: AnyStr, buf: mmap.mmap) -> None:
io_bytes.write(b"")
io_bytes.write(buf)
io_bytes.write("") # type: ignore
Expand Down
0