§
    :Fcag  ã                   ó
  — d Z ddlmZ ddlZddlmZ ddlmZ ddlmZ ddlm	Z	 	 ddl
ZefZdZn# e$ r ddlZefZd	ZY nw xY wej        Zi Zd
ad„ Zd„ Zd„ Zd„ Zerg ZeZndgZeZddlmZ  ee e¦   «         e¬¦  «        ZdS )z5gevent friendly implementations of builtin functions.é    )Úabsolute_importN)ÚRLock)ÚPY3)Úimp_acquire_lock)Úimp_release_lockÚ__builtin__ÚbuiltinsTc                 ó¼   ‡ — d }	 t          ‰          ¦   «         }n# t          $ r Y nw xY w|€0t          ¦   «         }ˆ fd„}t          j        ||¦  «        t           ‰ <   |S )Nc                 ó>   •— t                                ‰d ¦  «         d S )N)Ú_g_import_locksÚpop)Ú_Únames    €ú1/usr/lib/python3/dist-packages/gevent/builtins.pyÚcbz__module_lock.<locals>.cbA   s   ø€ å×Ò  dÑ+Ô+Ð+Ð+Ð+ó    )r   ÚKeyErrorr   ÚweakrefÚref)r   Úlockr   s   `  r   Ú__module_lockr   1   s‡   ø€ ð €DðÝ˜tÔ$Ñ&Ô&ˆˆøÝð ð ð Øˆðøøøð €|Ý‰wŒwˆð	,ð 	,ð 	,ð 	,ð 	,õ !(¤¨D°"Ñ 5Ô 5�˜ÑØ€Ks   … š
'¦'c                  óÀ  — | r2t          t          | d         ¦  «        t          ¦  «        s
| dd…         } t          st	          | i |¤ŽS t          | d         ¦  «        }t          ¦   «          	 |                     ¦   «          	 t	          | i |¤Ž}|                     ¦   «          n# |                     ¦   «          w xY w	 t          ¦   «          n# t          ¦   «          w xY w|S )aƒ  
    __import__(name, globals=None, locals=None, fromlist=(), level=0) -> object

    Normally python protects imports against concurrency by doing some locking
    at the C level (at least, it does that in CPython).  This function just
    wraps the normal __import__ functionality in a recursive lock, ensuring that
    we're protected against greenlet import concurrency as well.
    r   é   N)
Ú
issubclassÚtypeÚ_allowed_module_name_typesÚ__lock_importsÚ_importr   r   ÚacquireÚreleaser   )ÚargsÚkwargsÚmodule_lockÚresults       r   Ú
__import__r%   H   sô   € ð ð •J�t D¨¤G™}œ}Õ.HÑIÔIð ð
 �A�B�BŒxˆåð (Ý˜Ð' Ð'Ð'Ð'å  Q¤Ñ(Ô(€KÝÑÔÐðØ×ÒÑÔÐð	"Ý˜dÐ- fÐ-Ð-ˆFà×ÒÑ!Ô!Ð!Ð!øˆK×ÒÑ!Ô!Ð!Ð!øøøÐ!åÑÔÐÐøÕÑÔÐÐøøøØ€Ms$   Á,C ÂB" ÂC Â"B8Â8C ÃCc                  ó
   — da dS )aÛ  
    Internal function, called when gevent needs to perform imports
    lazily, but does not know the state of the system. It may be impossible
    to take the import lock because there are no other running greenlets, for
    example. This causes a monkey-patched __import__ to avoid taking any locks.
    until the corresponding call to lock_imports. This should only be done for limited
    amounts of time and when the set of imports is statically known to be "safe".
    FN©r   © r   r   Ú_unlock_importsr)   h   s   € ð €N€N€Nr   c                  ó
   — da d S )NTr'   r(   r   r   Ú_lock_importsr+   x   s   € à€N€N€Nr   r%   )Úcopy_globals)Únames_to_ignore)Ú__doc__Ú
__future__r   r   Úgevent.lockr   Úgevent._compatr   r   r   r   Ú__gbuiltins__Ú
basestringr   Ú
__target__ÚImportErrorr	   Ústrr%   r   r   r   r   r)   r+   Ú__implements__Ú__all__Úgevent._utilr,   ÚglobalsÚ__imports__r(   r   r   ú<module>r<      sv  ðà ;Ð ;Ø &Ð &Ð &Ð &Ð &Ð &à €€€à Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø +Ð +Ð +Ð +Ð +Ð +Ø +Ð +Ð +Ð +Ð +Ð +ðØ'Ð'Ð'Ð'Ø", ÐØ€J€JøØð ð ð Ø$Ð$Ð$Ð$Ø"% ÐØ€J€J€Jðøøøð
 Ô
"€ð  €à€ðð ð ð.ð ð ð@ð ð ð ð ð ð ð $Ø€NØ€J€Jà"�^€NØ
€ð &Ð %Ð %Ð %Ð %Ð %àˆl˜=¨'¨'©)¬)Ø+9ð;ñ ;ô ;€€€s   ¦	0 °AÁ A