[issue42174] shutil.get_terminal_size() returns 0 when run in a pty

2021-10-19 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks for the fix, Filipe! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42174] shutil.get_terminal_size() returns 0 when run in a pty

2021-10-19 Thread Łukasz Langa
Łukasz Langa added the comment: We decided not to backport this to 3.10 nor 3.9 due to the subtle nature of the change. -- versions: +Python 3.11 -Python 3.9 ___ Python tracker

[issue42174] shutil.get_terminal_size() returns 0 when run in a pty

2021-10-19 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 236e301b8ad9b78ee880baf12e98a826113dc59b by Filipe Laíns in branch 'main': bpo-42174: fallback to sane values if the columns or lines are 0 in get_terminal_size (GH-29046)

[issue42174] shutil.get_terminal_size() returns 0 when run in a pty

2021-10-18 Thread Filipe Laíns
Change by Filipe Laíns : -- keywords: +patch pull_requests: +27317 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29046 ___ Python tracker ___

[issue42174] shutil.get_terminal_size() returns 0 when run in a pty

2021-10-15 Thread Filipe Laíns
Change by Filipe Laíns : -- nosy: +FFY00 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42174] shutil.get_terminal_size() returns 0 when run in a pty

2021-10-09 Thread jack1142
Change by jack1142 : -- nosy: +jack1142 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42174] shutil.get_terminal_size() returns 0 when run in a pty

2020-11-02 Thread Florian Bruhin
Florian Bruhin added the comment: Just found another workaround for this in the wild, as part of the "rich" library: https://github.com/willmcgugan/rich/blob/v9.1.0/rich/console.py#L669-L672 -- ___ Python tracker

[issue42174] shutil.get_terminal_size() returns 0 when run in a pty

2020-10-27 Thread Florian Bruhin
New submission from Florian Bruhin : When shutil.get_terminal_size() is used in a PTY, the os.get_terminal_size() call can return (0, 0). With the pty script from https://github.com/python/mypy/issues/8144#issue-537760245: $ python3 t.py python3 -c 'import shutil;