Skip to content

Commit 43577c0

Browse files
authored
bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858)
Use generic '.. object::' to declare markers, rather than abusing '.. c:function::' which fails on Sphinx 3.
1 parent e087f7c commit 43577c0

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

Doc/howto/instrumentation.rst

+11-13
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,7 @@ should instead read:
272272
Available static markers
273273
------------------------
274274

275-
.. I'm reusing the "c:function" type for markers
276-
277-
.. c:function:: function__entry(str filename, str funcname, int lineno)
275+
.. object:: function__entry(str filename, str funcname, int lineno)
278276

279277
This marker indicates that execution of a Python function has begun.
280278
It is only triggered for pure-Python (bytecode) functions.
@@ -290,40 +288,40 @@ Available static markers
290288

291289
* ``$arg3`` : ``int`` line number
292290

293-
.. c:function:: function__return(str filename, str funcname, int lineno)
291+
.. object:: function__return(str filename, str funcname, int lineno)
294292

295293
This marker is the converse of :c:func:`function__entry`, and indicates that
296294
execution of a Python function has ended (either via ``return``, or via an
297295
exception). It is only triggered for pure-Python (bytecode) functions.
298296

299297
The arguments are the same as for :c:func:`function__entry`
300298

301-
.. c:function:: line(str filename, str funcname, int lineno)
299+
.. object:: line(str filename, str funcname, int lineno)
302300

303301
This marker indicates a Python line is about to be executed. It is
304302
the equivalent of line-by-line tracing with a Python profiler. It is
305303
not triggered within C functions.
306304

307305
The arguments are the same as for :c:func:`function__entry`.
308306

309-
.. c:function:: gc__start(int generation)
307+
.. object:: gc__start(int generation)
310308

311309
Fires when the Python interpreter starts a garbage collection cycle.
312310
``arg0`` is the generation to scan, like :func:`gc.collect()`.
313311

314-
.. c:function:: gc__done(long collected)
312+
.. object:: gc__done(long collected)
315313

316314
Fires when the Python interpreter finishes a garbage collection
317315
cycle. ``arg0`` is the number of collected objects.
318316

319-
.. c:function:: import__find__load__start(str modulename)
317+
.. object:: import__find__load__start(str modulename)
320318

321319
Fires before :mod:`importlib` attempts to find and load the module.
322320
``arg0`` is the module name.
323321

324322
.. versionadded:: 3.7
325323

326-
.. c:function:: import__find__load__done(str modulename, int found)
324+
.. object:: import__find__load__done(str modulename, int found)
327325

328326
Fires after :mod:`importlib`'s find_and_load function is called.
329327
``arg0`` is the module name, ``arg1`` indicates if module was
@@ -332,7 +330,7 @@ Available static markers
332330
.. versionadded:: 3.7
333331

334332

335-
.. c:function:: audit(str event, void *tuple)
333+
.. object:: audit(str event, void *tuple)
336334

337335
Fires when :func:`sys.audit` or :c:func:`PySys_Audit` is called.
338336
``arg0`` is the event name as C string, ``arg1`` is a :c:type:`PyObject`
@@ -375,14 +373,14 @@ If this file is installed in SystemTap's tapset directory (e.g.
375373
``/usr/share/systemtap/tapset``), then these additional probepoints become
376374
available:
377375

378-
.. c:function:: python.function.entry(str filename, str funcname, int lineno, frameptr)
376+
.. object:: python.function.entry(str filename, str funcname, int lineno, frameptr)
379377

380378
This probe point indicates that execution of a Python function has begun.
381379
It is only triggered for pure-Python (bytecode) functions.
382380

383-
.. c:function:: python.function.return(str filename, str funcname, int lineno, frameptr)
381+
.. object:: python.function.return(str filename, str funcname, int lineno, frameptr)
384382

385-
This probe point is the converse of :c:func:`python.function.return`, and
383+
This probe point is the converse of ``python.function.return``, and
386384
indicates that execution of a Python function has ended (either via
387385
``return``, or via an exception). It is only triggered for pure-Python
388386
(bytecode) functions.

0 commit comments

Comments
 (0)