Skip to content

Commit f82c9f1

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 f5e00f4 commit f82c9f1

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
@@ -253,11 +253,9 @@ def setup(app):
253253
app.add_directive('impl-detail', ImplementationDetail)
254254
app.add_builder(PydocTopicsBuilder)
255255
app.add_builder(suspicious.CheckSuspiciousMarkupBuilder)
256-
app.add_description_unit('opcode', 'opcode', '%s (opcode)',
257-
parse_opcode_signature)
258-
app.add_description_unit('pdbcommand', 'pdbcmd', '%s (pdb command)',
259-
parse_pdb_command)
260-
app.add_description_unit('2to3fixer', '2to3fixer', '%s (2to3 fixer)')
256+
app.add_object_type('opcode', 'opcode', '%s (opcode)', parse_opcode_signature)
257+
app.add_object_type('pdbcommand', 'pdbcmd', '%s (pdb command)', parse_pdb_command)
258+
app.add_object_type('2to3fixer', '2to3fixer', '%s (2to3 fixer)')
261259
app.add_directive_to_domain('py', 'decorator', PyDecoratorFunction)
262260
app.add_directive_to_domain('py', 'decoratormethod', PyDecoratorMethod)
263261
return {'version': '1.0', 'parallel_read_safe': True}
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)