+
    yȇiZ                        R t ^ RIHt ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RI	H
t
Ht ^ RIHt ]
'       d   ^ RIHt ]]P                   3R R ll4       t]P                   3R	 R
 lltR R ltRR R lltR# )zx
Helpers for configuring locale settings.

Name `localization` is chosen to avoid overlap with builtin `locale` module.
)annotations)contextmanagerN)TYPE_CHECKINGcast)options)	Generatorc               $    V ^8  d   QhRRRRRR/# )   
new_localezstr | tuple[str, str]lc_varintreturnz Generator[str | tuple[str, str]] )formats   "k/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/_config/localization.py__annotate__r      s$      1  1% 1/2 1% 1    c              #  $  "   \         P                  ! V4      p \         P                  ! W4       \         P                  ! 4       w  r4Ve   Ve   V RV 2x  MV x  \         P                  ! W4       R#   \         P                  ! Y4       i ; i5i)a	  
Context manager for temporarily setting a locale.

Parameters
----------
new_locale : str or tuple
    A string of the form <language_country>.<encoding>. For example to set
    the current locale to US English with a UTF8 encoding, you would pass
    "en_US.UTF-8".
lc_var : int, default `locale.LC_ALL`
    The category of the locale being set.

Notes
-----
This is useful when you want to run a particular block of code under a
particular locale, without globally setting the locale. This probably isn't
thread-safe.
N.)locale	setlocale	getlocale)r
   r   current_localenormalized_codenormalized_encodings   &&   r   
set_localer      s}     . %%f-N1,/5/?/?/A,&+>+J$%Q':&;<<00s   BAA5 B5BBc               $    V ^8  d   QhRRRRRR/# )r	   lcstrr   r   r   boolr   )r   s   "r   r   r   =   s!      s C D r   c                     \        WR7      ;_uu_ 4         RRR4       R#   + '       g   i     R# ; i  \        \        P                  3 d     R# i ; i)a6  
Check to see if we can set a locale, and subsequently get the locale,
without raising an Exception.

Parameters
----------
lc : str
    The locale to attempt to set.
lc_var : int, default `locale.LC_ALL`
    The category of the locale being set.

Returns
-------
bool
    Whether the passed locale can be set
)r   NTF)r   
ValueErrorr   Error)r   r   s   &&r   can_set_localer#   =   sI    "** +  +* 	 % s#   6 "6 3	6 6 AAc               $    V ^8  d   QhRRRRRR/# )r	   localeszlist[str] | str	normalizer   r   	list[str]r   )r   s   "r   r   r   X   s!      O   r   c                l   a V3R lV  4        Uu. uF  p\        V4      '       g   K  VNK  	  up# u upi )a>  
Return a list of normalized locales that do not throw an ``Exception``
when set.

Parameters
----------
locales : str
    A string where each locale is separated by a newline.
normalize : bool
    Whether to call ``locale.normalize`` on each locale.

Returns
-------
valid_locales : list
    A list of valid locales.
c              3     <"   T FA  pS'       d%   \         P                  ! VP                  4       4      MVP                  4       x  KC  	  R # 5i)N)r   r&   strip).0locr&   s   & r   	<genexpr>!_valid_locales.<locals>.<genexpr>k   s6      
 .7FSYY[)CIIKGs
   A<A)r#   )r%   r&   r,   s   &f r   _valid_localesr/   X   sB    &


C # 	
  s   11c               $    V ^8  d   QhRRRRRR/# )r	   prefixz
str | Noner&   r   r   r'   r   )r   s   "r   r   r   s   s&     =, =,=,=, =,r   c           
     R   \         P                  ! 4       R9   d   \        P                  ! RR.4      pM. #  VP	                  R4      p. pV FF  p VP                  \        V\        \        \        P                  P                  4      R7      4       KH  	  V f   \        XV4      # \        P                  ! V  R24      pVP!                  RP#                  X4      4      p\        Wq4      #   \         d!    TP                  \        TRR7      4        K  i ; i  \         d     Li ; i)	a  
Get all the locales that are available on the system.

Parameters
----------
prefix : str
    If not ``None`` then return only those locales with the prefix
    provided. For example to get all English language locales (those that
    start with ``"en"``), pass ``prefix="en"``.
normalize : bool
    Call ``locale.normalize`` on the resulting list of available locales.
    If ``True``, only locales that can be set without throwing an
    ``Exception`` are returned.

Returns
-------
locales : list of strings
    A list of locale strings that can be set with ``locale.setlocale()``.
    For example::

        locale.setlocale(locale.LC_ALL, locale_string)

On error will return an empty list (no locale available, e.g. Windows)

r   z-a   
)encodingzwindows-1252z.*
)LinuxDarwin)platformsystem
subprocesscheck_outputsplitappendr   r   r   displayr4   UnicodeError	TypeErrorr/   recompilefindalljoin)r1   r&   raw_localessplit_raw_localesout_localesxpatternfounds   &&      r   get_localesrK   s   s
   : // --x.>? 	 (--e4"AD""3q4W__=U=U3V#WX # ~k955jjF82'GOODIIk23E%++!   D ""3q>#BCD  s6   D AC*D *'DD DD D&%D&)NT)__doc__
__future__r   
contextlibr   r   r8   rA   r:   typingr   r   pandas._config.configr   collections.abcr   LC_ALLr   r#   r/   rK   r   r   r   <module>rS      sg    # %   	 
 *) 5;]] 1  1F +1-- 66=, =,r   