a
    xd                     @   sl  d Z ddlmZ ddlZejd dkZzeZW nB eyp   zddlmZ W n e	yj   ddl
mZ Y n0 Y n0 zddlmZ W n e	y   ddlmZ Y n0 zddlmZ W n e	y   ddlmZ Y n0 ejdk rddlZe ZzddlZW n e	y   dZY n0 ed	kredurdd
lmZ eedZejedddZejZeje_ejZeje_ejge_dd ZnvedkredurddlZddlZdZG dd dej Z!ejdddZ"e"j#Z#ej$e%e!ge#_dd Znddl&m&Z zddl&m'Z' W n e	y"   eZ'Y n0 erddl(Z(ddl)m*Z*m+Z+m,Z, ddl-m.Z. ddl/m0Z0m1Z1 e2Z2e3Z4e3Z5e6Z7e3Z8e9Z9e6fZ:dd Z;dd Z<d d! Z=d"d# Z>e?e(d$Z@d6d%d&ZAG d'd( d(e0ZBnddlCZ(ddl*m*Z*m+Z+m,Z, dd)l-mDZ2mEZ. dd*l0m0Z0 eFZ4eGZ5eFZ8eHZ7eIZ9e6eHfZ:d+d Z;d,d Z<d-d! Z=d.d# Z>d7d/d0Z@e@d1 e0 Z1ZBeJd2d3gfd4d5ZKdS )8z
    celery.five
    ~~~~~~~~~~~

    Compatibility implementations of features
    only available in newer Python versions.


    )absolute_importN   )reload)UserList)UserDict)r   r   Darwin)find_libraryzlibSystem.dylibCoreServicesT)	use_errnoc                   C   s   t t d S )N&.>)absolute_to_nanosecondsmach_absolute_time r   r   E/var/www/html/Ranjet/env/lib/python3.9/site-packages/billiard/five.py
_monotonic:   s    r   Linux   c                   @   s    e Zd ZdejfdejfgZdS )timespectv_sectv_nsecN)__name__
__module____qualname__ctypesc_long_fields_r   r   r   r   r   E   s   r   z
librt.so.1c                  C   sB   t  } ttt| dkr2t }t|t|| j	| j
d  S )Nr   r   )r   clock_gettimeCLOCK_MONOTONICr   pointer	get_errnoOSErrorosstrerrorr   r   )tZerrno_r   r   r   r   Q   s
    )time)	monotonic)QueueEmptyFull)zip_longest)StringIOBytesIOc                 C   s   |   S N)itemsdr   r   r   r-   n   s    r-   c                 C   s   |   S r,   )keysr.   r   r   r   r0   q   s    r0   c                 C   s   |   S r,   )valuesr.   r   r   r   r1   t   s    r1   c                 C   s   | j S r,   )__next__itr   r   r   nextfunw   s    r5   execc                 C   s   |j |ur|||d S r,   )__traceback__with_traceback)tpvaluetbr   r   r   reraise|   s    

r<   c                   @   s   e Zd Zdd ZdS )
WhateverIOc                 C   s"   t |tr| }t| | d S r,   )
isinstancebytesencoder*   write)selfdatar   r   r   rA      s    
zWhateverIO.writeN)r   r   r   rA   r   r   r   r   r=      s   r=   )imapizip_longest)r*   c                 C   s   |   S r,   )	iteritemsr.   r   r   r   r-      s    c                 C   s   |   S r,   )iterkeysr.   r   r   r   r0      s    c                 C   s   |   S r,   )
itervaluesr.   r   r   r   r1      s    c                 C   s   | j S r,   )nextr3   r   r   r   r5      s    c                 C   sB   |du r*t d}|j}|du r&|j}~n|du r6|}td dS )zExecute code in a namespace.Nr   zexec code in globs, locs)sys	_getframe	f_globalsf_localsr6   )codeZglobsZlocsframer   r   r   exec_   s    
rP   z4def reraise(tp, value, tb=None): raise tp, value, tb__dict____weakref__c                    s    fdd}|S )zClass decorator to set metaclass.

    Works with both Python 2 and Python 3 and it does not add
    an extra class in the lookup order like ``six.with_metaclass`` does
    (that is -- it copies the original class instead of using inheritance).

    c                    s.   t fddtt| D } | j| j|S )Nc                 3   s"   | ]\}}| vr||fV  qd S r,   r   ).0keyr:   )
skip_attrsr   r   	<genexpr>   s   
z@with_metaclass.<locals>._clone_with_metaclass.<locals>.<genexpr>)dictr-   varsr   	__bases__)ZClassattrsTyperU   r   r   _clone_with_metaclass   s    z-with_metaclass.<locals>._clone_with_metaclassr   )r\   rU   r]   r   r[   r   with_metaclass   s    	r^   )N)NN)L__doc__
__future__r   rJ   version_infoPY3r   	NameError	importlibImportErrorimpr   collectionsr   platformsystemZSYSTEMr   Zctypes.utilr   CDLLZ	libSystemr	   r   c_uint64restypeZAbsoluteToNanosecondsr   argtypesr   r!   r   	Structurer   Zlibrtr   c_intPOINTERr$   r%   builtinsqueuer&   r'   r(   	itertoolsr)   ior*   r+   mapstrstringZstring_tintZlong_tZtext_trange	int_typesr-   r0   r1   r5   getattrrP   r<   r=   __builtin__rD   rE   unicode
basestringlongxrangesetr^   r   r   r   r   <module>   s   	








