ó
öÀ„\c           @@  sÂ   d  Z  d d l m Z d d l Z d d l Z d d l m Z m Z d d l m	 Z	 d d l
 m Z e r£ d d l m Z m Z d d l m Z d d	 l m Z n  d
 „  Z d „  Z d „  Z d S(   sÉ   
    sphinx.util.compat
    ~~~~~~~~~~~~~~~~~~

    modules for backward compatibility

    :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
i    (   t   absolute_importN(   t   string_typest	   iteritems(   t   RemovedInSphinx30Warning(   t   import_object(   t   Anyt   Dict(   t   Sphinx(   t   Configc         C@  sq   | j  rm t j d t ƒ xQ t | j  ƒ D]= \ } } t | t ƒ rV t | d ƒ } n  |  j | | ƒ q) Wn  d  S(   Nsc   The config variable "source_parsers" is deprecated. Please use app.add_source_parser() API instead.s   source parser(	   t   source_parserst   warningst   warnR   R   t
   isinstanceR   R   t   add_source_parser(   t   appt   configt   suffixt   parser(    (    s1   lib/python2.7/site-packages/sphinx/util/compat.pyt   deprecate_source_parsers   s    		c         C@  s/   d t  j k r+ d d l m } |  | _ n  d S(   s5  Register application object to autosummary module.

    Since Sphinx-1.7, documenters and attrgetters are registered into
    applicaiton object.  As a result, the arguments of
    ``get_documenter()`` has been changed.  To keep compatibility,
    this handler registers application object to the module.
    s   sphinx.ext.autosummaryi    (   t   autosummaryN(   t   syst   modulest
   sphinx.extR   t   _app(   R   R   (    (    s1   lib/python2.7/site-packages/sphinx/util/compat.pyt$   register_application_for_autosummary)   s    	c         C@  s9   |  j  d t ƒ |  j  d t ƒ i d d 6t d 6t d 6S(   Ns   config-initeds   builder-initedt   builtint   versiont   parallel_read_safet   parallel_write_safe(   t   connectR   R   t   True(   R   (    (    s1   lib/python2.7/site-packages/sphinx/util/compat.pyt   setup7   s    (   t   __doc__t
   __future__R    R   R
   t   sixR   R   t   sphinx.deprecationR   t   sphinx.utilR   t   Falset   typingR   R   t   sphinx.applicationR   t   sphinx.configR   R   R   R   (    (    (    s1   lib/python2.7/site-packages/sphinx/util/compat.pyt   <module>
   s   		