]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Make `os.get_terminal_size` check `isatty` before calling `ioctl` (#154885)
authorMalcolm Smith <smith@chaquo.com>
Thu, 30 Jul 2026 02:04:46 +0000 (03:04 +0100)
committerGitHub <noreply@github.com>
Thu, 30 Jul 2026 02:04:46 +0000 (02:04 +0000)
commit51ae3c0ee585e2bc56d0a58c619eefa1b4b4f929
tree00e3178fde0f16d5ae8f17f4c90f25c9fb936b00
parent49f96670d98c50eca769dd3f6fb5b6de11010617
Make `os.get_terminal_size` check `isatty` before calling `ioctl` (#154885)

Calling ioctl on stdout raises warnings on Android. Ensure we have a TTY
before doing terminal size calls.
Lib/test/test_os/test_os.py
Misc/NEWS.d/next/Library/2026-07-29-16-53-50.gh-issue-154885.ptofmI.rst [new file with mode: 0644]
Modules/posixmodule.c