bpo-41818: Add termios.tcgetwinsize(), termios.tcsetwinsize(). Update docs.#23686
bpo-41818: Add termios.tcgetwinsize(), termios.tcsetwinsize(). Update docs.#23686gpshead merged 9 commits into
Conversation
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
|
@ethanfurman @aeros @gpshead @asvetlov Update1: These functions perform Update2: Added Update3: Added Update4: minor change: unlike |
Sorry, something went wrong.
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
|
@zoulasc Sir, can you please take a look at the changes that I made to termios.c? |
Sorry, something went wrong.
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
…etwinsize(). Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
|
Still waiting for core review. |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
gpshead
left a comment
There was a problem hiding this comment.
I'd ordinarily also ask for unittest coverage... but this is termios which doesn't appear to have any and might be challenging to automate given its purpose is more for interactive things (?). if you have ideas on that front, feel free to add the beginnings of a Lib/test/test_termios.py - but none of us are going to block this PR on that happening. :)
some comments to address below. primarily: use two item tuples instead of lists.
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
|
@gpshead Unfortunately, I am very busy with my PhD math research currently, and I apologize in advance for not having the time to write unittests for Fortunately, I had some time to spare during last December, when I had already written unittests for the @ambv please take a look at https://bugs.python.org/issue41818 if you have time :) |
Sorry, something went wrong.
…t two-item tuples instead of lists.
|
I have made the requested changes; please review again. Thank you for your patience. |
Sorry, something went wrong.
|
Thanks for making the requested changes! @gpshead: please review the changes made to this pull request. |
Sorry, something went wrong.
…quence, with overflow checking.
|
Awesome to see this landed 👏🏻👏🏻👏🏻 |
Sorry, something went wrong.
This follows #23536. Also, see #23546, #23740.
tcgetwinsize()andtcsetwinsize()are expected to appear in IEEE Std 1003.1 ("POSIX.1") issue 8 [ the upcoming version of POSIX ] as declarations in<termios.h>; see https://www.austingroupbugs.net/view.php?id=1151#c3856.NetBSD already has them (thanks to user "kre"):
Update: musl libc also has these functions.
Update2: The patches that I had submitted to add tcgetwinsize() and tcsetwinsize() to the FreeBSD libc have been merged. I am still working on getting them included in glibc.
When POSIX.1 issue 8 is released,
termios.tcgetwinsize(),termios.tcsetwinsize()can be updated to utilize the native versions.Post #23686, #23546, #23740 goals:
test_winsize()to "Lib/test/test_pty.py";Signed-off-by: Soumendra Ganguly soumendraganguly@gmail.com
https://bugs.python.org/issue41818