ó
ú2ec           @  sÆ  d  Z  d d l m Z d d l m Z m Z m Z d d l m Z m Z m	 Z	 d d l
 m Z m Z m Z m Z d d l
 m Z m Z m Z d d l m Z d d l Z d d l Z d d	 l m Z d d
 l m Z m Z d d l Z d d d d d d d d d d d d d d d d d d d d g Z d e f d „  ƒ  YZ d e f d  „  ƒ  YZ  d e f d! „  ƒ  YZ! d e f d" „  ƒ  YZ" d d# „ Z$ d$ e f d% „  ƒ  YZ% d e& d& „ Z' d' e f d( „  ƒ  YZ( d) e) d* „ Z* d+ e f d, „  ƒ  YZ+ d- „  Z, d e, _- d. „  Z. d/ „  Z/ d0 „  Z0 d d d1 „ Z1 d2 e f d3 „  ƒ  YZ2 d4 „  Z3 xS e D]K Z4 e5 ƒ  e4 Z6 e7 e6 d5 ƒ rNe6 j8 d6 e9 k rNe3 e6 ƒ e5 ƒ  e4 <qNqNWe9 d7 k rÂd d l: Z: e: j; ƒ  n  d S(8   s&   
A module of many disparate routines.
iÿÿÿÿ(   t   print_function(   t   get_cookiest   parse_querystringt   parse_formvars(   t   construct_urlt   path_info_splitt   path_info_pop(   t
   HeaderDictt
   has_headert   header_valuet   remove_header(   t   error_body_responset   error_responset   error_response_app(   t   print_exceptionN(   t	   cStringIO(   t   unquotet   urlsplitt	   add_closet   add_start_closet   capture_outputt   catch_errorst   catch_errors_appt   chained_app_itersR   t   dump_environt   encode_unicode_app_iterR   R   R   R   R	   t   interactivet   intercept_outputR   R   t   raw_interactivet	   send_filec           B  sD   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sP   
    An an iterable that iterates over app_iter, then calls
    close_func.
    c         C  s.   | |  _  t | ƒ |  _ | |  _ t |  _ d  S(   N(   t   app_iterablet   itert   app_itert
   close_funct   Falset   _closed(   t   selfR   R!   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyt   __init__%   s    		c         C  s   |  S(   N(    (   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyt   __iter__+   s    c         C  s
   |  j  ƒ  S(   N(   t   __next__(   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyt   next.   s    c         C  s   t  |  j ƒ S(   N(   R(   R    (   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR'   2   s    c         C  s9   t  |  _ t |  j d ƒ r+ |  j j ƒ  n  |  j ƒ  d  S(   Nt   close(   t   TrueR#   t   hasattrR   R)   R!   (   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR)   5   s    	c         C  s*   |  j  s& t d |  j d t j ƒn  d  S(   Nsg   Error: app_iter.close() was not called when finishing WSGI request. finalization function %s not calledt   file(   R#   t   printR!   t   syst   stderr(   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyt   __del__;   s    	(	   t   __name__t
   __module__t   __doc__R%   R&   R(   R'   R)   R0   (    (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR      s   					c           B  sD   e  Z d  Z d d „ Z d „  Z d „  Z e Z d „  Z d „  Z	 RS(   s“   
    An an iterable that iterates over app_iter, calls start_func
    before the first item is returned, then calls close_func at the
    end.
    c         C  s@   | |  _  t | ƒ |  _ t |  _ | |  _ | |  _ t |  _ d  S(   N(	   R   R   R    R*   t   firstt
   start_funcR!   R"   R#   (   R$   R   R5   R!   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR%   I   s    				c         C  s   |  S(   N(    (   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR&   Q   s    c         C  s,   |  j  r |  j ƒ  t |  _  n  t |  j ƒ S(   N(   R4   R5   R"   R(   R    (   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR(   T   s    	
c         C  sK   t  |  _ t |  j d ƒ r+ |  j j ƒ  n  |  j d  k	 rG |  j ƒ  n  d  S(   NR)   (   R*   R#   R+   R   R)   R!   t   None(   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR)   [   s
    	c         C  s*   |  j  s& t d |  j d t j ƒn  d  S(   Nsg   Error: app_iter.close() was not called when finishing WSGI request. finalization function %s not calledR,   (   R#   R-   R!   R.   R/   (   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR0   b   s    	N(
   R1   R2   R3   R6   R%   R&   R(   R'   R)   R0   (    (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR   B   s   			c           B  sA   e  Z d  Z d „  Z d „  Z d „  Z e Z d „  Z d „  Z RS(   sZ   
    Chains several app_iters together, also delegating .close() to each
    of them.
    c         G  s8   | |  _  g  | D] } t | ƒ ^ q |  _ t |  _ d  S(   N(   t	   app_itersR   t   chainedR"   R#   (   R$   R8   t   item(    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR%   p   s    	"c         C  s   |  S(   N(    (   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR&   u   s    c         C  sp   t  |  j ƒ d k r) t j |  j d ƒ Sy t j |  j d ƒ SWn( t k
 rk |  j j d ƒ |  j ƒ  SXd  S(   Ni   i    (   t   lenR8   t   sixR(   t   StopIterationt   pop(   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR(   x   s    c         C  s…   t  |  _ d  } xG |  j D]< } y  t | d ƒ r> | j ƒ  n  Wq t j ƒ  } q Xq W| r t j	 | d | d | d ƒ n  d  S(   NR)   i    i   i   (
   R*   R#   R6   R7   R+   R)   R.   t   exc_infoR;   t   reraise(   R$   t   got_excR    (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR)   ƒ   s    	c         C  s*   |  j  s& t d |  j d t j ƒn  d  S(   Nsg   Error: app_iter.close() was not called when finishing WSGI request. finalization function %s not calledR,   (   R#   R-   R!   R.   R/   (   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR0      s    	(	   R1   R2   R3   R%   R&   R(   R'   R)   R0   (    (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR   i   s   					c           B  sD   e  Z d  Z e j ƒ  d d „ Z d „  Z d „  Z e Z d „  Z	 RS(   s@   
    Encodes an app_iterable's unicode responses as strings
    t   strictc         C  s.   | |  _  t | ƒ |  _ | |  _ | |  _ d  S(   N(   R   R   R    t   encodingt   errors(   R$   R   RB   RC   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR%   ›   s    		c         C  s   |  S(   N(    (   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR&   ¢   s    c         C  s@   t  |  j ƒ } t | t j ƒ r< | j |  j |  j ƒ } n  | S(   N(   R(   R    t
   isinstanceR;   t	   text_typet   encodeRB   RC   (   R$   t   content(    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR(   ¥   s    c         C  s&   t  |  j d ƒ r" |  j j ƒ  n  d  S(   NR)   (   R+   R   R)   (   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR)   ¬   s    (
   R1   R2   R3   R.   t   getdefaultencodingR%   R&   R(   R'   R)   (    (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR   –   s   			c         C  sp   y |  | | ƒ } Wn | t  j ƒ  ƒ ‚  n Xt | ƒ t t f k r\ | rX | ƒ  n  | St | | | ƒ Sd S(   s&  
    Runs the application, and returns the application iterator (which should be
    passed upstream).  If an error occurs then error_callback will be called with
    exc_info as its sole argument.  If no errors occur and ok_callback is given,
    then it will be called with no arguments.
    N(   R.   R>   t   typet   listt   tuplet   _wrap_app_iter(   t   applicationt   environt   start_responset   error_callbackt   ok_callbackR    (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR   °   s    
RL   c           B  s)   e  Z d  „  Z d „  Z d „  Z e Z RS(   c         C  sR   | |  _  t | ƒ |  _ | |  _ | |  _ t |  j  d ƒ rN |  j  j |  _ n  d  S(   NR)   (   R   R   R    RP   RQ   R+   R)   (   R$   R   RP   RQ   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR%   Ç   s    			c         C  s   |  S(   N(    (   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR&   Ï   s    c         C  sa   y t  j |  j ƒ SWnF t k
 r@ |  j r: |  j ƒ  n  ‚  n |  j t j ƒ  ƒ ‚  n Xd  S(   N(   R;   R(   R    R<   RQ   RP   R.   R>   (   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR(   Ò   s    	(   R1   R2   R%   R&   R(   R'   (    (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyRL   Å   s   			
c         C  sŒ   y |  | | ƒ } Wn$ | k
 r9 | | | t  j ƒ  ƒ SXt | ƒ t t f k rl | d k	 rh | ƒ  n  | St | | | | | d | ƒSd S(   s  
    Like ``catch_errors``, except error_callback_app should be a
    callable that will receive *three* arguments -- ``environ``,
    ``start_response``, and ``exc_info``.  It should call
    ``start_response`` (*with* the exc_info argument!) and return an
    iterator.
    t   catchN(   R.   R>   RI   RJ   RK   R6   t   _wrap_app_iter_app(   RM   RN   RO   t   error_callback_appRQ   RR   R    (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR   Þ   s    	
	RS   c           B  s,   e  Z e d  „ Z d „  Z d „  Z e Z RS(   c         C  sm   | |  _  | |  _ | |  _ t | ƒ |  _ | |  _ | |  _ | |  _ t |  j d ƒ ri |  j j	 |  _	 n  d  S(   NR)   (
   RN   RO   R   R   R    RT   RQ   RR   R+   R)   (   R$   RN   RO   R   RT   RQ   RR   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR%   ÷   s    						c         C  s   |  S(   N(    (   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR&     s    c           sì   y t  j |  j ƒ SWnÑ t k
 r@ |  j r: |  j ƒ  n  ‚  n¨ |  j k
 rç t |  j d ƒ r€ y |  j j ƒ  Wq€ q€ Xn  |  j	 |  j
 |  j t j ƒ  ƒ } t | ƒ ‰  t | d ƒ rË | j |  _ n  ‡  f d †  |  _ |  j ƒ  SXd  S(   NR)   c             s   t  j ˆ  ƒ S(   N(   R;   R(   (    (   R    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyt   <lambda>  t    (   R;   R(   R    R<   RQ   RR   R+   R   R)   RT   RN   RO   R.   R>   R   (   R$   t   new_app_iterable(    (   R    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR(     s&    	(   R1   R2   t	   ExceptionR%   R&   R(   R'   (    (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyRS   õ   s   		RV   c           sß  d | k s t  d ƒ ‚ | r* t ƒ  } n t j ƒ  } i d d 6d d 6d d 6d d	 6d
 d 6d d 6d% d 6d d 6t j ƒ  d 6| d 6t d 6t d 6t d 6} | r	t t | ƒ ƒ \ } } } } }	 t | ƒ } t | ƒ t | ƒ } } | | d <| r	| | d <q	n  x6 | j	 ƒ  D]( \ }
 } |
 j
 d d ƒ }
 | | |
 <qWd	 | k rkd | k rk| d	 | d <n  | d } t | t ƒ rªt j | ƒ | d <t | ƒ | d <n  i  ‰  g  ‰ g  ‰ g  ‰ d! ‡  ‡ ‡ ‡ f d † } |  | | ƒ } z¬ yi xb | D]Z } t | t j ƒ s$t d | ƒ ‚ n  ˆ j t ƒ ˆ sFt  d ƒ ‚ n  ˆ j | ƒ qùWWn< t k
 r–} | j d d  | f | j d | _ ‚  n XWd! t | d" ƒ r·| j ƒ  n  Xˆ  d# ˆ  d$ d j ˆ ƒ | j ƒ  f S(&   s5   
    Runs the application in a fake environment.
    t	   path_infos   argument list changedt   GETt   REQUEST_METHODRV   t   SCRIPT_NAMEt	   PATH_INFOt	   localhostt   SERVER_NAMEt   80t   SERVER_PORTs   HTTP/1.0t   SERVER_PROTOCOLi   i    s   wsgi.versiont   https   wsgi.url_schemes
   wsgi.inputs   wsgi.errorss   wsgi.multithreads   wsgi.multiprocesss   wsgi.run_oncet   QUERY_STRINGt   __t   .t	   HTTP_HOSTt   CONTENT_LENGTHc           s|   | r? z, ˆ r1 t  j | d | d | d ƒ n  Wd  d  } Xn ˆ rT t d ƒ ‚ n  ˆ j t ƒ |  ˆ  d <| ˆ  d <ˆ j S(   Ni    i   i   s$   Headers already set and no exc_info!t   statust   headers(   R;   R?   R6   t   AssertionErrort   appendR*   (   Ri   Rj   R>   (   t   datat   headers_sentt   headers_sett   output(    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyRO   N  s    &


sC   The app_iter response can only contain bytes (not unicode); got: %rs   Content sent w/o headers!s    iterable: %rNR)   Ri   Rj   (   i   i    (   Rk   t   ErrorRaiserR;   t   StringIOt   BytesIOR"   R   t   strR   t   itemst   replaceRD   t   bytesR:   R6   t   binary_typet
   ValueErrorRl   R*   t	   TypeErrort   argsR+   R)   t   joint   getvalue(   RM   t   patht   raise_on_wsgi_errorRN   RC   t   basic_environt   _RY   t   queryt   fragmentt   namet   valuet   istreamRO   R    t   st   e(    (   Rm   Rn   Ro   Rp   s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR     sv    
!

&Rq   c           B  s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C  s   d  S(   N(    (   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyt   flushx  s    c         C  s   | s
 d  St  d | ƒ ‚ d  S(   Ns%   No errors should be written (got: %r)(   Rk   (   R$   R…   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyt   write{  s    c         C  s   t  d t | ƒ ƒ ‚ d  S(   Ns+   No errors should be written (got lines: %s)(   Rk   RJ   (   R$   t   seq(    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyt
   writelines  s    c         C  s   d S(   NRV   (    (   R$   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR}   …  s    (   R1   R2   R‰   RŠ   RŒ   R}   (    (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyRq   v  s   			c    	      O  s½   t  |  | Ž  \ } } } } t ƒ  } | rZ | j d ƒ | j | j ƒ  ƒ | j d ƒ n  | j | d ƒ x+ | D]# \ } } | j d | | f ƒ qr W| j d ƒ | j | ƒ | j ƒ  S(   sx   
    Runs the application interatively, wrapping `raw_interactive` but
    returning the output in a formatted way.
    s   Errors:
s   
----------end errors
s   
s   %s: %s
(   R   Rr   RŠ   t   stripR}   (	   R{   t   kwRi   Rj   RG   RC   t   fullR„   R…   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR   ˆ  s    	c         C  s  g  } t  |  j ƒ  ƒ } | j ƒ  xA | D]9 } t |  | ƒ j d d ƒ } | j d | | f ƒ q) W| j d ƒ |  j d d ƒ } | r» | j |  d j t | ƒ ƒ ƒ | j d ƒ n  d j	 | ƒ } t
 j rå | j d ƒ } n  d d
 t t | ƒ ƒ f g } | d | ƒ | g S(   sl   
    Application which simply dumps the current environment
    variables out as a plain text response.
    s   
s   
    s   %s: %s
Rh   RV   s
   wsgi.inputt   utf8s   Content-Types
   text/plains   Content-Lengths   200 OK(   s   Content-Types
   text/plain(   RJ   t   keyst   sortRt   Rv   Rl   t   gett   readt   intR|   R;   t   PY3RF   R:   (   RN   RO   Rp   R‘   t   kt   vt   content_lengthRj   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR   ›  s$    
 	c         C  s0   t  j d t d ƒ d d l m } | j |  ƒ S(   Ns9   wsgilib.send_file has been moved to paste.fileapp.FileAppi   iÿÿÿÿ(   t   fileapp(   t   warningst   warnt   DeprecationWarningt   pasteRš   t   FileApp(   t   filenameRš   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR   ³  s
    
c           sÚ   t  j d t d ƒ g  ‰  t ƒ  ‰ d ‡  ‡ ‡ f d † } | |  | ƒ } z" x | D] } ˆ j | ƒ qS WWd t | d ƒ rŠ | j ƒ  n  Xˆ  s¡ ˆ  j d ƒ n  t	 ˆ  ƒ d k  rÃ ˆ  j d ƒ n  ˆ  j ˆ j
 ƒ  ƒ ˆ  S(   s  
    Runs application with environ and start_response, and captures
    status, headers, and body.

    Sends status and header, but *not* body.  Returns (status,
    headers, body).  Typically this is used like:

    .. code-block:: python

        def dehtmlifying_middleware(application):
            def replacement_app(environ, start_response):
                status, headers, body = capture_output(
                    environ, start_response, application)
                content_type = header_value(headers, 'content-type')
                if (not content_type
                    or not content_type.startswith('text/html')):
                    return [body]
                body = re.sub(r'<.*?>', '', body)
                return [body]
            return replacement_app

    sO   wsgilib.capture_output has been deprecated in favor of wsgilib.intercept_outputi   c           sA   ˆ  r g  ˆ  (n  ˆ  j  |  ƒ ˆ  j  | ƒ ˆ |  | | ƒ ˆ j S(   N(   Rl   RŠ   (   Ri   Rj   R>   (   Rm   Rp   RO   (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyt   replacement_start_response×  s    
NR)   (   R›   Rœ   R   Rr   R6   RŠ   R+   R)   Rl   R:   R}   (   RN   RO   RM   R¡   R    R9   (    (   Rm   Rp   RO   s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR   º  s$    
	c           s  ˆ  d k	 r' ˆ d k r' t d ƒ ‚ n  g  ‰ t ƒ  ‰ d ‡  ‡ ‡ ‡ f d † } | |  | ƒ } ˆ d d k r} d d | f Sz" x | D] } ˆ j | ƒ q‡ WWd t | d ƒ r¾ | j ƒ  n  Xˆ sÕ ˆ j d ƒ n  t ˆ ƒ d k  r÷ ˆ j d ƒ n  ˆ j ˆ j ƒ  ƒ ˆ S(   sß  
    Runs application with environ and captures status, headers, and
    body.  None are sent on; you must send them on yourself (unlike
    ``capture_output``)

    Typically this is used like:

    .. code-block:: python

        def dehtmlifying_middleware(application):
            def replacement_app(environ, start_response):
                status, headers, body = intercept_output(
                    environ, application)
                start_response(status, headers)
                content_type = header_value(headers, 'content-type')
                if (not content_type
                    or not content_type.startswith('text/html')):
                    return [body]
                body = re.sub(r'<.*?>', '', body)
                return [body]
            return replacement_app

    A third optional argument ``conditional`` should be a function
    that takes ``conditional(status, headers)`` and returns False if
    the request should not be intercepted.  In that case
    ``start_response`` will be called and ``(None, None, app_iter)``
    will be returned.  You must detect that in your code and return
    the app_iter, like:

    .. code-block:: python

        def dehtmlifying_middleware(application):
            def replacement_app(environ, start_response):
                status, headers, body = intercept_output(
                    environ, application,
                    lambda s, h: header_value(headers, 'content-type').startswith('text/html'),
                    start_response)
                if status is None:
                    return body
                start_response(status, headers)
                body = re.sub(r'<.*?>', '', body)
                return [body]
            return replacement_app
    s?   If you provide conditional you must also provide start_responsec           sj   ˆ  d  k	 r9 ˆ  |  | ƒ r9 ˆ j d  ƒ ˆ |  | | ƒ Sˆ rI g  ˆ (n  ˆ j |  ƒ ˆ j | ƒ ˆ j S(   N(   R6   Rl   RŠ   (   Ri   Rj   R>   (   t   conditionalRm   Rp   RO   (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR¡      s    
i    NR)   i   (	   R6   Rz   Rr   RŠ   R+   R)   Rl   R:   R}   (   RN   RM   R¢   RO   R¡   R    R9   (    (   R¢   Rm   Rp   RO   s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR   ì  s(    .		t   ResponseHeaderDictc           B  s   e  Z d  „  Z RS(   c         O  s*   t  j d t d ƒ t j |  | | Ž d  S(   NsP   The class wsgilib.ResponseHeaderDict has been moved to paste.response.HeaderDicti   (   R›   Rœ   R   R   R%   (   R$   R{   RŽ   (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR%   =  s    
(   R1   R2   R%   (    (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyR£   ;  s   c           sQ   ˆ  j  ‰ ˆ  j d d ˆ ‰ ‡  ‡ ‡ f d †  } y ˆ  j  | _  Wn n X| S(   NR1   Rf   c            s*   t  j d ˆ ˆ f t d ƒ ˆ  |  | Ž  S(   Ns,   The function wsgilib.%s has been moved to %si   (   R›   Rœ   R   (   R{   RŽ   (   t   new_funct   new_namet   new_path(    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyt   replacementG  s
    

(   t	   func_namet   func_globals(   R¤   R§   (    (   R¤   R¥   R¦   s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyt   _warn_deprecatedD  s    	R©   R1   t   __main__(<   R3   t
   __future__R    t   paste.requestR   R   R   R   R   R   t   paste.responseR   R   R	   R
   R   R   R   t	   tracebackR   R;   R.   t	   six.movesR   Rr   t   six.moves.urllib.parseR   R   R›   t   __all__t   objectR   R   R   R   R6   R   RL   RX   R   RS   R"   R   Rq   R   t   proxyR   R   R   R   R£   Rª   t   _namet   globalst   _funcR+   R©   R1   t   doctestt   testmod(    (    (    s7   /usr/local/lib/python2.7/dist-packages/paste/wsgilib.pyt   <module>   sX   "			#'-(Y					2N		