
    Jn6hF                     *    d dl Z ddlmZ d Zd Zd Zy)    N   )iscoroutinefunctionc                     t        | dd      ryt        | dd      ryt        j                  |       ryt        | d      rt	        | j
                        ryt	        |        S )zY
    Tests to see if an application is a legacy-style (double-callable) application.
    _asgi_single_callableF_asgi_double_callableT__call__)getattrinspectisclasshasattrr   r   applications    f/var/www/django-portfolio.reubendavern.link/venv/lib/python3.12/site-packages/asgiref/compatibility.pyis_double_callabler      s^    
 {3U;{3U;{#{J' {334";///    c                       fd}|S )zS
    Transforms a double-callable ASGI application into a single-callable one.
    c                 B   K    |       } |||       d {   S 7 w)N )scopereceivesendinstancer   s       r   new_applicationz2double_to_single_callable.<locals>.new_application!   s$     u%gt,,,,s   r   )r   r   s   ` r   double_to_single_callabler      s    
- r   c                 2    t        |       rt        |       } | S )z
    Takes either a single- or double-callable application and always returns it
    in single-callable style. Use this to add backwards compatibility for ASGI
    2.0 applications to your server/test harness/etc.
    )r   r   r   s    r   guarantee_single_callabler   (   s     +&/<r   )r
   syncr   r   r   r   r   r   r   <module>r      s     %0,	r   