ó
mÜJ]c           @` s   d  d l  m Z m Z m Z m Z d  d l Z e j e ƒ Z d  d l	 Z	 d  d l
 Z
 d d l
 m Z d
 Z d d „ Z d d d d	 „ Z d S(   i    (   t   absolute_importt   divisiont   print_functiont   unicode_literalsNi   (   t   BokehDeprecationWarningu
   deprecatedu   warni   c         C` s   t  j |  t d | ƒd  S(   Nt
   stacklevel(   t   warningst   warnR   (   t   messageR   (    (    s5   lib/python2.7/site-packages/bokeh/util/deprecation.pyR   *   s    c         C` s2  t  |  t ƒ rÊ | d k s' | d k r6 t d ƒ ‚ n  t |  ƒ d k s_ t d „  |  Dƒ ƒ ru t d |  f ƒ ‚ n  d |  } d } | t d | d | d	 | ƒ } | d k	 r$| d
 | j ƒ  7} q$nZ t  |  t j	 ƒ r| d k oý | d k oý | d k st d ƒ ‚ n  |  } n t d ƒ ‚ t
 | ƒ d S(   u/    Issue a nicely formatted deprecation warning. u0   deprecated entity and a replacement are requiredi   c         s` s*   |  ]  } t  | t ƒ o! | d  k Vq d S(   i    N(   t
   isinstancet   int(   t   .0t   x(    (    s5   lib/python2.7/site-packages/bokeh/util/deprecation.pys	   <genexpr>4   s    u   invalid version tuple: %ru   %d.%d.%duS   %(old)s was deprecated in Bokeh %(since)s and will be removed, use %(new)s instead.t   oldt   sincet   newu    u;   deprecated(message) signature doesn't allow extra argumentsu*   expected a version tuple or string messageN(   R	   t   tuplet   Nonet
   ValueErrort   lent   allt   dictt   stript   sixt   string_typesR   (   t   since_or_msgR   R   t   extraR   R   (    (    s5   lib/python2.7/site-packages/bokeh/util/deprecation.pyt
   deprecated-   s     )
$	(   u
   deprecatedu   warn(   t
   __future__R    R   R   R   t   loggingt	   getLoggert   __name__t   logR   R   R   t   __all__R   R   R   (    (    (    s5   lib/python2.7/site-packages/bokeh/util/deprecation.pyt   <module>   s   " 