The Wayback Machine - https://web.archive.org/web/20250618081435/https://github.com/python/cpython/pull/27599
Skip to content

tty/fit setraw acording to a man page #27599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

zhiburt
Copy link

@zhiburt zhiburt commented Aug 4, 2021

Hi there,
Coincidentally I noticed that setraw explanation on a man page and python implementation is different.
There's no comment why.
So I just decided to open an issue but there's no issues here :(

It would be nice to put a comment why some of the settings were omitted.

And yes I think it might be a breaking change so it may not worth to be merged.

But leave a comment would be welcomed :)


https://man7.org/linux/man-pages/man3/termios.3.html

   Raw mode
       cfmakeraw() sets the terminal to something like the "raw" mode of
       the old Version 7 terminal driver: input is available character
       by character, echoing is disabled, and all special processing of
       terminal input and output characters is disabled.  The terminal
       attributes are set as follows:

           termios_p->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
                           | INLCR | IGNCR | ICRNL | IXON);
           termios_p->c_oflag &= ~OPOST;
           termios_p->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
           termios_p->c_cflag &= ~(CSIZE | PARENB);
           termios_p->c_cflag |= CS8;

Thank you.
And sorry for bothering.

Hi there,
Coincidentally I noticed that setraw explanation and python implementation is different.
There's no comment why.

So I just decided to open an issue but there's no issues here :(

I would be nice to put a comment why some of the settings were omitted.

And yes I think it might be a breaking change so it may not worth to be merged.

But leave a comment would be welcomed :)

____
https://man7.org/linux/man-pages/man3/termios.3.html

```
   Raw mode
       cfmakeraw() sets the terminal to something like the "raw" mode of
       the old Version 7 terminal driver: input is available character
       by character, echoing is disabled, and all special processing of
       terminal input and output characters is disabled.  The terminal
       attributes are set as follows:

           termios_p->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
                           | INLCR | IGNCR | ICRNL | IXON);
           termios_p->c_oflag &= ~OPOST;
           termios_p->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
           termios_p->c_cflag &= ~(CSIZE | PARENB);
           termios_p->c_cflag |= CS8;
```

Thank you.
And sorry for bothering.
@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

Recognized GitHub username

We couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames:

@zhiburt

This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@serhiy-storchaka
Copy link
Member

Please open an issue on https://bugs.python.org/ for discussion.

The PR needs a NEWS entry, tests, and maybe changes in the documentation if this is a new feature rather of a bug fix.

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity. If the CLA is not signed within 14 days, it will be closed. See also https://devguide.python.org/pullrequest/#licensing

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Feb 19, 2022
@github-actions
Copy link

github-actions bot commented Mar 6, 2022

Closing this stale PR because the CLA is still not signed.

@github-actions github-actions bot closed this Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review stale Stale PR or inactive for long period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants