
    Ih                    x    d Z ddlmZ ddlmZ dZ	 ddlmZ  e       Z G d de      Zy# e	$ r	 ddlm
Z Y  w xY w)	zObject Utilities.    )annotations)RLock)cached_property)threaded_cached_propertyc                  H     e Zd ZdZd fd	Zd	 fd	Zd Zd Zd Zd Z	 xZ
S )
r   z"Implementation of Cached property.c                    t         |   |       || _        || _        t	        | d      s| j
                  j                  | _        t	        | d      st               | _	        y y )Nattrnamelock)
super__init___cached_property__set_cached_property__delhasattrfunc__name__r	   r   r
   )selffgetfsetfdel	__class__s       L/var/www/html/planif/env/lib/python3.12/site-packages/kombu/utils/objects.pyr   zcached_property.__init__   sS    

tZ( II..DMtV$ DI	 %    c                h    | j                   5  t        | 	  ||      cd d d        S # 1 sw Y   y xY wN)r
   r   __get__)r   instanceownerr   s      r   r   zcached_property.__get__$   s/     YY 	47?8U3	4 	4 	4s   (1c                    || S | j                   5  | j                  | j                  ||      }|j                  }||| j                  <   d d d        y # 1 sw Y   y xY wr   )r
   r   __dict__r	   )r   r   valuecaches       r   __set__zcached_property.__set__*   s\    KYY 	)zz%

8U3%%E#(E$-- 	) 	) 	)s   :AAc                    || S | j                   5  |j                  j                  | j                  t              }| j
                  r|t        ur| j                  ||       d d d        y # 1 sw Y   y xY wr   )r
   r   popr	   
_NOT_FOUNDr   )r   r   r    s      r   
__delete__zcached_property.__delete__5   sa    KYY 	,%%))$--DEzze:5

8U+		, 	, 	,s   AA++A4c                P    | j                  | j                  || j                        S r   )r   r   r   )r   r   s     r   setterzcached_property.setter?   s    ~~diitzz::r   c                P    | j                  | j                  | j                  |      S r   )r   r   r   )r   r   s     r   deleterzcached_property.deleterB   s    ~~diiT::r   )NNNr   )r   
__module____qualname____doc__r   r   r"   r&   r(   r*   __classcell__)r   s   @r   r   r      s$    , 4	),;;r   r   N)r-   
__future__r   	threadingr   __all__	functoolsr   _cached_propertyImportErrorr   objectr%    r   r   <module>r7      sH     " 
M=
 X
1;& 1;  MLMs   + 99