]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-34967: Sphinx is deprecating add_description_unit, use add_object_type (GH-9827)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 16 Oct 2018 06:47:26 +0000 (23:47 -0700)
committerGitHub <noreply@github.com>
Tue, 16 Oct 2018 06:47:26 +0000 (23:47 -0700)
(cherry picked from commit e385d0661ecf8bc9ba95c4395d9a11262c2cbfec)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
Doc/tools/extensions/pyspecific.py
Misc/NEWS.d/next/Documentation/2018-10-13-07-39-57.bpo-34967.E40tFP.rst [new file with mode: 0644]

index 8c45274bb27b51c4184f18e798da25d4f1805259..6378f76bdc2cf14cb50d49bd8a06323b867902e9 100644 (file)
@@ -253,11 +253,9 @@ def setup(app):
     app.add_directive('impl-detail', ImplementationDetail)
     app.add_builder(PydocTopicsBuilder)
     app.add_builder(suspicious.CheckSuspiciousMarkupBuilder)
-    app.add_description_unit('opcode', 'opcode', '%s (opcode)',
-                             parse_opcode_signature)
-    app.add_description_unit('pdbcommand', 'pdbcmd', '%s (pdb command)',
-                             parse_pdb_command)
-    app.add_description_unit('2to3fixer', '2to3fixer', '%s (2to3 fixer)')
+    app.add_object_type('opcode', 'opcode', '%s (opcode)', parse_opcode_signature)
+    app.add_object_type('pdbcommand', 'pdbcmd', '%s (pdb command)', parse_pdb_command)
+    app.add_object_type('2to3fixer', '2to3fixer', '%s (2to3 fixer)')
     app.add_directive_to_domain('py', 'decorator', PyDecoratorFunction)
     app.add_directive_to_domain('py', 'decoratormethod', PyDecoratorMethod)
     return {'version': '1.0', 'parallel_read_safe': True}
diff --git a/Misc/NEWS.d/next/Documentation/2018-10-13-07-39-57.bpo-34967.E40tFP.rst b/Misc/NEWS.d/next/Documentation/2018-10-13-07-39-57.bpo-34967.E40tFP.rst
new file mode 100644 (file)
index 0000000..6341296
--- /dev/null
@@ -0,0 +1,2 @@
+Use app.add_object_type() instead of the deprecated Sphinx function
+app.description_unit()