Skip to content

Commit

Permalink
Change default value of intersphinx_disabled_reftypes
Browse files Browse the repository at this point in the history
See discussion in sphinx-doc#9459
  • Loading branch information
jakobandersen committed Oct 31, 2021
1 parent 4c19d9f commit 68abc2a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGES
Expand Up @@ -7,6 +7,13 @@ Dependencies
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
----------

Expand Down
6 changes: 5 additions & 1 deletion doc/usage/extensions/intersphinx.rst
Expand Up @@ -152,6 +152,10 @@ linking:

.. versionadded:: 4.3

.. versionchanged:: 5.0

Changed default value from an empty list to ``['std:doc']``.

A list of strings being either:

- the name of a specific reference type in a domain,
Expand All @@ -160,7 +164,7 @@ linking:
``std:*``, ``py:*``, or ``cpp:*``, or
- 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
resolved by intersphinx, skip resolution if it matches one of the
Expand Down
2 changes: 1 addition & 1 deletion sphinx/ext/intersphinx.py
Expand Up @@ -494,7 +494,7 @@ def setup(app: Sphinx) -> Dict[str, Any]:
app.add_config_value('intersphinx_mapping', {}, True)
app.add_config_value('intersphinx_cache_limit', 5, 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('builder-inited', load_mappings)
app.connect('missing-reference', missing_reference)
Expand Down

0 comments on commit 68abc2a

Please sign in to comment.