
\c           @   su  d  Z  d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l	 m
 Z
 d d l m Z m Z d d l m Z d d	 l m Z d d
 l m Z m Z d d l m Z d d l m Z d d l m Z m Z m Z m Z d d l m  Z  d d l! m" Z" d d l# m$ Z$ m% Z% m& Z& d d l# m' Z' d d l( m) Z) d d l* m+ Z+ d d l, m- Z- d d l. m/ Z/ d d l0 m1 Z1 m2 Z2 d d l3 m4 Z4 e5 rgd d l6 m7 Z7 m8 Z8 m9 Z9 m: Z: m; Z; m< Z< m= Z= m> Z> m? Z? m@ Z@ mA ZA mB ZB mC ZC d d lD mE ZE d d lF mG ZG d d lH mI ZI d d lJ mK ZK d d lL mM ZM n  e' jN eO  ZP i e5 d 6eQ d 6d  d! 6d d" 6d# d$ 6d d% 6d& d' 6e5 d( 6e5 d) 6d* d+ 6eQ d, 6g  d- 6ZS d. e jT d/ d0 ZU d1 ZV d0 ZW d2 ZX d3 ZY i e  d4  eW 6e  d5  eX 6e  d6  eY 6ZZ i e5 d7 6e/ d8 6e4 d9 6Z[ d: e\ f d;     YZ] d< e^ f d=     YZ_ d S(>   s   
    sphinx.environment
    ~~~~~~~~~~~~~~~~~~

    Global creation environment.

    :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
