Ë
    3ýjôJ  ã                   ó  — d dl Z d dlZd dlmZmZ d dlmZ d dlmZ d dl	m
Z
mZmZ d dlmZmZmZmZ d dlmZ  G d„ d	e«      Z G d
„ de«      ZeZ G d„ de
«      Z G d„ dee«      Z G d„ d«      Z G d„ de«      Z G d„ de«      Zy)é    N)ÚOptionalÚUnion)ÚRedis)ÚSentinelCommands)Ú
ConnectionÚConnectionPoolÚSSLConnection)ÚConnectionErrorÚReadOnlyErrorÚResponseErrorÚTimeoutError)ÚSENTINELc                   ó   — e Zd Zy)ÚMasterNotFoundErrorN©Ú__name__Ú
__module__Ú__qualname__© ó    úH/root/telegram-saas/.venv/lib/python3.12/site-packages/redis/sentinel.pyr   r      ó   „ Ør   r   c                   ó   — e Zd Zy)ÚSlaveNotFoundErrorNr   r   r   r   r   r      r   r   r   c            	       ór   ‡ — e Zd Zˆ fd„Zd„ Zd„ Zd„ Zd„ Z	 dedddœde	e
ef   d	ee   d
ee   fˆ fd„Zˆ xZS )ÚSentinelManagedConnectionc                 óP   •— |j                  d«      | _        t        ‰| �  di |¤Ž y )NÚconnection_poolr   )Úpopr   ÚsuperÚ__init__)ÚselfÚkwargsÚ	__class__s     €r   r!   z"SentinelManagedConnection.__init__   s%   ø€ Ø%Ÿz™zÐ*;Ó<ˆÔÜ‰ÑÑ"˜6Ó"r   c                 óð   — | j                   }dt        | «      j                  › dt        | «      j                  › d|j                  › d�}| j
                  r!d| j
                  › d| j                  › �}||z  }|S )Nú<ú.ú	(service=z%s)>z,host=z,port=)r   Útyper   r   Úservice_nameÚhostÚport)r"   ÚpoolÚsÚ	host_infos       r   Ú__repr__z"SentinelManagedConnection.__repr__!   s{   € Ø×#Ñ#ˆà”�T“
×%Ñ%Ð& a¬¨T«
×(;Ñ(;Ð'<Ø˜×)Ñ)Ð*¨$ð0ð 	
ð �9Š9Ø  §¡ ¨6°$·)±)°Ð=ˆIØ�I‘ˆAØˆr   c                 óp   — |\  | _         | _        | j                  | j                  j                  d¬«       y )NF)Úcheck_healthÚretry_socket_connect)r+   r,   Úconnect_check_healthr   Úcheck_connection)r"   Úaddresss     r   Ú
connect_toz$SentinelManagedConnection.connect_to,   s5   € Ø&ÑˆŒ	�4”9à×!Ñ!Ø×-Ñ-×>Ñ>Ø!&ð 	"õ 	
r   c                 ó*  — | j                   ry | j                  j                  r*| j                  | j                  j	                  «       «       y | j                  j                  «       D ]  }	 | j                  |«      c S  t        ‚# t        $ r Y Œ)w xY w©N)Ú_sockr   Ú	is_masterr7   Úget_master_addressÚrotate_slavesr
   r   )r"   Úslaves     r   Ú_connect_retryz(SentinelManagedConnection._connect_retry4   s„   € Ø�:Š:ØØ×Ñ×)Ò)Ø�O‰O˜D×0Ñ0×CÑCÓEÕFà×-Ñ-×;Ñ;Ó=ò �ðØŸ?™?¨5Ó1Ò1ðô
 %Ð$øô 'ò Ùðús   Á,BÂ	BÂBc                 óP   — | j                   j                  | j                  d„ «      S )Nc                  ó   — y r9   r   )Úerrors    r   ú<lambda>z3SentinelManagedConnection.connect.<locals>.<lambda>B   s   � r   )ÚretryÚcall_with_retryr?   ©r"   s    r   Úconnectz!SentinelManagedConnection.connectA   s    € Ø�z‰z×)Ñ)¨$×*=Ñ*=Ñ?QÓRÐRr   F)ÚtimeoutÚdisconnect_on_errorÚpush_requestrH   rI   rJ   c                óª   •— 	 t         ‰| �  ||||¬«      S # t        $ r3 | j                  j                  r| j                  «        t        d«      ‚‚ w xY w)N)Údisable_decodingrH   rI   rJ   z"The previous master is now a slave)r    Úread_responser   r   r;   Ú
