From e2c3bc7e79c3506609845f7f62ba102e6c7e9993 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Mon, 15 Oct 2018 23:47:07 -0700 Subject: bpo-34967: Sphinx is deprecating add_description_unit, use add_object_type (GH-9827) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit e385d0661ecf8bc9ba95c4395d9a11262c2cbfec) Co-authored-by: Stéphane Wirtel --- Doc/tools/extensions/pyspecific.py | 8 +++----- .../next/Documentation/2018-10-13-07-39-57.bpo-34967.E40tFP.rst | 2 ++ 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 Misc/NEWS.d/next/Documentation/2018-10-13-07-39-57.bpo-34967.E40tFP.rst diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py index 02e7a13..5b2c315 100644 --- a/Doc/tools/extensions/pyspecific.py +++ b/Doc/tools/extensions/pyspecific.py @@ -388,11 +388,9 @@ def setup(app): app.add_directive('deprecated-removed', DeprecatedRemoved) 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) app.add_directive_to_domain('py', 'coroutinefunction', PyCoroutineFunction) 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 index 0000000..6341296 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2018-10-13-07-39-57.bpo-34967.E40tFP.rst @@ -0,0 +1,2 @@ +Use app.add_object_type() instead of the deprecated Sphinx function +app.description_unit() -- cgit v0.12