Skip to content

Commit 357284e

Browse files
[3.14] pythongh-101100: Fix sphinx warnings in library/resource.rst (pythonGH-140023) (python#140352)
Co-authored-by: Weilin Du <[email protected]>
1 parent 2699643 commit 357284e

File tree

3 files changed

+43
-38
lines changed

3 files changed

+43
-38
lines changed

Doc/library/resource.rst

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ platform.
127127
.. data:: RLIMIT_CPU
128128

129129
The maximum amount of processor time (in seconds) that a process can use. If
130-
this limit is exceeded, a :const:`SIGXCPU` signal is sent to the process. (See
130+
this limit is exceeded, a :const:`~signal.SIGXCPU` signal is sent to the process. (See
131131
the :mod:`signal` module documentation for information about how to catch this
132132
signal and do something useful, e.g. flush open files to disk.)
133133

@@ -310,47 +310,47 @@ These functions are used to retrieve resource usage information:
310310
For backward compatibility, the return value is also accessible as a tuple of 16
311311
elements.
312312

313-
The fields :attr:`ru_utime` and :attr:`ru_stime` of the return value are
313+
The fields :attr:`!ru_utime` and :attr:`!ru_stime` of the return value are
314314
floating-point values representing the amount of time spent executing in user
315315
mode and the amount of time spent executing in system mode, respectively. The
316316
remaining values are integers. Consult the :manpage:`getrusage(2)` man page for
317317
detailed information about these values. A brief summary is presented here:
318318

319-
+--------+---------------------+---------------------------------------+
320-
| Index | Field | Resource |
321-
+========+=====================+=======================================+
322-
| ``0`` | :attr:`ru_utime` | time in user mode (float seconds) |
323-
+--------+---------------------+---------------------------------------+
324-
| ``1`` | :attr:`ru_stime` | time in system mode (float seconds) |
325-
+--------+---------------------+---------------------------------------+
326-
| ``2`` | :attr:`ru_maxrss` | maximum resident set size |
327-
+--------+---------------------+---------------------------------------+
328-
| ``3`` | :attr:`ru_ixrss` | shared memory size |
329-
+--------+---------------------+---------------------------------------+
330-
| ``4`` | :attr:`ru_idrss` | unshared memory size |
331-
+--------+---------------------+---------------------------------------+
332-
| ``5`` | :attr:`ru_isrss` | unshared stack size |
333-
+--------+---------------------+---------------------------------------+
334-
| ``6`` | :attr:`ru_minflt` | page faults not requiring I/O |
335-
+--------+---------------------+---------------------------------------+
336-
| ``7`` | :attr:`ru_majflt` | page faults requiring I/O |
337-
+--------+---------------------+---------------------------------------+
338-
| ``8`` | :attr:`ru_nswap` | number of swap outs |
339-
+--------+---------------------+---------------------------------------+
340-
| ``9`` | :attr:`ru_inblock` | block input operations |
341-
+--------+---------------------+---------------------------------------+
342-
| ``10`` | :attr:`ru_oublock` | block output operations |
343-
+--------+---------------------+---------------------------------------+
344-
| ``11`` | :attr:`ru_msgsnd` | messages sent |
345-
+--------+---------------------+---------------------------------------+
346-
| ``12`` | :attr:`ru_msgrcv` | messages received |
347-
+--------+---------------------+---------------------------------------+
348-
| ``13`` | :attr:`ru_nsignals` | signals received |
349-
+--------+---------------------+---------------------------------------+
350-
| ``14`` | :attr:`ru_nvcsw` | voluntary context switches |
351-
+--------+---------------------+---------------------------------------+
352-
| ``15`` | :attr:`ru_nivcsw` | involuntary context switches |
353-
+--------+---------------------+---------------------------------------+
319+
+--------+----------------------+---------------------------------------+
320+
| Index | Field | Resource |
321+
+========+======================+=======================================+
322+
| ``0`` | :attr:`!ru_utime` | time in user mode (float seconds) |
323+
+--------+----------------------+---------------------------------------+
324+
| ``1`` | :attr:`!ru_stime` | time in system mode (float seconds) |
325+
+--------+----------------------+---------------------------------------+
326+
| ``2`` | :attr:`!ru_maxrss` | maximum resident set size |
327+
+--------+----------------------+---------------------------------------+
328+
| ``3`` | :attr:`!ru_ixrss` | shared memory size |
329+
+--------+----------------------+---------------------------------------+
330+
| ``4`` | :attr:`!ru_idrss` | unshared memory size |
331+
+--------+----------------------+---------------------------------------+
332+
| ``5`` | :attr:`!ru_isrss` | unshared stack size |
333+
+--------+----------------------+---------------------------------------+
334+
| ``6`` | :attr:`!ru_minflt` | page faults not requiring I/O |
335+
+--------+----------------------+---------------------------------------+
336+
| ``7`` | :attr:`!ru_majflt` | page faults requiring I/O |
337+
+--------+----------------------+---------------------------------------+
338+
| ``8`` | :attr:`!ru_nswap` | number of swap outs |
339+
+--------+----------------------+---------------------------------------+
340+
| ``9`` | :attr:`!ru_inblock` | block input operations |
341+
+--------+----------------------+---------------------------------------+
342+
| ``10`` | :attr:`!ru_oublock` | block output operations |
343+
+--------+----------------------+---------------------------------------+
344+
| ``11`` | :attr:`!ru_msgsnd` | messages sent |
345+
+--------+----------------------+---------------------------------------+
346+
| ``12`` | :attr:`!ru_msgrcv` | messages received |
347+
+--------+----------------------+---------------------------------------+
348+
| ``13`` | :attr:`!ru_nsignals` | signals received |
349+
+--------+----------------------+---------------------------------------+
350+
| ``14`` | :attr:`!ru_nvcsw` | voluntary context switches |
351+
+--------+----------------------+---------------------------------------+
352+
| ``15`` | :attr:`!ru_nivcsw` | involuntary context switches |
353+
+--------+----------------------+---------------------------------------+
354354

355355
This function will raise a :exc:`ValueError` if an invalid *who* parameter is
356356
specified. It may also raise :exc:`error` exception in unusual circumstances.

Doc/library/signal.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,12 @@ The variables defined in the :mod:`signal` module are:
265265

266266
.. availability:: Unix.
267267

268+
.. data:: SIGXCPU
269+
270+
CPU time limit exceeded.
271+
272+
.. availability:: Unix.
273+
268274
.. data:: SIG*
269275

270276
All the signal numbers are defined symbolically. For example, the hangup signal

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ Doc/library/os.rst
2727
Doc/library/pickletools.rst
2828
Doc/library/profile.rst
2929
Doc/library/pyexpat.rst
30-
Doc/library/resource.rst
3130
Doc/library/select.rst
3231
Doc/library/socket.rst
3332
Doc/library/ssl.rst

0 commit comments

Comments
 (0)