From 23dc493fbb59ca9024e24ce45e69410a2ae008e8 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 24 Mar 2020 12:39:03 +0100 Subject: [PATCH] fcntl: make mutate_flag optional for ioctl w/ read-only buffer Having the flag mandatory broke code like buf = fcntl.ioctl(fileno, termios.TIOCGWINSZ, 8 * b' ') which had to be rewritten as buf = fcntl.ioctl(fileno, termios.TIOCGWINSZ, 8 * b' ', False) which happens to be incompatible with Python 2, and extra noise. Fixes #3881 --- stdlib/3/fcntl.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/3/fcntl.pyi b/stdlib/3/fcntl.pyi index b9df14753360..735deeaad8c2 100644 --- a/stdlib/3/fcntl.pyi +++ b/stdlib/3/fcntl.pyi @@ -111,7 +111,7 @@ def ioctl(__fd: FileDescriptorLike, def ioctl(__fd: FileDescriptorLike, __request: int, __arg: _ReadOnlyBuffer, - __mutate_flag: bool) -> bytes: ... + __mutate_flag: bool = ...) -> bytes: ... def flock(__fd: FileDescriptorLike, __operation: int) -> None: ... def lockf(__fd: FileDescriptorLike, __cmd: int,