-
<c       s    d  Z    d k Z d k Z d k Z  d d d d d g Z  d Z 	 g  Z 
 h  Z  e d d	  Z	 , e e d
  Z
 a e d  Z g d   Z p d e d d d d  Z  d   Z  d e f d     YZ  d   Z  d   Z  d   Z  d   Z  d   Z  e d j o*  d k Z  e e i d < e   n*  e e i   e d d e d d d S(   s&   Python part of the warnings subsystem.Ns   warns   showwarnings   formatwarnings   filterwarningss   resetwarningss   defaulti   c 
   s     | t j o  t } n  t o t | t  p t   y  t i |  } Wn+  t j
 o  t i }  d } n X | i }  | i }  | i d  o  | d } n
  d }  | i d  }   | oG ! | i   } " | i d  p | i d  o # | d  } n n= % | d j o & t i d	 } n ' | o ( | } n ) | i d
 h   }	 * t |  | | | | |	  d S(   s:   Issue a warning, or maybe ignore it or raise an exception.i   s   __name__s   <string>s   __file__s   .pycs   .pyois   __main__i    s   __warningregistry__N(   s   categorys   Nones   UserWarnings	   __debug__s
   issubclasss   Warnings   AssertionErrors   syss	   _getframes
   stacklevels   callers
   ValueErrors   __dict__s   globalss   linenos	   f_globalss   f_linenos   has_keys   modules   gets   filenames   lowers   fnls   endswiths   argvs
   setdefaults   registrys   warn_explicits   message(
   s   messages   categorys
   stacklevels   globalss   callers   modules   filenames   linenos   fnls   registry(    (    s   /usr/lib/python2.2/warnings.pys   warn s2   !	
#c    s  , . | t j o8 / | } 0 | d i   d j o 1 | d  } n n 2 | t j o 3 h  } n 4 |  | | f } 6 | i	 |  o 7 d  Sn 9 x t
 D9 ]s } : | \ } } } }	 }
 ; | i |   o7 t | |  o' |	 i |  o |
 d j p
 | |
 j o ? Pn q WA t } C | d j o D d | | <E d  Sn F | d j o G | |    n I | d j oK J d | | <K |  | f } L t i	 |  o M d  Sn N d t | <n O | d j o P n Q | d	 j oN R d | | <S |  | d f } T | i	 |  o U d  Sn V d | | <nB W | d
 j o X d | | <n! [ t d | t |  f   _ t |  | | |  d  S(   Nis   .pyi    s   ignorei   s   errors   onces   alwayss   modules   defaults1   Unrecognized action (%s) in warnings.filters:
 %s(   s   modules   Nones   filenames   lowers   registrys   messages   categorys   linenos   keys   gets   filterss   items   actions   msgs   cats   mods   lns   matchs
   issubclasss   defaultactions   oncekeys   onceregistrys   altkeys   RuntimeErrors   strs   showwarning(   s   messages   categorys   filenames   linenos   modules   registrys   keys   actions   cats   mods   lns   altkeys   items   msgs   oncekey(    (    s   /usr/lib/python2.2/warnings.pys   warn_explicit, sL   	
 	M	 c    sI   a b c | t j o d t i } n e | i t |  | | |   d S(   s7   Hook to write a warning to a file; replace if you like.N(
   s   files   Nones   syss   stderrs   writes   formatwarnings   messages   categorys   filenames   lineno(   s   messages   categorys   filenames   linenos   file(    (    s   /usr/lib/python2.2/warnings.pys   showwarninga s   c    sw   g h i d k  } j d | | | i |  f } k | i | |  i   } l | o m | d | d } n n | Sd S(   s.   Function to format a warning the standard way.Ns   %s:%s: %s: %s
s     s   
(
   s	   linecaches   filenames   linenos   categorys   __name__s   messages   ss   getlines   strips   line(   s   messages   categorys   filenames   linenos	   linecaches   ss   line(    (    s   /usr/lib/python2.2/warnings.pys   formatwarningg s   
s    i    c    sv  p t u t  o. |  d d d d d d f j p t d |   w t  o t | t i  p
 t d  x t  o t | t i  p
 t d	  y t  o t	 | t
  p
 t d
  z t  o  t |  t i j p
 t d  { t  o- t |  t i j o
 | d j p
 t d  } |  t i | t i  | t i |  | f }  | o  t i |  n  t i d |  d S(   s   Insert an entry into the list of warnings filters (at the front).

    Use assertions to check that all arguments have the right type.s   errors   ignores   alwayss   defaults   modules   onces   invalid action: %ss   message must be a strings   category must be a classs#   category must be a Warning subclasss   module must be a stringi    s   lineno must be an int >= 0N(   s	   __debug__s   actions   AssertionErrors
   isinstances   messages   typess
   StringTypes   categorys	   ClassTypes
   issubclasss   Warnings   types   modules   linenos   IntTypes   res   compiles   Is   items   appends   filterss   insert(   s   actions   messages   categorys   modules   linenos   appends   item(    (    s   /usr/lib/python2.2/warnings.pys   filterwarningsp s   8''$*70
c      s      g  t  (d S(   s8   Reset the list of warnings filters to its default state.N(   s   filters(    (    (    s   /usr/lib/python2.2/warnings.pys   resetwarnings s   s   _OptionErrorc      s    t  Z d  Z   RS(   s,   Exception used by option processing helpers.(   s   __name__s
   __module__s   __doc__(    (    (    s   /usr/lib/python2.2/warnings.pys   _OptionError s   c    sc     xV |  D ]K }  y  t |  Wn.  t j
 o }  t i d I| IJn Xq Wd  S(   Ns   Invalid -W option ignored:(   s   argss   args
   _setoptions   _OptionErrors   msgs   syss   stderr(   s   argss   msgs   arg(    (    s   /usr/lib/python2.2/warnings.pys   _processoptions s   
 	c 	   s    |  i d  }  t |  d j o  t d |    n  x+  t |  d j  o  | i d  qI W g  i } | D ] } | | i    q ~ \ } } } } }  t |  }  t i |  }  t |  }  t i |  }  | o  | d } n  | oj  y0  t |  }  | d j  o  t  n Wn0  t t f j
 o  t d |   n Xn
  d }  t | | | | |  d  S(   Ns   :i   s   too many fields (max 5): %ss    s   $i    s   invalid lineno %s(   s   args   splits   partss   lens   _OptionErrors   appends   _[1]s   ss   strips   actions   messages   categorys   modules   linenos
   _getactions   res   escapes   _getcategorys   ints
   ValueErrors   OverflowErrors   filterwarnings(	   s   args   categorys   ss   modules   _[1]s   partss   actions   messages   lineno(    (    s   /usr/lib/python2.2/warnings.pys
   _setoption s.    1

	c    s     |  o  d Sn  |  d j o  d Sn  xA d d d d d d g D ]$ }  | i |   o  | Sn qP W t d |    d  S(	   Ns   defaults   alls   alwayss   ignores   modules   onces   errors   invalid action: %s(   s   actions   as
   startswiths   _OptionError(   s   actions   a(    (    s   /usr/lib/python2.2/warnings.pys
   _getaction s     	c    s    |  o  t Sn  t i d |   oG  y  t |   } Wn*  t j
 o  t d |    n Xn  |  i d  }  |  |  }  |  | d }  y  t | t t | g  } Wn*  t j
 o  t d |   n X y  t | |  } Wn*  t j
 o  t d |    n X t | t i  p t | t  o  t d |    n  | Sd  S(   Ns   ^[a-zA-Z0-9_]+$s   unknown warning category: %ss   .i   s   invalid module name: %ss   invalid warning category: %s(   s   categorys   Warnings   res   matchs   evals   cats	   NameErrors   _OptionErrors   rfinds   is   modules   klasss
   __import__s   Nones   ms   ImportErrors   getattrs   AttributeErrors
   isinstances   typess	   ClassTypes
   issubclass(   s   categorys   is   ms   modules   cats   klass(    (    s   /usr/lib/python2.2/warnings.pys   _getcategory s*   (c  
   s[    d  k  }  g  }  y&  | i  t i d d  \ }	 }  Wn2  | i j
 o  }  t i | IJ d  Sn X x' |	 D ] \ } }  | i |  q W y  t |  Wn/  t j
 o  }  t i | IJ d  Sn X x t D ] }  | GHq W d }  t |  t |  t |  t |   t | t   t | t   x$ t d  D ] }  t |  qlW t d d t d d   y  t |  Wn2  t j
 o# }  d G| i i d	 G| GHn
 X d
 GH t    y  t d d t d d  Wn2  t j
 o# }  d G| i i d	 G| GHn
 X d
 GHd  S(   Ni   s   W:s   hello worldi   s   errors    i    s   Caughts   :s   No exceptions   booh(   s   getopts   testoptionss   syss   argvs   optss   argss   errors   msgs   stderrs   os   as   appends   _processoptionss   _OptionErrors   filterss   items   hellos   warns   UserWarnings   DeprecationWarnings   ranges   is   filterwarningss   Warnings	   Exceptions	   __class__s   __name__s   resetwarnings(
   s   argss   as   is   os   items   testoptionss   msgs   getopts   hellos   opts(    (    s   /usr/lib/python2.2/warnings.pys   _test sJ   	&
 
 	 	+ 	
s   __main__s   warningss   ignores   categorys   append(   s   __doc__s   syss   res   typess   __all__s   defaultactions   filterss   onceregistrys   Nones   warns   warn_explicits   showwarnings   formatwarnings   Warnings   filterwarningss   resetwarningss	   Exceptions   _OptionErrors   _processoptionss
   _setoptions
   _getactions   _getcategorys   _tests   __name__s   __main__s   moduless   warnoptionss   OverflowWarning(   s   filterwarningss   _tests   warns   syss   filterss   __main__s
   _setoptions   warn_explicits   typess   defaultactions   showwarnings   __all__s   onceregistrys   _processoptionss   _getcategorys   res   _OptionErrors   resetwarningss   formatwarnings
   _getaction(    (    s   /usr/lib/python2.2/warnings.pys   ? s.   			 5	
&