o
    Ni                     @  s   U d Z ddlmZ dZddlmZ ddlZddlmZ ddl	m
Z
mZmZ ddlmZmZmZmZmZmZmZmZmZ dd	lmZ erOdd
lmZ ddlmZ dddZdeddfiZded< dddZ dS )a  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.
    )annotations)InventoryAdapterfetch_inventoryload_mappingsvalidate_intersphinx_mappingIntersphinxRoleResolverinventory_existsinstall_dispatcherresolve_reference_in_inventoryresolve_reference_any_inventory"resolve_reference_detect_inventorymissing_referenceIntersphinxDispatcherIntersphinxRoleinspect_main)TYPE_CHECKINGN)r   )r   r   r   )	r   r   r   r	   r   r   r   r   r
   )r   )Sphinx)ExtensionMetadataappr   returnr   c                 C  s   |  di d |  ddd |  dd d |  ddgd | jd	td
d | dt | dt | dt | t tj	dddS )Nintersphinx_mappingenvintersphinx_cache_limit    intersphinx_timeoutintersphinx_disabled_reftypeszstd:doczconfig-initedi   )priorityzbuilder-initedzsource-readzmissing-reference   T)versionenv_versionparallel_read_safe)
add_config_valueconnectr   r   r	   r   add_post_transformr   sphinx__display_version__)r    r'   S/home/ubuntu/.local/lib/python3.10/site-packages/sphinx/ext/intersphinx/__init__.pysetupA   s   
r)   normalize_intersphinx_mappingz3sphinx.ext.intersphinx.validate_intersphinx_mapping)
   r   z.dict[str, tuple[object, str, tuple[int, int]]]_DEPRECATED_OBJECTSnamestrobjectc                 C  sN   | t vrdtd| }t|ddlm} t |  \}}}|t| ||d |S )Nzmodule z has no attribute r   )_deprecation_warning)remove)r,   __name__AttributeErrorsphinx.deprecationr0   )r-   msgr0   deprecated_objectcanonical_namer1   r'   r'   r(   __getattr__\   s   r8   )r   r   r   r   )r-   r.   r   r/   )!__doc__
__future__r   __all__typingr   r%   sphinx.ext.intersphinx._clir   sphinx.ext.intersphinx._loadr   r   r   sphinx.ext.intersphinx._resolver   r   r   r	   r   r   r   r   r
   sphinx.ext.intersphinx._sharedr   sphinx.applicationr   sphinx.util.typingr   r)   r,   __annotations__r8   r'   r'   r'   r(   <module>   s(    ,
	