module documentation

Insert links to objects documented in remote Sphinx documentation.

This works as follows:

  • Each Sphinx HTML build creates a file named "objects.inv" that contains a mapping from object names to URIs relative to the HTML set's root.
  • Projects using the Intersphinx extension can specify links to such mapping files in the intersphinx_mapping config value. The mapping will then be used to resolve otherwise missing references to objects into links to the other documentation.
  • By default, the mapping file is assumed to be at the same location as the rest of the documentation; however, the location of the mapping file can also be specified individually, e.g. if the docs should be buildable without Internet access.
Unknown Field: copyright
Copyright 2007-2022 by the Sphinx team, see AUTHORS.
Unknown Field: license
BSD, see LICENSE for details.
Variable logger Undocumented
Class ​Intersphinx​Dispatcher Custom dispatcher for external role.
Class ​Intersphinx​Role Undocumented
Class ​Intersphinx​Role​Resolver pending_xref node resolver for intersphinx role.
Class ​Inventory​Adapter Inventory adapter for environment
Function ​_create​_element​_from​_result Undocumented
Function ​_get​_safe​_url Gets version of url with basic auth passwords obscured. This function returns results suitable for printing and logging.
Function ​_read​_from​_url Reads data from url with an HTTP GET.
Function ​_resolve​_reference Undocumented
Function ​_resolve​_reference​_in​_domain Undocumented
Function ​_resolve​_reference​_in​_domain​_by​_target Undocumented
Function ​_strip​_basic​_auth Returns url with basic auth credentials removed. Also returns the basic auth username and password if they're present in url.
Function fetch​_inventory Fetch, parse and return an intersphinx inventory file.
Function fetch​_inventory​_group Undocumented
Function inspect​_main Debug functionality to print out an inventory
Function install​_dispatcher Enable IntersphinxDispatcher.
Function inventory​_exists Undocumented
Function load​_mappings Load all intersphinx mappings into the environment.
Function missing​_reference Attempt to resolve a missing reference via intersphinx references.
Function normalize​_intersphinx​_mapping Undocumented
Function resolve​_reference​_any​_inventory Attempt to resolve a missing reference via intersphinx references.
Function resolve​_reference​_detect​_inventory Attempt to resolve a missing reference via intersphinx references.
Function resolve​_reference​_in​_inventory Attempt to resolve a missing reference via intersphinx references.
Function setup Undocumented
logger =

Undocumented

def _create_element_from_result(domain, inv_name, data, node, contnode):

Undocumented

Parameters
domain:DomainUndocumented
inv​_name:Optional[str]Undocumented
data:InventoryItemUndocumented
node:pending_xrefUndocumented
contnode:TextElementUndocumented
Returns
ElementUndocumented
def _get_safe_url(url):

Gets version of url with basic auth passwords obscured. This function returns results suitable for printing and logging.

E.g.: https://user:12345@example.com => https://user@example.com

Parameters
url:stra url
Returns
strurl with password removed
def _read_from_url(url, config=None):

Reads data from url with an HTTP GET.

This function supports fetching from resources which use basic HTTP auth as laid out by RFC1738 § 3.1. See § 5 for grammar definitions for URLs.

Parameters
url:strURL of an HTTP resource
config:ConfigUndocumented
Returns
file-like objectdata read from resource described by url
def _resolve_reference(env, inv_name, inventory, honor_disabled_refs, node, contnode):

Undocumented

Parameters
env:BuildEnvironmentUndocumented
inv​_name:Optional[str]Undocumented
inventory:InventoryUndocumented
honor​_disabled​_refs:boolUndocumented
node:pending_xrefUndocumented
contnode:TextElementUndocumented
Returns
Optional[Element]Undocumented
def _resolve_reference_in_domain(env, inv_name, inventory, honor_disabled_refs, domain, objtypes, node, contnode):

Undocumented

