]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42174: fallback to sane values if the columns or lines are 0 in get_terminal_size...
authorFilipe Laíns <lains@riseup.net>
Tue, 19 Oct 2021 18:42:13 +0000 (19:42 +0100)
committerGitHub <noreply@github.com>
Tue, 19 Oct 2021 18:42:13 +0000 (20:42 +0200)
commit236e301b8ad9b78ee880baf12e98a826113dc59b
treec95fae5ee2518e73a0ac59b6eaf7f64e63e3cf20
parent574241632bd19e56ed488ee4d8999aefc6a8d7cd
bpo-42174: fallback to sane values if the columns or lines are 0 in get_terminal_size (GH-29046)

I considered only falling back when both were 0, but that still seems
wrong, and the highly popular rich[1] library does it this way, so I
thought we should probably inherit that behavior.

[1] https://github.com/willmcgugan/rich

Signed-off-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Doc/library/shutil.rst
Lib/shutil.py
Misc/NEWS.d/next/Library/2021-10-19-01-30-57.bpo-42174.O2w9bi.rst [new file with mode: 0644]