iN(   t   defaultdict(   t   copy(   t   path(   t   get_source_line(   t   BytesIOt   next(   t   cPickle(   t   addnodes(   t   RemovedInSphinx20Warningt   RemovedInSphinx30Warning(   t   IndexEntries(   t   TocTree(   t   SphinxErrort   BuildEnvironmentErrort   DocumentErrort   ExtensionError(   t   __(   t   SphinxTransformer(   t   get_matching_docst   DownloadFilest   FilenameUniqDict(   t   logging(   t   LoggingReporter(   t   find_catalog_files(   t   compile_matchers(   t   is_translatable(   t   SEPt   relpath(   t   is_commentable(   t   Anyt   Callablet   Dictt   IOt   Iteratort   Listt   Optionalt   Patternt   Sett   Tuplet   Typet   Uniont	   Generator(   t   nodes(   t   Sphinx(   t   Builder(   t   Config(   t   Domaint   embed_stylesheett   cloak_email_addressess    https://www.python.org/dev/peps/t   pep_base_urlt   pep_referencess   https://tools.ietf.org/html/t   rfc_base_urlt   rfc_referencess	   utf-8-sigt   input_encodingt   doctitle_xformt   sectsubtitle_xformi   t
   halt_levelt   file_insertion_enabledt   smartquotes_localesi6   i    i   i   i   i   s
   new configs   config changeds   extensions changedt   nonet   textt   commentablet   NoUric           B   s   e  Z d  Z RS(   s8   Raised by get_relative_uri if there is no URI available.(   t   __name__t
   __module__t   __doc__(    (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR>   \   s   t   BuildEnvironmentc           B   sH  e  Z d  Z d6 Z d6 d  Z d   Z d   Z d   Z d   Z	 d   Z
 d   Z d   Z d6 d	  Z d
   Z d   Z d   Z d   Z e d6 d  Z d6 d  Z d   Z d   Z d   Z d   Z e d    Z d d  Z d   Z d   Z d   Z d   Z d   Z  d   Z! d   Z" d   Z# d6 e e$ d  Z% e d  e$ e$ e$ d!  Z& d"   Z' d#   Z( e e) j* d$  d%  Z+ d&   Z, d'   Z- d(   Z. d)   Z/ d*   Z0 d6 d+  Z1 d,   Z2 e d-    Z3 e4 d6 d.   Z5 e6 d6 d/   Z7 e6 d0    Z8 e4 d1    Z9 e6 d2    Z: d3   Z; e d4    Z< d5   Z= RS(7   s   
    The environment in which the ReST files are translated.
    Stores an inventory of cross-file targets and provides doctree
    transformations to resolve links to them.
    c         C   s  d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ i  |  _	 t
 j   |  _ |  |  j d <d  |  _ t   |  _ i  |  _ t t  |  _ t t  |  _ t   |  _ t t  |  _ i  |  _ i  |  _ i  |  _ i  |  _ i  |  _ i  |  _ i  |  _ i  |  _ t   |  _ t   |  _  i  |  _! i  |  _" t#   |  _$ t%   |  _& i  |  _' i  |  _( i  |  _) | r|  j* |  n  d  S(   Nt   env(+   t   Nonet   appt
   doctreedirt   srcdirt   configt   config_statust   versiont   versioning_conditiont   versioning_comparet   domainst   default_settingsR   t   settingst	   _warnfunct   sett
   found_docst   all_docsR    t   dependenciest   includedt   reread_alwayst   dictt   metadatat   titlest
   longtitlest   tocst   toc_num_entriest   toc_secnumberst   toc_fignumberst   toctree_includest   files_to_rebuildt   glob_toctreest   numbered_toctreest
   domaindatat   indexentriesR   t   imagesR   t   dlfilest   original_image_urit	   temp_datat   ref_contextt   setup(   t   selfRE   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   __init__l   sJ    																								c         C   s)   |  j  j   } | j d d d i   | S(   s'   Obtains serializable data for pickling.RE   RM   N(   t   __dict__R   t   updateRD   (   Rk   Rm   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   __getstate__   s    c         C   s   |  j  j |  d  S(   N(   Rm   Rn   (   Rk   t   state(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   __setstate__   s    c         C   s   |  j  r9 |  j  | j j |  k r9 t t d    n0 |  j ri |  j | j k ri t t d    n  | |  _ | j |  _ | j |  _ | j j |  |  _  i  |  _ x* | j j	 |   D] } | |  j | j
 <q W|  j | j  |  j | j  d S(   s   Set up BuildEnvironment object.s%   build environment version not currents   source directory has changedN(   RJ   t   registryt   get_envversionR   R   RG   RE   RF   RM   t   create_domainst   namet   _update_configRH   t   _update_settings(   Rk   RE   t   domain(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyRj      s    $		c         C   s   t  |  _ |  j d k r$ t |  _ na x= | j d  D], } |  j | j | j k r4 t |  _ Pq4 q4 W|  j j	 | j	 k r t
 |  _ n  | |  _ d S(   s!   Update configurations by new one.RC   N(   t	   CONFIG_OKRI   RH   RD   t
   CONFIG_NEWt   filterRu   t   valuet   CONFIG_CHANGEDt
   extensionst   CONFIG_EXTENSIONS_CHANGED(   Rk   RH   t   item(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyRv      s    		c         C   sM   | j  |  j d <| j |  j d <| j p, d |  j d <|  j j d t  d S(   s   Update settings by new config.R5   t   trim_footnote_reference_spacet   ent   language_codet   smart_quotesN(   t   source_encodingRO   R   t   languaget
   setdefaultt   True(   Rk   RH   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyRw   
  s    c         C   s   t  j d t d d d  S(   NsF   env.set_warnfunc() is now deprecated. Use sphinx.util.logging instead.t
   stackleveli   (   t   warningst   warnR   (   Rk   t   func(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   set_warnfunc  s    	c         C   si   | t  k r t d |   n  t  | } |  j d | f k rS t t d    n  | |  _ | |  _ d S(   sX  This sets the doctree versioning method for this environment.

        Versioning methods are a builder property; only builders with the same
        versioning method can share the same doctree directory.  Therefore, we
        raise an exception if the user tries to use an environment with an
        incompatible versioning method.
        s   invalid versioning method: %rsd   This environment is incompatible with the selected builder, please choose another doctree directory.N(   t   versioning_conditionst
   ValueErrorRK   RD   R   R   RL   (   Rk   t   methodt   comparet	   condition(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   set_versioning_method  s    	
	c         K   s#   |  j  j | d | | f | d S(   s   Emit a warning.

        This differs from using ``app.warn()`` in that the warning may not
        be emitted instantly, but collected for emitting all warnings after
        the update of the environment.
        t   locationN(   RE   R   (   Rk   t   docnamet   msgt   linenot   kwargs(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR   ,  s    c         K   s!   |  j  | d t |  |  d S(   sA   Like :meth:`warn`, but with source information taken from *node*.s   %s:%sN(   RP   R   (   Rk   R   t   nodeR   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt	   warn_node6  s    c         C   ss   | |  j  k rH |  j  j | d  |  j j | d  |  j j |  n  x$ |  j j   D] } | j |  qX Wd S(   s4   Remove all traces of a source file in the inventory.N(	   RS   t   popRD   RU   RV   t   discardRM   t   valuest	   clear_doc(   Rk   R   Rx   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR   ;  s    c   	         s  t       xX   D]P } | j | |  j | <| j | |  j | <| | j k r |  j j |  q q WxI | j j   D]8 \ } } |  j j | g   j   f d   | D  qw Wx4 |  j	 j   D]# \ } } | j
   | j |  q W| j d |    |  d S(   s   Merge global information gathered about *docnames* while reading them
        from the *other* environment.

        This possibly comes from a parallel build process.
        c         3   s%   |  ] } | d    k r | Vq d S(   i   N(    (   t   .0t   change(   t   docnames(    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pys	   <genexpr>V  s    s   env-merge-infoN(   RQ   RS   RU   RV   t   addt   versionchangest   itemsR   t   extendRM   t   merge_domaindataRc   t   emit(	   Rk   R   t   otherRE   R   RJ   t   changest
   domainnameRx   (    (   R   s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   merge_info_fromF  s    c         C   s`   | j  |  j  r' t | |  j  } n  x2 |  j j D]$ } | j |  r4 | t |   Sq4 Wd S(   s   Return the docname for the filename if the file is document.

        *filename* should be absolute or relative to the source directory.
        N(   t
   startswithRG   R   RH   t   source_suffixt   endswitht   lenRD   (   Rk   t   filenamet   suffix(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   path2doc\  s    c         C   s   | j  t t j  } | d k r t t |  j j   } xC |  j j D]2 } t j	 t j
 |  j |  |  rF | } PqF qF Wn  | t k r t j
 |  j |  | S| d k r | | St j
 | |  | Sd S(   sE  Return the filename for the document name.

        If *base* is True, return absolute path under self.srcdir.
        If *base* is None, return relative path to self.srcdir.
        If *base* is a path string, return absolute path under that.
        If *suffix* is not None, add it instead of config.source_suffix.
        N(   t   replaceR   R   t   sepRD   R   t   iterRH   R   t   isfilet   joinRG   R   (   Rk   R   t   baseR   t   candidate_suffix(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   doc2pathi  s    	
c         C   s   | j  d  s! | j  t j  r. | d } n9 t j |  j | pF |  j d d  } t j | |  } y& | t j	 t j |  j
 |   f SWnE t k
 r | j t j    } | t j	 t j |  j
 |   f SXd S(   s+  Return paths to a file referenced from a document, relative to
        documentation root and absolute.

        In the input "filename", absolute filenames are taken as relative to the
        source dir, while relative filenames are relative to the dir of the
        containing document.
        t   /i   R   N(   R   t   osR   R   t   dirnameR   R   RD   R   t   abspathRG   t   UnicodeDecodeErrort   encodet   syst   getfilesystemencoding(   Rk   R   R   t   rel_fnt   docdirt
   enc_rel_fn(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt
   relfn2path  s    	!&c         C   s\  y#t  | j | j | j   d d d d g  } t   |  _ xm t |  j | j d | D]P } t	 j
 |  j |  t	 j  r |  j j |  q\ t j t d  d | q\ W| j r"xf |  j D]X } t | |  j |  j j |  j j |  j j  } x" | D] } |  j | j |  q Wq Wn  Wn2 t k
 rW} t t d  |  j | f   n Xd	 S(
   sY   Find all source files in the source dir and put them in
        self.found_docs.
        s   **/_sourcess   .#*s   **/.#*s
   *.lproj/**t   exclude_matcherss   document not readable. Ignored.R   s"   Failed to scan documents in %s: %rN(   R   t   exclude_patternst   templates_patht   get_asset_pathsRQ   RR   R   RG   R   R   t   accessR   t   R_OKR   t   loggert   warningR   t   use_message_catalogR   RH   t   locale_dirsR   t   gettext_compactRT   t   EnvironmentErrorR   (   Rk   RH   t   buildert   matchersR   t   catalog_filesR   t   exc(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt
   find_files  s,    			#c         C   s  t  |  j  |  j } t    } t    } | r: |  j } noxl|  j D]a} | |  j k rl | j |  qD n  t j |  j | |  j d   s | j |  qD n  | |  j k r | j |  qD n  |  j | } t j	 |  j |   } | | k r| j |  qD n  x |  j
 | D] } ye t j |  j |  }	 t j |	  sR| j |  Pn  t j	 |	  }
 |
 | k r~| j |  Pn  Wqt k
 r| j |  PqXqWqD W| | | f S(   s&   Return (added, changed, removed) sets.s   .doctree(   RQ   RS   RR   R   R   R   R   RF   RV   t   getmtimeRT   R   RG   R   (   Rk   t   config_changedt   removedt   addedt   changedR   t   mtimet   newmtimet   dept   deppatht   depmtime(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   get_outdated_files  sF    		c         c   s_   g  } x' | j  d |   D] } | j |  q Wx( t |  D] } | | k r= | Vq= q= Wd  S(   Ns   env-get-updated(   R   R   RQ   (   Rk   RE   t   alreadyt
   to_rewriteR   R   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   check_dependents  s    c         C   sC   | |  j  d <|  j j |  j  d <|  j j |  j j  |  j  d <d S(   s*   Prepare to set up environment for reading.R   t   default_rolet   default_domainN(   Rh   RH   R   RM   t   gett   primary_domain(   Rk   R   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   prepare_settings  s    c         C   s   |  j  d S(   s;   Returns the docname of the document currently being parsed.R   (   Rh   (   Rk   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR     s    t    c         C   s4   | d } |  j  j | d  } | d |  j  | <| S(   s   Return a serial number, e.g. for index entry targets.

        The number is guaranteed to be unique in the current document.
        t   serialnoi    i   (   Rh   R   (   Rk   t   categoryt   keyt   cur(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   new_serialno  s    
c         C   s   |  j  |  j j |  d S(   s   Add *filename* as a dependency of the current document.

        This means that the document will be rebuilt if this file changes.

        *filename* should be absolute or relative to the source directory.
        N(   RT   R   R   (   Rk   R   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   note_dependency  s    c         C   s$   |  j  |  j j |  j |   d S(   s   Add *filename* as a included from other document.

        This means the document is not orphaned.

        *filename* should be absolute or relative to the source directory.
        N(   RU   R   R   R   (   Rk   R   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   note_included'  s    c         C   s   |  j  j |  j  d S(   sx   Add the current document to the list of documents that will
        automatically be re-read at the next build.
        N(   RV   R   R   (   Rk   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   note_reread1  s    c         C   s0   t  j d t d d t |   j | |  d S(   sm   Note a TOC tree directive in a document and gather information about
        file relations from it.
        sZ   env.note_toctree() is deprecated. Use sphinx.environment.adapters.toctree.TocTree instead.R   i   N(   R   R   R   R   t   note(   Rk   R   t   toctreenode(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   note_toctree8  s    	c         C   s,   t  j d t d d t |   j | |  S(   s7   Return a TOC nodetree -- for use on the same page only!sX   env.get_toc_for() is deprecated. Use sphinx.environment.adapters.toctre.TocTree instead.R   i   (   R   R   R   R   t   get_toc_for(   Rk   R   R   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR   B  s    	c         K   s2   t  j d t d d t |   j | | | |  S(   s   Return the global TOC nodetree.s\   env.get_toctree_for() is deprecated. Use sphinx.environment.adapters.toctre.TocTree instead.R   i   (   R   R   R   R   t   get_toctree_for(   Rk   R   R   t   collapset   kwds(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR   J  s    	c         C   s=   y |  j  | SWn' t k
 r8 t t d  |   n Xd S(   s   Return the domain instance with the specified name.

        Raises an ExtensionError if the domain is not registered.
        s   Domain %r is not registeredN(   RM   t   KeyErrorR   R   (   Rk   R   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt
   get_domainR  s    c         C   sg   |  j  | |  j d  } t | d   } t j |  } Wd QX|  | j _ t |  j  |   | _ | S(   s:   Read the doctree for a file from the pickle and return it.s   .doctreet   rbN(	   R   RF   t   opent   picklet   loadRO   RC   R   t   reporter(   Rk   R   t   doctree_filenamet   ft   doctree(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   get_doctree_  s    c      	   C   s   | d k r |  j |  } n  |  j | |  xj | j t j  D]V } t |   j | | | d | d | } | d k r | j g   qA | j |  qA W| S(   sg   Read the doctree from the pickle, resolve cross-references and
        toctrees and return it.
        t   prunet   includehiddenN(	   RD   R  t   apply_post_transformst   traverseR   t   toctreeR   t   resolvet   replace_self(   Rk   R   R   R  t   prune_toctreesR  R   t   result(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   get_and_resolve_doctreei  s    	i    c	   	   	   C   s(   t  |   j | | | | | | | |  S(   s   Resolve a *toctree* node into individual bullet lists with titles
        as items, returning None (if no containing titles are found) or
        a new node.

        If *prune* is True, the tree is pruned to *maxdepth*, or if that is 0,
        to the value of the *maxdepth* option on the *toctree* node.
        If *titles_only* is True, only toplevel document titles will be in the
        resulting tree.
        If *collapse* is True, all branches not containing docname will
        be collapsed.
        (   R   R  (	   Rk   R   R   R
  R  t   maxdeptht   titles_onlyR   R  (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   resolve_toctree  s    	c         C   s   |  j  | |  d  S(   N(   R  (   Rk   R  t   fromdocnameR   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   resolve_references  s    c         C   s   z\ t  |  j  } | |  j d <t |  } | j |   | j |  j j j    | j   Wd | |  _ X|  j j	 d | |  d S(   s   Apply all post-transforms.R   Ns   doctree-resolved(
   R   Rh   R   t   set_environmentt   add_transformsRE   Rr   t   get_post_transformst   apply_transformsR   (   Rk   R  R   t   backupt   transformer(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR    s    
s   (.*) ([(][^()]*[)])c         C   s5   t  j d t d d t |   j | d | d | S(   Nsd   env.create_index() is deprecated. Use sphinx.environment.adapters.indexentreis.IndexEntries instead.R   i   t   group_entriest   _fixre(   R   R   R   R
   t   create_index(   Rk   R   R  R  (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR    s
    	c            s   t         f d    i  }  d    j j  } d  } t |  \ } } x9 | D]1 \ } } | | | g | | <| } | } | } qX W| | d  g | | <| S(   Nc         3   s   |  | k r) t  j t d  d | d  S|  | f V j |  xg   j j |  pY g  D]M } xD  | |  D]3 \ } } |  k rp | | f V j |  qp qp WqZ Wd  S(   Ns'   self referenced toctree found. Ignored.R   (   R   R   R   R   R_   R   (   t   parentR   t   childt	   subparentt
   subdocname(   Rk   t   traverse_toctreet	   traversed(    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR"    s    (   RQ   RD   RH   t
   master_docR   (   Rk   t	   relationsR   t   prevdocR  R   t
   nextparentt   nextdoc(    (   Rk   R"  R#  s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   collect_relations  s    	
c         C   s   t    j |  j j     } x t |  j  D]t } | |  j k r+ | |  j j k rX q+ n  | | k rj q+ n  d |  j	 | k r q+ n  t
 j t d  d | q+ q+ Wx! |  j j   D] } | j   q W|  j j d |   d S(   s   Do consistency checks.t   orphans&   document isn't included in any toctreeR   s   env-check-consistencyN(   RQ   t   unionRU   R   t   sortedRS   R`   RH   R$  RX   R   R   R   RM   t   check_consistencyRE   R   (   Rk   RU   R   Rx   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR-    s    c         C   s&   t  j d t d d |  j j j   S(   Ns>   env.update() is deprecated. Please use builder.read() instead.R   i   (   R   R   R	   RE   R   t   read(   Rk   RH   RG   RF   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyRn     s    	c         C   s)   t  j d t d d |  j j j |  S(   NsD   env._read_serial() is deprecated. Please use builder.read() instead.R   i   (   R   R   R	   RE   R   t   _read_serial(   Rk   R   RE   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR/    s    	c         C   s,   t  j d t d d |  j j j | |  S(   NsF   env._read_parallel() is deprecated. Please use builder.read() instead.R   i   (   R   R   R	   RE   R   t   _read_parallel(   Rk   R   RE   t   nproc(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR0    s    	c         C   s-   t  j d t d d |  j j j |  d  S(   NsD   env.read_doc() is deprecated. Please use builder.read_doc() instead.R   i   (   R   R   R	   RE   R   t   read_doc(   Rk   R   RE   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR2    s    	c         C   s0   t  j d t d d |  j j j | |  d  S(   NsN   env.write_doctree() is deprecated. Please use builder.write_doctree() instead.R   i   (   R   R   R	   RE   R   t   write_doctree(   Rk   R   R  (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR3    s    	c         C   s    t  j d t d d |  j j S(   NsL   env._nitpick_ignore is deprecated. Please use config.nitpick_ignore instead.R   i   (   R   R   R	   RH   t   nitpick_ignore(   Rk   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   _nitpick_ignore  s    	c         C   ss   t  j d t d d y t j |   } Wn t k
 rJ } t |   n X| ro | | _ | j j	 | j _	 n  | S(   NsH   BuildEnvironment.load() is deprecated. Please use pickle.load() instead.R   i   (
   R   R   R	   R   R   t	   Exceptiont   IOErrorRE   RH   R   (   R  RE   RC   R   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR     s    		c         C   s2   t  j d t d d t |  } |  j | |  S(   NsJ   BuildEnvironment.loads() is deprecated. Please use pickle.loads() instead.R   i   (   R   R   R	   R   R   (   t   clst   stringRE   t   io(    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   loads%  s    	c         C   sB   t  j d t d d t | d   } |  j | |  SWd  QXd  S(   NsN   BuildEnvironment.frompickle() is deprecated. Please use pickle.load() instead.R   i   R   (   R   R   R	   R   R   (   R8  R   RE   R  (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt
   frompickle.  s    	c         C   s0   t  j d t d d t j |  | t j  d  S(   NsH   BuildEnvironment.dump() is deprecated. Please use pickle.dump() instead.R   i   (   R   R   R	   R   t   dumpt   HIGHEST_PROTOCOL(   RC   R  (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR=  7  s    	c         C   s9   t  j d t d d t   } |  j | |  | j   S(   NsJ   BuildEnvironment.dumps() is deprecated. Please use pickle.dumps() instead.R   i   (   R   R   R	   R   R=  t   getvalue(   R8  RC   R:  (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   dumps?  s
    		c         C   sB   t  j d t d d t | d   } |  j |  |  Wd  QXd  S(   Ns?   env.topickle() is deprecated. Please use pickle.dump() instead.R   i   t   wb(   R   R   R	   R   R=  (   Rk   R   R  (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   topickleI  s    	c         C   s%   t  j d t d d |  j d d S(   NsG   env.versionchanges() is deprecated. Please use ChangeSetDomain instead.R   i   t	   changesetR   (   R   R   R	   Rc   (   Rk   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyR   Q  s    	c         C   sM   t  j d t d d | | d <| | d <| | _ |  j d  j |  d  S(   Ns\   env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.R   i   t   typeRJ   RC  (   R   R   R	   t   lineR   t   note_changeset(   Rk   RD  RJ   R   R   (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   note_versionchangeY  s    	

	N(>   R?   R@   RA   RD   RM   Rl   Ro   Rq   Rj   Rv   Rw   R   R   R   R   R   R   R   R   R   R   R   R   R   R   t   propertyR   R   R   R   R   R   R   R   R   R  t   FalseR  R  R  R  t   ret   compileR  R)  R-  Rn   R/  R0  R2  R3  R5  t   staticmethodR   t   classmethodR;  R<  R=  R@  RB  R   RG  (    (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyRB   a   sr   f					
		
					(	3			
	
		
				
				"						
	(`   RA   R   RJ  R   R   t   collectionsR    R   R   t   docutils.utilsR   t   sixR   R   t	   six.movesR   R   t   sphinxR   t   sphinx.deprecationR   R	   t(   sphinx.environment.adapters.indexentriesR
   t#   sphinx.environment.adapters.toctreeR   t   sphinx.errorsR   R   R   R   t   sphinx.localeR   t   sphinx.transformsR   t   sphinx.utilR   R   R   R   t   sphinx.util.docutilsR   t   sphinx.util.i18nR   t   sphinx.util.matchingR   t   sphinx.util.nodesR   t   sphinx.util.osutilR   R   t   sphinx.util.websupportR   RI  t   typingR   R   R   R    R!   R"   R#   R$   R%   R&   R'   R(   R)   t   docutilsR*   t   sphinx.applicationR+   t   sphinx.buildersR,   t   sphinx.configR-   t   sphinx.domainsR.   t	   getLoggerR?   R   R   RD   RN   t   version_infot   ENV_VERSIONRy   Rz   R}   R   t   CONFIG_CHANGED_REASONR   R6  R>   t   objectRB   (    (    (    s:   lib/python2.7/site-packages/sphinx/environment/__init__.pyt   <module>
   sz   "X

