Change default value of intersphinx_disabled_reftypes

See discussion in sphinx-doc/sphinx#9459
This commit is contained in:
Jakob Lykke Andersen 2021-10-31 15:01:08 +01:00
parent 4c19d9f65a
commit 68abc2a122
3 changed files with 13 additions and 2 deletions

View File

@ -7,6 +7,13 @@ Dependencies
Incompatible changes Incompatible changes
-------------------- --------------------
* #2068: :confval:`intersphinx_disabled_reftypes` has changed default value
from an empty list to ``['std:doc']`` as avoid too surprising silent
intersphinx resolutions.
To migrate: either add an explicit inventory name to the references
intersphinx should resolve, or explicitly set the value of this configuration
variable to an empty list.
Deprecated Deprecated
---------- ----------

View File

@ -152,6 +152,10 @@ linking:
.. versionadded:: 4.3 .. versionadded:: 4.3
.. versionchanged:: 5.0
Changed default value from an empty list to ``['std:doc']``.
A list of strings being either: A list of strings being either:
- the name of a specific reference type in a domain, - the name of a specific reference type in a domain,
@ -160,7 +164,7 @@ linking:
``std:*``, ``py:*``, or ``cpp:*``, or ``std:*``, ``py:*``, or ``cpp:*``, or
- simply a wildcard ``*``. - simply a wildcard ``*``.
The default value is an empty list. The default value is ``['std:doc']``.
When a cross-reference without an explicit inventory specification is being When a cross-reference without an explicit inventory specification is being
resolved by intersphinx, skip resolution if it matches one of the resolved by intersphinx, skip resolution if it matches one of the

View File

@ -494,7 +494,7 @@ def setup(app: Sphinx) -> Dict[str, Any]:
app.add_config_value('intersphinx_mapping', {}, True) app.add_config_value('intersphinx_mapping', {}, True)
app.add_config_value('intersphinx_cache_limit', 5, False) app.add_config_value('intersphinx_cache_limit', 5, False)
app.add_config_value('intersphinx_timeout', None, False) app.add_config_value('intersphinx_timeout', None, False)
app.add_config_value('intersphinx_disabled_reftypes', [], True) app.add_config_value('intersphinx_disabled_reftypes', ['std:doc'], True)
app.connect('config-inited', normalize_intersphinx_mapping, priority=800) app.connect('config-inited', normalize_intersphinx_mapping, priority=800)
app.connect('builder-inited', load_mappings) app.connect('builder-inited', load_mappings)
app.connect('missing-reference', missing_reference) app.connect('missing-reference', missing_reference)