Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 514bbfc

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 350aeab commit 514bbfc

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
@@ -424,11 +424,9 @@ def setup(app):
424424
app.add_directive('deprecated-removed', DeprecatedRemoved)
425425
app.add_builder(PydocTopicsBuilder)
426426
app.add_builder(suspicious.CheckSuspiciousMarkupBuilder)
427-
app.add_description_unit('opcode', 'opcode', '%s (opcode)',
428-
parse_opcode_signature)
429-
app.add_description_unit('pdbcommand', 'pdbcmd', '%s (pdb command)',
430-
parse_pdb_command)
431-
app.add_description_unit('2to3fixer', '2to3fixer', '%s (2to3 fixer)')
427+
app.add_object_type('opcode', 'opcode', '%s (opcode)', parse_opcode_signature)
428+
app.add_object_type('pdbcommand', 'pdbcmd', '%s (pdb command)', parse_pdb_command)
429+
app.add_object_type('2to3fixer', '2to3fixer', '%s (2to3 fixer)')
432430
app.add_directive_to_domain('py', 'decorator', PyDecoratorFunction)
433431
app.add_directive_to_domain('py', 'decoratormethod', PyDecoratorMethod)
434432
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)