disconnectr
   )r"   rL   rH   rI   rJ   r$   s        €r   rM   z'SentinelManagedConnection.read_responseD   sf   ø€ ð	Ü‘7Ñ(Ø!1ØØ$7Ø)ð	 )ó ð øô ò 		Ø×#Ñ#×-Ò-ð —‘Ô!Ü%Ð&JÓKÐKØð		ús	   ƒ –<A)F)r   r   r   r!   r0   r7   r?   rG   r   r   ÚfloatÚobjectr   ÚboolrM   Ú__classcell__©r$   s   @r   r   r      sk   ø„ ô#ò	ò
ò%òSð
 ðð )1Ø.3Ø',òð �u˜f�}Ñ%ð	ð
 & d™^ðð ˜t‘n÷ñ r   r   c                   ó   — e Zd Zy)ÚSentinelManagedSSLConnectionNr   r   r   r   rU   rU   _   r   r   rU   c                   ó*   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zy)ÚSentinelConnectionPoolProxyc                 ó�   — t        j                  |«      | _        || _        || _        || _        || _        | j                  «        y r9   )ÚweakrefÚrefÚconnection_pool_refr;   r5   r*   Úsentinel_managerÚreset)r"   r   r;   r5   r*   r\   s         r   r!   z$SentinelConnectionPoolProxy.__init__d   s=   € ô $+§;¡;¨Ó#?ˆÔ Ø"ˆŒØ 0ˆÔØ(ˆÔØ 0ˆÔØ�
‰
�r   c                 ó    — d | _         d | _        y r9   )Úmaster_addressÚslave_rr_counterrF   s    r   r]   z!SentinelConnectionPoolProxy.resets   s   € Ø"ˆÔØ $ˆÕr   c                 óÜ   — | j                   j                  | j                  «      }| j                  r:| j                  |k7  r+|| _        | j                  «       }|�|j                  d¬«       |S )NF)Úinuse_connections)r\   Údiscover_masterr*   r;   r_   r[   rN   )r"   r_   r   s      r   r<   z.SentinelConnectionPoolProxy.get_master_addressw   sg   € Ø×.Ñ.×>Ñ>¸t×?PÑ?PÓQˆØ�>Š>˜d×1Ñ1°^ÒCØ"0ˆDÔð #×6Ñ6Ó8ˆOØÐ*Ø×*Ñ*¸UÐ*ÔCØÐr   c              #   óÊ  K  — | j                   j                  | j                  «      }|r| j                  €'t	        j
                  dt        |«      dz
  «      | _        t        t        |«      «      D ]5  }| j                  dz   t        |«      z  | _        || j                     }|–— Œ7 	 | j                  «       –— t        d| j                  ›�«      ‚# t        $ r Y Œ#w xY w­w)Nr   é   zNo slave found for )r\   Údiscover_slavesr*   r`   ÚrandomÚrandintÚlenÚranger<   r   r   )r"   ÚslavesÚ_r>   s       r   r=   z)SentinelConnectionPoolProxy.rotate_slaves‚   sØ   è ø€ Ø×&Ñ&×6Ñ6°t×7HÑ7HÓIˆÙØ×$Ñ$Ð,Ü(.¯©°q¼#¸f»+È¹/Ó(J�Ô%Üœ3˜v›;Ó'ò �Ø)-×)>Ñ)>ÀÑ)BÄcÈ&ÃkÑ(Q�Ô%Ø˜t×4Ñ4Ñ5�Ø“ðð
	Ø×)Ñ)Ó+Ò+ô !Ð#6°t×7HÑ7HÐ6KÐ!LÓMÐMøô #ò 	Ùð	üs*   ‚B'C#Â*C Â<C#Ã	C ÃC#ÃC Ã C#c                 ó"   — | j                  «       S ©z’Round-robin replica balancer.

        This is an alias for :py:meth:`rotate_slaves`,
        using the preferred Redis 5.0+ terminology.
        ©r=   rF   s    r   Úrotate_replicasz+SentinelConnectionPoolProxy.rotate_replicas’   ó   € ð ×!Ñ!Ó#Ð#r   N)r   r   r   r!   r]   r<   r=   rp   r   r   r   rW   rW   c   s   „ òò%ò	òNó $r   rW   c                   ó^   ‡ — e Zd ZdZˆ fd„Zd„ Zˆ fd„Zed„ «       Zˆ fd„Z	d„ Z
