+
     h  c                   s   ^ RI t ^ RIHt ^ RIHt ^ RIHtHtHtH	t	  ^ RI
t
]! ]
P                  P                  R4      ^ ,          4      ^8  t]'       g	   ]! R4      h  ^ RItRt ^ RItRt^ R	IHt R
 t]R 4       tR R ltR tR R ltR tR tRR ltRR ltR tR t R R lt!R R lt"R t#R#   ] d    Rt L`i ; i  ] d    Rt Lhi ; i  ] d    Rt Lpi ; i)    N)contextmanagerwraps)AnyDictMappingUnion.z"hiredis package should be >= 3.0.0FT)metadatac                s4    ^ RI Hp VP                  ! V 3/ VB # )z
Returns an active Redis client generated from the given database URL.

Will attempt to extract the database id from the path url fragment, if
none is provided.
)Redis)Zredis.clientr
   from_url)Zurlkwargsr
   s   &, 0/usr/lib/python3.14/site-packages/redis/utils.pyr   r   !   s     #>>#(((    c              #   sV   "   V P                  4       pVx  VP                  4        R # 5iN)pipelineZexecute)Z	redis_objZps   & r   r   r   -   s!     A
GIIKs   ')c                sR    V ^8  d   QhR\         \        \        3,          R\        /# )   valuereturn)r   strbytesZformat   "r   __annotate__r   4   s#      c5j) c r   c                 sX    \        V \        4      '       d   V P                  R RR7      # T # )utf-8Zreplace)Zerrors)
isinstancer   decoder      &r   str_if_bytesr   4   s+    3=eU3K3KWY/QVr   c                 s*    \        \        V 4      4      # r   )r   r   r   r   r   safe_strr   :   s    |E"##r   c                st    V ^8  d   QhR\         \        \        3,          R\        \        \        3,          /# )r   dictsr   )r   r   r   r   r   r   r   r   r   >   s+      wsCx( T#s(^ r   c                 s>    / pV  F  pVP                  V4       K  	  V# )zQ
Merge all provided dicts into 1 dict.
*dicts : `dict`
    dictionaries to merge
)Zupdate)r    ZmergedZds   *  r   
dict_merger!   >   s&     Fa  Mr   c                 s,    \         P                  W4      # r   )ZdictZfromkeys)Zkey_listZcallback   &&r   list_keys_to_dictr#   L   s    ==,,r   c                s    \        4       pVP                  4        F  pV F  pVP                  V4       K  	  K  	  \        V4      # )z
Merge all items in `res` into a list.

This command is used when sending a command to multiple nodes
and the result from each node should be merged into a single list.

res : 'dict'
)ZsetZvaluesZaddlist)ZcommandZresZresultZvr   s   &&   r   merge_resultr%   P   s=     UFZZ\EJJu   <r   c                 s    ^ RI pRV  R2pV'       d   VRV R2,          pV'       d   VRV R2,          pVP                  V\        VR7       R# )r    NzCall to deprecated r   z (Z)z -- Deprecated since version )Zcategory
stacklevel)warningsZwarnZDeprecationWarning)namereasonversionr&   r'   Zmsgs   &&&&  r   warn_deprecatedr+   b   sR    vQ
'CF81~.wiq99MM# 2zMJr   c                s   a aa VV V3R lpV# )z-
Decorator to mark a function as deprecated.
c                 s8   <a  \        S 4      V VVV3R  l4       pV# )c                  sZ   < \        S;'       g    SP                  SS^R7       S! V / VB # )i   )r&   )r+   Z__name__)argsr   funcr(   r)   r*   s   *,r   wrapperZ7deprecated_function.<locals>.decorator.<locals>.wrappers   s-    D11DMM67qQ(((r   r   )r-   r.   r(   r)   r*   s   f r   	decoratorZ&deprecated_function.<locals>.decoratorr   s     	t	) 
	) r    )r)   r*   r(   r/   s   fff r   deprecated_functionr1   m   s    
 r   c                 sl   R\         P                  P                  P                  P	                  4       9  d}   \         P
                  ! R4      p V P                  \         P                  4       \         P                  ! 4       pVP                  \         P                  4       V P                  V4       R# R# )zc
Set up a logger that log info logs to stdout.
(This is used by the default push response handler)
Zpush_responseN)
loggingZrootZmanagerZ
loggerDictZkeysZ	getLoggerZsetLevelZINFOZStreamHandlerZ
addHandler)ZloggerZhandlers     r   _set_info_loggerr3   }   sy    
 gll22==BBDD""?3%'')&'" Er   c                  sp     \         P                  ! R 4      p V #   \         P                   d    Rp  T # i ; i)Zredisz99.99.99)r	   r*   ZPackageNotFoundError)Zlibvers    r   get_lib_versionr4      s?    !!'* M (( Ms    55c                s<    V ^8  d   QhR\         R\        R\         /# )r   
host_error	exceptionr   )r   ZBaseExceptionr   r   r   r   r      s!     	
 	
S 	
] 	
s 	
r   c                 s    VP                   '       g   R V  R2# \        VP                   4      ^8X  d   RVP                   ^ ,           RV  R2# RVP                   ^ ,           RV  RVP                   ^,           R2# )zError connecting to r   zError z connecting to z. )r,   len)r5   r6   r"   r   format_error_messager8      s    >>>%j\33	Y^^		!	q)*/*QGG Y^^A&'zl"~~a !$	
r   c                s<    V ^8  d   QhR\         R\         R\        /# )r   version1version2r   )r   intr   r   r   r   r      s!      s c c r   c                s   \        \        \        V P                  R4      4      4      p\        \        \        VP                  R4      4      4      p\	        V4      \	        V4      8  d@   \	        V4      \	        V4      ,
          p\        V4       F  pVP                  ^ 4       K  	  MW\	        V4      \	        V4      8  d?   \	        V4      \	        V4      ,
          p\        V4       F  pVP                  ^ 4       K  	  \        V4       F2  w  rgW&,          W6,          8  d   Ru # W&,          W6,          8  g   K1   ^# 	  ^ # )z
Compare two versions.

:return: -1 if version1 > version2
         0 if both versions are equal
         1 if version1 < version2
r   i)r$   Zmapr;   splitr7   ZrangeZappendZ	enumerate)r9   r:   Znum_versions1Znum_versions2ZdiffZ_ZiZvers   &&      r   compare_versionsr=      s     S(.."567MS(.."567M
=C..=!C$66tA  # 	]	c-0	0=!C$66tA  #  M*m..I 00	 + r   c                 s    \        V \        4      '       d   V P                  R 4      # \        V \        4      '       d   V # \	        R4      h)r   z$Key must be either a string or bytes)r   r   r   r   Z	TypeError)Zkeyr   r   ensure_stringr>      s<    #uzz'""	C		
>??r   ) r?   r   )r?   r?   N)$r2   Z
contextlibr   Z	functoolsr   Ztypingr   r   r   r   Zhiredisr;   Z__version__r<   ZHIREDIS_AVAILABLEZImportErrorZsslZSSL_AVAILABLEZcryptographyZCRYPTOGRAPHY_AVAILABLEZ	importlibr	   r   r   r   r   r!   r#   r%   r+   r1   r3   r4   r8   r=   r>   r0   r   r   <module>r@      s    %  , , G//55c:1=>!C>?? 
M#! 	)  $-$K 
#	
<@_    M  #"#s;   6B3 B3 C &C 3	B?>B?	CC	CC