Skip to content
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

Correct the declarations of I/O buffers as bytes-based #1400

Merged
merged 2 commits into from
Nov 1, 2023

Commits on Nov 1, 2023

  1. Correct the declarations of I/O buffers as bytes-based

    * Correctly declare the parameter annotations as `BinaryIO`, because in fact it works only with byte-based buffers.
    
    * `sys.stdin.read()` is always a string, so remove the Python2-specific check.
        * Correct the patch in the test which incorrectly sets `sys.stdin` to a bytes buffer which it never is.
    
    * `sys.stdout.buffer` always exists, so remove the Python2-specific fallback.
        * Correct the patch in the test which incorrectly sets `sys.stdout` to a bytes buffer which it never is. And fix a matching mistake because this necessitated `stdout.read().decode()`.
    oprypin committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    bbb0ff7 View commit details
    Browse the repository at this point in the history
  2. Delete comment

    oprypin committed Nov 1, 2023
    Configuration menu
    Copy the full SHA
    9c48e13 View commit details
    Browse the repository at this point in the history