d„ Zd	„ Zˆ xZS )
ÚSentinelConnectionPoolz¸
    Sentinel backed connection pool.

    If ``check_connection`` flag is set to True, SentinelManagedConnection
    sends a PING command right after establishing the connection.
    c                 ó‚  •— |j                  d|j                  dd«      rt        nt        «      |d<   |j                  dd«      | _        |j                  dd«      | _        t        | | j                  | j
                  ||¬«      | _        t        ‰| �$  d	i |¤Ž | j                  | j                  d<   || _        || _        y )
NÚconnection_classÚsslFr;   Tr5   )r   r;   r5   r*   r\   r   r   )Úgetr   rU   r   r;   r5   rW   Úproxyr    r!   Úconnection_kwargsr*   r\   )r"   r*   r\   r#   r$   s       €r   r!   zSentinelConnectionPool.__init__£   s¶   ø€ Ø%+§Z¡ZØð —:‘:˜e UÔ+õ -ä.ó&
ˆÐ!Ñ"ð  Ÿ™ K°Ó6ˆŒØ &§
¡
Ð+=¸uÓ EˆÔÜ0Ø Ø—n‘nØ!×2Ñ2Ø%Ø-ô
ˆŒ
ô 	‰ÑÑ"˜6Ò"Ø48·J±Jˆ×ÑÐ0Ñ1Ø(ˆÔØ 0ˆÕr   c           	      ó    — | j                   rdnd}dt        | «      j                  › dt        | «      j                  › d| j                  › d|› d�	S )NÚmasterr>   r&   r'   r(   ú(z))>)r;   r)   r   r   r*   )r"   Úroles     r   r0   zSentinelConnectionPool.__repr__º   sR   € ØŸ>š>‰x¨wˆà”�T“
×%Ñ%Ð& a¬¨T«
×(;Ñ(;Ð'<Ø˜×)Ñ)Ð*¨!¨D¨6°ð6ð	
r   c                 óV   •— t         ‰| �  «        | j                  j                  «        y r9   )r    r]   rx   )r"   r$   s    €r   r]   zSentinelConnectionPool.resetÁ   s   ø€ Ü‰‰ŒØ�
‰
×ÑÕr   c                 ó.   — | j                   j                  S r9   )rx   r_   rF   s    r   r_   z%SentinelConnectionPool.master_addressÅ   s   € à�z‰z×(Ñ(Ð(r   c                 óÆ   •— | j                    xs3 | j                   xr% | j                  |j                  |j                  fk(  }t	        «       }|xr |j                  |«      S r9   )r;   r_   r+   r,   r    Úowns_connection)r"   Ú
connectionÚcheckÚparentr$   s       €r   r�   z&SentinelConnectionPool.owns_connectionÉ   sZ   ø€ Ø—N‘NÐ"ò 
Ø�N‰NÒX˜t×2Ñ2°z·±È
ÏÉÐ6XÑXð 	ô “ˆØÒ;˜×/Ñ/°
Ó;Ð;r   c                 ó6   — | j                   j                  «       S r9   )rx   r<   rF   s    r   r<   z)SentinelConnectionPool.get_master_addressÐ   s   € Ø�z‰z×,Ñ,Ó.Ð.r   c                 ó6   — | j                   j                  «       S )zRound-robin slave balancer)rx   r=   rF   s    r   r=   z$SentinelConnectionPool.rotate_slavesÓ   s   € à�z‰z×'Ñ'Ó)Ð)r   c                 ó"   — | j                  «       S rn   ro   rF   s    r   rp   z&SentinelConnectionPool.rotate_replicas×   rq   r   )r   r   r   Ú__doc__r!   r0   r]   Úpropertyr_   r�   r<   r=   rp   rR   rS   s   @r   rs   rs   ›   s?   ø„ ñô1ò.
ôð ñ)ó ð)ô<ò/ò*ö$r   rs   c                   ó†   — e Zd ZdZ	 	 	 dd„Zd„ Zd„ Zdd„Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zd„ Zd„ Zd„ Zeefd„Zeefd„Zeefd„Zy)ÚSentinelar  
    Redis Sentinel cluster client

    >>> from redis.sentinel import Sentinel
    >>> sentinel = Sentinel([('localhost', 26379)], socket_timeout=0.1)
    >>> master = sentinel.master_for('mymaster', socket_timeout=0.1)
    >>> master.set('foo', 'bar')
    >>> slave = sentinel.slave_for('mymaster', socket_timeout=0.1)
    >>> slave.get('foo')
    b'bar'

    ``sentinels`` is a list of sentinel nodes. Each node is represented by
    a pair (hostname, port).

    ``min_other_sentinels`` defined a minimum number of peers for a sentinel.
    When querying a sentinel, if it doesn't meet this threshold, responses
    from that sentinel won't be considered valid.

    ``sentinel_kwargs`` is a dictionary of connection arguments used when
    connecting to sentinel instances. Any argument that can be passed to
    a normal Redis connection can be specified here. If ``sentinel_kwargs`` is
    not specified, any socket_timeout and socket_keepalive options specified
    in ``connection_kwargs`` will be used.

    ``connection_kwargs`` are keyword arguments that will be used when
    establishing a connection to a Redis server.
    Nc           	      ó   — |€5|j                  «       D ��ci c]  \  }}|j                  d«      sŒ||“Œ }}}|| _        |D ��	cg c]  \  }}	t        ||	fi | j                  ¤Ž‘Œ c}	}| _        || _        || _        || _        y c c}}w c c}	}w )NÚsocket_)ÚitemsÚ
