From db88166a3f5fa9335def587d6da0407a92a29475 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 17 Jun 2017 10:47:35 +0900 Subject: [PATCH] Fix #3866: Suppress a new warning type: python refs --- CHANGES | 4 ++++ doc/config.rst | 1 + sphinx/domains/python.py | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 6e1c01609..f72412c83 100644 --- a/CHANGES +++ b/CHANGES @@ -68,6 +68,10 @@ Deprecated Features added -------------- +* Now :confval:`suppress_warnings` accepts following configurations: + + - ``ref.python`` (ref: #3866) + Bugs fixed ---------- diff --git a/doc/config.rst b/doc/config.rst index 74943c904..88b7f11fc 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -239,6 +239,7 @@ General configuration * ref.citation * ref.footnote * ref.doc + * ref.python * misc.highlighting_failure * toc.secnum * epub.unknown_project_files diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index eb6fe76cb..bc8423968 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -833,7 +833,7 @@ class PythonDomain(Domain): elif len(matches) > 1: logger.warning('more than one target found for cross-reference %r: %s', target, ', '.join(match[0] for match in matches), - location=node) + type='ref', subtype='python', location=node) name, obj = matches[0] if obj[1] == 'module':