Skip to content

Commit e2c3bc7

Browse files
bpo-34967: Sphinx is deprecating add_description_unit, use add_object_type (GH-9827)
(cherry picked from commit e385d06) Co-authored-by: Stéphane Wirtel <[email protected]>
1 parent 71e601e commit e2c3bc7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Doc/tools/extensions/pyspecific.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,9 @@ def setup(app):
388388
app.add_directive('deprecated-removed', DeprecatedRemoved)
389389
app.add_builder(PydocTopicsBuilder)
390390
app.add_builder(suspicious.CheckSuspiciousMarkupBuilder)
391-
app.add_description_unit('opcode', 'opcode', '%s (opcode)',
392-
parse_opcode_signature)
393-
app.add_description_unit('pdbcommand', 'pdbcmd', '%s (pdb command)',
394-
parse_pdb_command)
395-
app.add_description_unit('2to3fixer', '2to3fixer', '%s (2to3 fixer)')
391+
app.add_object_type('opcode', 'opcode', '%s (opcode)', parse_opcode_signature)
392+
app.add_object_type('pdbcommand', 'pdbcmd', '%s (pdb command)', parse_pdb_command)
393+
app.add_object_type('2to3fixer', '2to3fixer', '%s (2to3 fixer)')
396394
app.add_directive_to_domain('py', 'decorator', PyDecoratorFunction)
397395
app.add_directive_to_domain('py', 'decoratormethod', PyDecoratorMethod)
398396
app.add_directive_to_domain('py', 'coroutinefunction', PyCoroutineFunction)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Use app.add_object_type() instead of the deprecated Sphinx function
2+
app.description_unit()

0 commit comments

Comments
 (0)