startswithÚsentinel_kwargsr   Ú	sentinelsÚmin_other_sentinelsry   Ú_force_master_ip)
r"   r‘   r’   r�   Úforce_master_ipry   ÚkÚvÚhostnamer,   s
             r   r!   zSentinel.__init__ý   s    € ð Ð"à!2×!8Ñ!8Ó!:÷Ù˜˜A¸a¿l¹lÈ9Õ>U��1‘ðˆOñ ð  /ˆÔð #,÷
á�˜$ô �(˜DÑ9 D×$8Ñ$8Ó9ó
ˆŒð $7ˆÔ Ø!2ˆÔØ /ˆÕùóùó

s   –B°BÁ!B
c                 ól  — t        |j                  dd«      «      }t        |j                  dd«      «      }|r: t        j                  | j                  «      j
                  |i |¤Ž}|r|gS |rdS dS g }| j                  D ]#  }|j                   |j
                  |i |¤Ž«       Œ% |r|S t        |«      S )zÓ
        Execute Sentinel command in sentinel nodes.
        once - If set to True, then execute the resulting command on a single
        node at random, rather than across the entire sentinel cluster.
        ÚonceFÚreturn_responsesT)rQ   r   rg   Úchoicer‘   Úexecute_commandÚappendÚall)r"   Úargsr#   r™   rš   ÚresponseÚ	responsesÚsentinels           r   rœ   zSentinel.execute_command  sÁ   € ô �F—J‘J˜v uÓ-Ó.ˆô   §
