Skip to content

Commit 9c18f75

Browse files
authored
gh-101100: Fix sphinx warnings in library/resource.rst (#140023)
1 parent 091e851 commit 9c18f75

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
@@ -141,7 +141,7 @@ platform.
141141
.. data:: RLIMIT_CPU
142142

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

@@ -363,47 +363,47 @@ These functions are used to retrieve resource usage information:
363363
For backward compatibility, the return value is also accessible as a tuple of 16
364364
elements.
365365

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

372-
+--------+---------------------+---------------------------------------+
373-
| Index | Field | Resource |
374-
+========+=====================+=======================================+
375-
| ``0`` | :attr:`ru_utime` | time in user mode (float seconds) |
376-
+--------+---------------------+---------------------------------------+
377-
| ``1`` | :attr:`ru_stime` | time in system mode (float seconds) |
378-
+--------+---------------------+---------------------------------------+
379-
| ``2`` | :attr:`ru_maxrss` | maximum resident set size |
380-
+--------+---------------------+---------------------------------------+
381-
| ``3`` | :attr:`ru_ixrss` | shared memory size |
382-
+--------+---------------------+---------------------------------------+
383-
| ``4`` | :attr:`ru_idrss` | unshared memory size |
384-
+--------+---------------------+---------------------------------------+
385-
| ``5`` | :attr:`ru_isrss` | unshared stack size |
386-
+--------+---------------------+---------------------------------------+
387-
| ``6`` | :attr:`ru_minflt` | page faults not requiring I/O |
388-
+--------+---------------------+---------------------------------------+
389-
| ``7`` | :attr:`ru_majflt` | page faults requiring I/O |
390-
+--------+---------------------+---------------------------------------+
391-
| ``8`` | :attr:`ru_nswap` | number of swap outs |
392-
+--------+---------------------+---------------------------------------+
393-
| ``9`` | :attr:`ru_inblock` | block input operations |
394-
+--------+---------------------+---------------------------------------+
395-
| ``10`` | :attr:`ru_oublock` | block output operations |
396-
+--------+---------------------+---------------------------------------+
397-
| ``11`` | :attr:`ru_msgsnd` | messages sent |
398-
+--------+---------------------+---------------------------------------+
399-
| ``12`` | :attr:`ru_msgrcv` | messages received |
400-
+--------+---------------------+---------------------------------------+
401-
| ``13`` | :attr:`ru_nsignals` | signals received |
402-
+--------+---------------------+---------------------------------------+
403-
| ``14`` | :attr:`ru_nvcsw` | voluntary context switches |
404-
+--------+---------------------+---------------------------------------+
405-
| ``15`` | :attr:`ru_nivcsw` | involuntary context switches |
406-
+--------+---------------------+---------------------------------------+
372+
+--------+----------------------+---------------------------------------+
373+
| Index | Field | Resource |
374+
+========+======================+=======================================+
375+
| ``0`` | :attr:`!ru_utime` | time in user mode (float seconds) |
376+
+--------+----------------------+---------------------------------------+
377+
| ``1`` | :attr:`!ru_stime` | time in system mode (float seconds) |
378+
+--------+----------------------+---------------------------------------+
379+
| ``2`` | :attr:`!ru_maxrss` | maximum resident set size |
380+
+--------+----------------------+---------------------------------------+
381+
| ``3`` | :attr:`!ru_ixrss` | shared memory size |
382+
+--------+----------------------+---------------------------------------+
383+
| ``4`` | :attr:`!ru_idrss` | unshared memory size |
384+
+--------+----------------------+---------------------------------------+
385+
| ``5`` | :attr:`!ru_isrss` | unshared stack size |
386+
+--------+----------------------+---------------------------------------+
387+
| ``6`` | :attr:`!ru_minflt` | page faults not requiring I/O |
388+
+--------+----------------------+---------------------------------------+
389+
| ``7`` | :attr:`!ru_majflt` | page faults requiring I/O |
390+
+--------+----------------------+---------------------------------------+
391+
| ``8`` | :attr:`!ru_nswap` | number of swap outs |
392+
+--------+----------------------+---------------------------------------+
393+
| ``9`` | :attr:`!ru_inblock` | block input operations |
394+
+--------+----------------------+---------------------------------------+
395+
| ``10`` | :attr:`!ru_oublock` | block output operations |
396+
+--------+----------------------+---------------------------------------+
397+
| ``11`` | :attr:`!ru_msgsnd` | messages sent |
398+
+--------+----------------------+---------------------------------------+
399+
| ``12`` | :attr:`!ru_msgrcv` | messages received |
400+
+--------+----------------------+---------------------------------------+
401+
| ``13`` | :attr:`!ru_nsignals` | signals received |
402+
+--------+----------------------+---------------------------------------+
403+
| ``14`` | :attr:`!ru_nvcsw` | voluntary context switches |
404+
+--------+----------------------+---------------------------------------+
405+
| ``15`` | :attr:`!ru_nivcsw` | involuntary context switches |
406+
+--------+----------------------+---------------------------------------+
407407

408408
This function will raise a :exc:`ValueError` if an invalid *who* parameter is
409409
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)