ó
Đ9Vc           @@  sĪ   d  Z  d d l m Z d d l Z d d l Z d e f d     YZ d e e f d     YZ d e e f d	     YZ	 e e	 g Z
 d a d d d
  Z d   Z d S(   sM   
A module that implments tooling to enable easy warnings about deprecations.
i    (   t   absolute_importNt   PipDeprecationWarningc           B@  s   e  Z RS(    (   t   __name__t
   __module__(    (    (    s2   /tmp/pip-build-5Z5nTX/pip/pip/utils/deprecation.pyR   
   s   t   RemovedInPip8Warningc           B@  s   e  Z RS(    (   R   R   (    (    (    s2   /tmp/pip-build-5Z5nTX/pip/pip/utils/deprecation.pyR      s   t   RemovedInPip9Warningc           B@  s   e  Z RS(    (   R   R   (    (    (    s2   /tmp/pip-build-5Z5nTX/pip/pip/utils/deprecation.pyR      s   c         C@  sŦ   | d  k	 r7 t d  k	 r§ t |  | | | | |  q§ np t | t  r t j d  } d |  } t | t  r~ | j |  q§ | j |  n t |  | | | | |  d  S(   Ns   pip.deprecationss   DEPRECATION: %s(	   t   Nonet   _warnings_showwarningt
   issubclassR   t   loggingt	   getLoggert   DeprecationWarningt   errort   warning(   t   messaget   categoryt   filenamet   linenot   filet   linet   loggert   log_message(    (    s2   /tmp/pip-build-5Z5nTX/pip/pip/utils/deprecation.pyt   _showwarning   s    
c           C@  s%   t  d  k r! t j a  t t _ n  d  S(   N(   R   R   t   warningst   showwarningR   (    (    (    s2   /tmp/pip-build-5Z5nTX/pip/pip/utils/deprecation.pyt   install_warning_logger?   s    	(   t   __doc__t
   __future__R    R	   R   t   WarningR   t   PendingDeprecationWarningR   R   t   DEPRECATIONSR   R   R   R   (    (    (    s2   /tmp/pip-build-5Z5nTX/pip/pip/utils/deprecation.pyt   <module>   s    