¡
Ð+=¸uÓ EÓFÐáØD”v—}‘} T§^¡^Ó4×DÑDÀdÐUÈfÑUˆHÙØ �zÐ!á'�tÐ2¨UÐ2àˆ	ØŸ™ò 	HˆHØ×ÑÐ5˜X×5Ñ5°tÐF¸vÑFÕGð	Hñ ØÐä�9‹~Ðr   c                 ó  — g }| j                   D ]6  }|j                  dj                  |j                  j                  «      «       Œ8 dt        | «      j                  › dt        | «      j                  › ddj                  |«      › d�S )Nz{host}:{port}r&   r'   z(sentinels=[ú,z])>)	r‘   r�   Ú
format_mapr   ry   r)   r   r   Újoin)r"   Úsentinel_addressesr¢   s      r   r0   zSentinel.__repr__1  s†   € ØÐØŸ™ò 	ˆHØ×%Ñ%Ø×*Ñ*¨8×+CÑ+C×+UÑ+UÓVõð	ð
 ”�T“
×%Ñ%Ð& a¬¨T«
×(;Ñ(;Ð'<Ø˜3Ÿ8™8Ð$6Ó7Ð8¸ð=ð	
r   c                 óˆ   — d}| j                   D ]  }	 |j                  «        Œ |r|‚y# t        $ r}|€|}Y d}~Œ-d}~ww xY w)au  
        Close all sentinel clients created by this Sentinel and their
        connection pools.

        Each client is closed independently: if one raises, the remaining
        clients are still closed and the first error is re-raised afterwards.

        Clients returned by ``master_for``/``slave_for`` are owned by the
        caller and are not closed here.
        N)r‘   ÚcloseÚ	Exception)r"   Úexcr¢   Úes       r   r©   zSentinel.close<  sW   € ð ˆØŸ™ò 	ˆHðØ—‘Õ ð	ñ ØˆIð øô ò Ø�;Ø�Cÿøðús   “*ª	A³<¼Ac                 ó   — | S r9   r   rF   s    r   Ú	__enter__zSentinel.__enter__Q  s   € Øˆr   c                 ó$   — | j                  «        y r9   )r©   )r"   Úexc_typeÚ	exc_valueÚ	tracebacks       r   Ú__exit__zSentinel.__exit__T  s   € Ø�
‰
�r   c                 óJ   — |d   r
|d   s|d   ry|d   | j                   k  ryy)Nr;   Úis_sdownÚis_odownFznum-other-sentinelsT)r’   )r"   Ústater*   s      r   Úcheck_master_statezSentinel.check_master_stateW  s5   € Ø�[Ò! U¨:Ò%6¸%À
Ò:KØàÐ&Ñ'¨$×*BÑ*BÒBØØr   c                 ó.  — t        «       }t        | j                  «      D ]Ž  \  }}	 |j                  «       }|j                  |«      }|sŒ+| j                  ||«      sŒ>|| j                  d   c| j                  d<   | j                  |<   | j                  �| j                  n|d   }||d   fc S  d}	t        |«      dkD  rddj                  |«      › �}	t        d	|›|	› �«      ‚# t        t
        f$ r }|j                  |› d|›�«       Y d}~Œïd}~ww xY w)
zê
        Asks sentinel servers for the Redis master's address corresponding
        to the service labeled ``service_name``.

        Returns a pair (address, port) or raises MasterNotFoundError if no
        master is found.
        z - Nr   Úipr,   Ú z : z, zNo master found for )ÚlistÚ	enumerater‘   Úsentinel_mastersr
   r   r�   rw   r¸   r“   ri   r¦   r   )