Parameters
env:BuildEnvironmentUndocumented
inv​_name:Optional[str]Undocumented
inventory:InventoryUndocumented
honor​_disabled​_refs:boolUndocumented
domain:DomainUndocumented
objtypes:List[str]Undocumented
node:pending_xrefUndocumented
contnode:TextElementUndocumented
Returns
Optional[Element]Undocumented
def _resolve_reference_in_domain_by_target(inv_name, inventory, domain, objtypes, target, node, contnode):

Undocumented

Parameters
inv​_name:Optional[str]Undocumented
inventory:InventoryUndocumented
domain:DomainUndocumented
objtypes:List[str]Undocumented
target:strUndocumented
node:pending_xrefUndocumented
contnode:TextElementUndocumented
Returns
Optional[Element]Undocumented
def _strip_basic_auth(url):

Returns url with basic auth credentials removed. Also returns the basic auth username and password if they're present in url.

E.g.: https://user:pass@example.com => https://example.com

url need not include basic auth credentials.

Parameters
url:strurl which may or may not contain basic auth credentials
Returns
strurl with any basic auth creds removed
def fetch_inventory(app, uri, inv):
Fetch, parse and return an intersphinx inventory file.
Parameters
app:SphinxUndocumented
uri:strUndocumented
inv:AnyUndocumented
Returns
AnyUndocumented
def fetch_inventory_group(name, uri, invs, cache, app, now):

Undocumented

Parameters
name:strUndocumented
uri:strUndocumented
invs:AnyUndocumented
cache:AnyUndocumented
app:AnyUndocumented
now:floatUndocumented
Returns
boolUndocumented
def inspect_main(argv):
Debug functionality to print out an inventory
Parameters
argv:List[str]Undocumented
def install_dispatcher(app, docname, source):

Enable IntersphinxDispatcher.

Note

The installed dispatcher will uninstalled on disabling sphinx_domain automatically.

Parameters
app:SphinxUndocumented
docname:strUndocumented
source:List[str]Undocumented
def inventory_exists(env, inv_name):

Undocumented

Parameters
env:BuildEnvironmentUndocumented
inv​_name:strUndocumented
Returns
boolUndocumented
def load_mappings(app):
Load all intersphinx mappings into the environment.
Parameters
app:SphinxUndocumented
def missing_reference(app, env, node, contnode):
Attempt to resolve a missing reference via intersphinx references.
Parameters
app:SphinxUndocumented
env:BuildEnvironmentUndocumented
node:pending_xrefUndocumented
contnode:TextElementUndocumented
Returns
Optional[Element]Undocumented
def normalize_intersphinx_mapping(app, config):

Undocumented

Parameters
app:SphinxUndocumented
config:ConfigUndocumented
def resolve_reference_any_inventory(env, honor_disabled_refs, node, contnode):

Attempt to resolve a missing reference via intersphinx references.

Resolution is tried with the target as is in any inventory.

Parameters
env:BuildEnvironmentUndocumented
honor​_disabled​_refs:boolUndocumented
node:pending_xrefUndocumented
contnode:TextElementUndocumented
Returns
Optional[Element]Undocumented
def resolve_reference_detect_inventory(env, node, contnode):

Attempt to resolve a missing reference via intersphinx references.

Resolution is tried first with the target as is in any inventory. If this does not succeed, then the target is split by the first :, to form inv_name:newtarget. If inv_name is a named inventory, then resolution is tried in that inventory with the new target.

Parameters
env:BuildEnvironmentUndocumented
node:pending_xrefUndocumented
contnode:TextElementUndocumented
Returns
Optional[Element]Undocumented
def resolve_reference_in_inventory(env, inv_name, node, contnode):

Attempt to resolve a missing reference via intersphinx references.

Resolution is tried in the given inventory with the target as is.

Requires inventory_exists(env, inv_name).

Parameters
env:BuildEnvironmentUndocumented
inv​_name:strUndocumented
node:pending_xrefUndocumented
contnode:TextElementUndocumented
Returns
Optional[Element]Undocumented
def setup(app):

Undocumented

Parameters
app:SphinxUndocumented
Returns
Dict[str, Any]Undocumented