Skip to content

Commit 92b778b

Browse files
committed
gh-151950: Fix Sphinx reference warnings in termios docs
Document the VMIN/VTIME, TCIFLUSH/TCOFLUSH/TCIOFLUSH, TCOOFF/TCOON/TCIOFF/TCION and TIOC* window-size constants with ``.. data::`` directives so the ``:const:`` references resolve, and drop termios.rst from Doc/tools/.nitignore.
1 parent 0983642 commit 92b778b

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

‎Doc/library/termios.rst‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ The module defines the following functions:
3939
well as the indexing in the *cc* array must be done using the symbolic
4040
constants defined in the :mod:`!termios` module.
4141

42+
.. data:: VMIN
43+
VTIME
44+
45+
Indices into the *cc* array controlling a non-canonical read: the minimum
46+
number of characters to read and the timeout in tenths of a second,
47+
respectively.
48+
4249

4350
.. function:: tcsetattr(fd, when, attributes)
4451

@@ -77,13 +84,28 @@ The module defines the following functions:
7784
which queue: :const:`TCIFLUSH` for the input queue, :const:`TCOFLUSH` for the
7885
output queue, or :const:`TCIOFLUSH` for both queues.
7986

87+
.. data:: TCIFLUSH
88+
TCOFLUSH
89+
TCIOFLUSH
90+
91+
Values for the *queue* selector: the input queue, the output queue, or
92+
both queues, respectively.
93+
8094

8195
.. function:: tcflow(fd, action)
8296

8397
Suspend or resume input or output on file descriptor *fd*. The *action*
8498
argument can be :const:`TCOOFF` to suspend output, :const:`TCOON` to restart
8599
output, :const:`TCIOFF` to suspend input, or :const:`TCION` to restart input.
86100

101+
.. data:: TCOOFF
102+
TCOON
103+
TCIOFF
104+
TCION
105+
106+
Values for the *action* argument: suspend output, restart output,
107+
suspend input, or restart input, respectively.
108+
87109

88110
.. function:: tcgetwinsize(fd)
89111

@@ -93,6 +115,12 @@ The module defines the following functions:
93115

94116
.. versionadded:: 3.11
95117

118+
.. data:: TIOCGWINSZ
119+
TIOCGSIZE
120+
121+
``ioctl()`` requests for querying the tty window size. Not defined on
122+
all platforms; :func:`tcgetwinsize` requires at least one of them.
123+
96124

97125
.. function:: tcsetwinsize(fd, winsize)
98126

@@ -104,6 +132,12 @@ The module defines the following functions:
104132

105133
.. versionadded:: 3.11
106134

135+
.. data:: TIOCSWINSZ
136+
TIOCSSIZE
137+
138+
``ioctl()`` requests for setting the tty window size. Not defined on all
139+
platforms; see :func:`tcsetwinsize` for the required pairs.
140+
107141

108142
.. seealso::
109143

‎Doc/tools/.nitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Doc/library/pyexpat.rst
2121
Doc/library/select.rst
2222
Doc/library/socket.rst
2323
Doc/library/ssl.rst
24-
Doc/library/termios.rst
2524
Doc/library/test.rst
2625
Doc/library/urllib.parse.rst
2726
Doc/library/urllib.request.rst

0 commit comments

Comments
 (0)