r"   r*   Úcollected_errorsÚsentinel_nor¢   Úmastersr¬   r·   rº   Ú
error_infos
             r   rc   zSentinel.discover_master_  s7  € ô  ›6ÐÜ%.¨t¯~©~Ó%>ò 	)Ñ!ˆK˜ðØ"×3Ñ3Ó5�ð —K‘K Ó-ˆEÚ˜×0Ñ0°¸ÕEð Ø—N‘N 1Ñ%ð ?�—‘˜qÑ! 4§>¡>°+Ñ#>ð ×,Ñ,Ð8ð ×)Ò)à˜t™ð ð
 ˜5 ™=Ð(Ò(ð'	)ð* ˆ
ÜÐÓ  1Ò$Ø˜tŸy™yÐ)9Ó:Ð;Ð<ˆJÜ!Ð$8¸Ð8HÈÈÐ"UÓVÐVøô+ $¤\Ð2ò Ø ×'Ñ'¨8¨*°C¸°uÐ(=Ô>Üûðús   §C%Ã%DÃ4DÄDc                 ó`   — g }|D ]&  }|d   s|d   rŒ|j                  |d   |d   f«       Œ( |S )z1Remove slaves that are in an ODOWN or SDOWN stater¶   rµ   rº   r,   )r�   )r"   rk   Úslaves_aliver>   s       r   Úfilter_slaveszSentinel.filter_slaves‚  sK   € àˆØò 	>ˆEØ�ZÒ  E¨*Ò$5ØØ×Ñ  t¡¨e°F©mÐ <Õ=ð	>ð Ðr   c                 ó$   — | j                  |«      S )z©Remove replicas that are in an ODOWN or SDOWN state.

        This is an alias for :py:meth:`filter_slaves`,
        using the preferred Redis 5.0+ terminology.
        )rÅ   )r"   Úreplicass     r   Úfilter_replicaszSentinel.filter_replicas‹  s   € ð ×!Ñ! (Ó+Ð+r   c                 ó®   — | j                   D ]+  }	 |j                  |«      }| j                  |«      }|sŒ)|c S  g S # t        t        t        f$ r Y ŒFw xY w)z;Returns a list of alive slaves for service ``service_name``)r‘   Úsentinel_slavesr
   r   r   rÅ   )r"   r*   r¢   rk   s       r   rf   zSentinel.discover_slaves“  sf   € àŸ™ò 	ˆHðØ!×1Ñ1°,Ó?�ð ×'Ñ'¨Ó/ˆFÚØ’ð	ð ˆ	øô $¤]´LÐAò Ùðús   ‘=½AÁAc                 ó$   — | j                  |«      S )zµReturns a list of alive replicas for service ``service_name``.

        This is an alias for :py:meth:`discover_slaves`,
        using the preferred Redis 5.0+ terminology.
        )rf   )r"   r*   s     r   Údiscover_replicaszSentinel.discover_replicasŸ  s   € ð ×#Ñ# LÓ1Ð1r   c                 óŠ   — d|d<   t        | j                  «      }|j                  |«       |j                   ||| fi |¤Ž«      S )a9  
        Returns a redis client instance for the ``service_name`` master.
        Sentinel client will detect failover and reconnect Redis clients
        automatically.

        A :py:class:`~redis.sentinel.SentinelConnectionPool` class is
        used to retrieve the master's address before establishing a new
        connection.

        NOTE: If the master's address has changed, any cached connections to
        the old master are closed.

        By default clients will be a :py:class:`~redis.Redis` instance.
        Specify a different class to the ``redis_class`` argument if you
        desire something different.

        The ``connection_pool_class`` specifies the connection pool to
        use.  The :py:class:`~redis.sentinel.SentinelConnectionPool`
        will be used by default.

        All other keyword arguments are merged with any connection_kwargs
        passed to this class and passed to the connection pool as keyword
        arguments to be used to initialize Redis connections.

        HIMPORT note: the returned client exposes the HIMPORT command family
        (``himport_prepare``, ``himport_set``, ``himport_discard``,
        ``himport_discard_all``). Fieldsets are declared at runtime with
        ``himport_prepare`` on the client and live on that client's shared registry,
        so they survive Sentinel failover automatically: the pool re-points to the
        new master and the fieldset is re-prepared lazily on the next
        ``himport_set``. Each call to the current method returns a *new* client with
        its *own* empty registry, so call ``himport_prepare`` on the long-lived client
        you reuse rather than creating a fresh one per operation; otherwise ``himport_set``
        fails with ``no such fieldset``. (``himport_set`` is a write and is served by
        the master.)
        Tr;   ©Údictry   ÚupdateÚ	from_pool©r"   r*   Úredis_classÚconnection_pool_classr#   ry   s         r   Ú
master_forzSentinel.master_for§  sQ   € ðV #ˆˆ{ÑÜ  ×!7Ñ!7Ó8ÐØ× Ñ  Ô(Ø×$Ñ$Ù! ,°ÑJÐ8IÑJó
ð 	
r   c                 óŠ   — d|d<   t        | j                  «      }|j                  |«       |j                   ||| fi |¤Ž«      S )a  
        Returns redis client instance for the ``service_name`` slave(s).

        A SentinelConnectionPool class is used to retrieve the slave's
        address before establishing a new connection.

        By default clients will be a :py:class:`~redis.Redis` instance.
        Specify a different class to the ``redis_class`` argument if you
        desire something different.

        The ``connection_pool_class`` specifies the connection pool to use.
        The SentinelConnectionPool will be used by default.

        All other keyword arguments are merged with any connection_kwargs
        passed to this class and passed to the connection pool as keyword
        arguments to be used to initialize Redis connections.

        HIMPORT note: the returned client exposes the HIMPORT command family
        (``himport_prepare``, ``himport_set``, ``himport_discard``,
        ``himport_discard_all``). Fieldsets are declared at runtime with
        ``himport_prepare`` on the client and live on that client's shared registry,
        so they survive Sentinel failover automatically: the pool re-points to the
        new master and the fieldset is re-prepared lazily on the next
        ``himport_set``. Each call to current method returns a *new* client with
        its *own* empty registry, so call ``himport_prepare`` on the long-lived client
        you reuse rather than creating a fresh one per operation; otherwise ``himport_set``
        fails with ``no such fieldset``. (``himport_set`` is a write and is served by
        the master.)
        Fr;   rÎ   rÒ   s         r   Ú	slave_forzSentinel.slave_forÙ  sQ   € ðH $ˆˆ{ÑÜ  ×!7Ñ!7Ó8ÐØ× Ñ  Ô(Ø×$Ñ$Ù! ,°ÑJÐ8IÑJó
ð 	
r   c                 ó.   —  | j                   |f||dœ|¤ŽS )z¼
        Returns redis client instance for the ``service_name`` replica(s).

        This is an alias for :py:meth:`slave_for`,
        using the preferred Redis 5.0+ terminology.
        )rÓ   rÔ   )r×   )r"   r*   rÓ   rÔ   r#   s        r   Úreplica_forzSentinel.replica_for  s/   € ð ˆt�~‰~Øð
à#Ø"7ñ
ð ñ	
ð 	
r   )r   NN)ÚreturnN)r   r   r   rˆ   r!   rœ   r0   r©   r®   r³   r¸   rc   rÅ   rÈ   rf   rÌ   r   rs   rÕ   r×   rÙ   r   r   r   r‹   r‹   à   sy   „ ñð> ØØó0ò0ò8	
óò*òòò!WòFò,ò
ò2ð Ø4ó	0
ðj Ø4ó	)
ð\ Ø4ô	
r   r‹   )rg   rY   Útypingr   r   Úredis.clientr   Úredis.commandsr   Úredis.connectionr   r   r	   Úredis.exceptionsr
   r   r   r   Úredis.utilsr   r   r   ÚReplicaNotFoundErrorr   rU   rW   rs   r‹   r   r   r   ú<module>râ      s�   ðÛ Û ß "å Ý +ß FÑ F÷ó õ !ô	˜/ô 	ô	˜ô 	ð *Ð ô@ 
ô @ôF	Ð#<¸mô 	÷5$ñ 5$ôpB$˜^ô B$ôJv
Ðõ v
r   