Ë
    ,V.jnc  ã                  ó  — U d Z ddlmZ ddlmZmZ ddlZddlmZm	Z	m
Z
mZmZmZ ddlZddlmZmZ ddlmZ erddlmZmZ  G d	„ d
e«      Z G d„ de«      Zi Zded<   i Zded<   i Zded<   dgZded<    G d„ dee«      Z d9d„Z!d:d;d„Z"d<d„Z#d=d>d„Z$d:d?d„Z%d@d„Z& G d„ d«      Z' G d „ d!ee   «      Z(d"Z)d#Z*d$Z+d%Z, e(e"e)«      a- e(e#e*«      a. e(e%e,«      Z/ e(e$e+«      Z0 e'e«      Z1 G d&„ d'e«      Z2	 	 	 dA	 	 	 	 	 	 	 	 	 	 	 dBd(„a3	 	 	 dC	 	 	 	 	 	 	 	 	 dDd)„Z4dEd*„Z5dFd+„Z6dGd,„Z7dHd-„Z8dHd.„Z9dId/„Z:dGd0„Z;dJd1„Z<dKdLd2„Z=edMd3„«       Z>dNd4„Z?dOd5„Z@dOd6„ZAdPd7„ZB e?eC«      ZD e?eE«      ZF e?eG«      ZH e?eI«      ZJ e@eIeKf«      ZLdQd8„ZMy)Raò  
The config module holds package-wide configurables and provides
a uniform API for working with them.

Overview
========

This module supports the following requirements:
- options are referenced using keys in dot.notation, e.g. "x.y.option - z".
- keys are case-insensitive.
- functions should accept partial/regex keys, when unambiguous.
- options can be registered by modules at import time.
- options can be registered at init-time (via core.config_init)
- options have a default value, and (optionally) a description and
  validation function associated with them.
- options can be deprecated, in which case referencing them
  should produce a warning.
- deprecated options can optionally be rerouted to a replacement
  so that accessing a deprecated option reroutes to a differently
  named option.
- options can be reset to their default value.
- all option can be reset to their default value at once.
- all options in a certain sub - namespace can be reset at once.
- the user can set / get / reset or ask for the description of an option.
- a developer can register and mark an option as deprecated.
- you can register a callback to be invoked when the option value
  is set or reset. Changing the stored value is considered misuse, but
  is not verboten.

Implementation
==============

- Data is stored using nested dictionaries, and should be accessed
  through the provided API.

- "Registered options" and "Deprecated options" have metadata associated
  with them, which are stored in auxiliary dictionaries keyed on the
  fully-qualified key, e.g. "x.y.z.option".

- the config_init module is imported by the package's __init__.py file.
  placing any register_option() calls there will ensure those options
  are available as soon as pandas is loaded. If you use register_option
  in a module, it will only be available after that module is imported,
  which you should be aware of.

- `config_prefix` is a context_manager (for use with the `with` keyword)
  which can save developers some typing, see the docstring.

é    )Úannotations)ÚContextDecoratorÚcontextmanagerN)ÚTYPE_CHECKINGÚAnyÚCallableÚGenericÚ
NamedTupleÚcast)ÚFÚT)Úfind_stack_level)Ú	GeneratorÚIterablec                  ó6   — e Zd ZU ded<   ded<   ded<   ded<   y)ÚDeprecatedOptionÚstrÚkeyú
str | NoneÚmsgÚrkeyÚremoval_verN©Ú__name__Ú
__module__Ú__qualname__Ú__annotations__© ó    úWC:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\pandas/_config/config.pyr   r   Q   s   … Ø	ƒHØ	ƒOØ
ÓØÔr   r   c                  ó@   — e Zd ZU ded<   ded<   ded<   ded<   ded	<   y
)ÚRegisteredOptionr   r   ÚobjectÚdefvalÚdocúCallable[[object], Any] | NoneÚ	validatorúCallable[[str], Any] | NoneÚcbNr   r   r   r    r"   r"   X   s   … Ø	ƒHØƒNØ	ƒHØ-Ó-Ø#Ô#r   r"   zdict[str, DeprecatedOption]Ú_deprecated_optionszdict[str, RegisteredOption]Ú_registered_optionsúdict[str, Any]Ú_global_configÚallú	list[str]Ú_reserved_keysc                  ó   — e Zd ZdZy)ÚOptionErrorzÛ
    Exception raised for pandas.options.

    Backwards compatible with KeyError checks.

    Examples
    --------
    >>> pd.options.context
    Traceback (most recent call last):
    OptionError: No such option
    N)r   r   r   Ú__doc__r   r   r    r2   r2   m   s   „ ò
r   r2   c                óì   — t        | «      }t        |«      dk(  r$|st        | «       t        dt	        | «      › �«      ‚t        |«      dkD  rt        d«      ‚|d   }|st        |«       t        |«      }|S )Nr   zNo such keys(s): é   zPattern matched multiple keys)Ú_select_optionsÚlenÚ_warn_if_deprecatedr2   ÚreprÚ_translate_key)ÚpatÚsilentÚkeysr   s       r    Ú_get_single_keyr>      ss   € Ü˜3Ó€DÜ
ˆ4ƒy�A‚~ÙÜ Ô$ÜÐ-¬d°3«i¨[Ð9Ó:Ð:Ü
ˆ4ƒy�1‚}ÜÐ9Ó:Ð:Ø
ˆq‰'€CáÜ˜CÔ ä
˜Ó
€Cà€Jr   c                ó@   — t        | |«      }t        |«      \  }}||   S ©N)r>   Ú	_get_root)r;   r<   r   ÚrootÚks        r    Ú_get_optionrD   ‘   s&   € Ü
˜#˜vÓ
&€Cô ˜‹n�G€Dˆ!Ø�‰7€Nr   c                 óZ  — t        | «      }|r|dz  dk7  rt        d«      ‚|j                  dd«      }|r1t        t	        |j                  «       «      «      }t        d|› d�«      ‚t        | d d d…   | dd d…   «      D ]Ÿ  \  }}t        ||«      }t        |«      }|r|j                  r|j                  |«       t        |«      \  }	}
||	|
<   |j                  sŒ\|r1t        j                  d	¬
«      5  |j                  |«       d d d «       Œ�|j                  |«       Œ¡ y # 1 sw Y   Œ¬xY w)Né   r   z4Must provide an even number of non-keyword argumentsr<   Fz2_set_option() got an unexpected keyword argument "Ú"r5   T)Úrecord)r7   Ú
ValueErrorÚpopÚnextÚiterr=   Ú	TypeErrorÚzipr>   Ú_get_registered_optionr'   rA   r)   ÚwarningsÚcatch_warnings)ÚargsÚkwargsÚnargsr<   ÚkwargrC   Úvr   ÚorB   Úk_roots              r    Ú_set_optionrY   ™   s  € ä�‹I€EÙ�E˜A‘I ’NÜÐOÓPÐPð �Z‰Z˜ %Ó(€FáÜ”T˜&Ÿ+™+›-Ó(Ó)ˆÜÐLÈUÈGÐSTÐUÓVÐVä�D™˜1˜‘I˜t A D q D™zÖ*‰ˆˆ1Ü˜a Ó(ˆä" 3Ó'ˆÙ�—’Ø�K‰K˜ŒNô ! “~‰ˆˆfØˆˆV‰à�4‹4ÙÜ×,Ñ,°DÖ9Ø—D‘D˜”I÷ :Ð9ð —‘�S•	ñ! +÷ :Ð9ús   Ã2D!Ä!D*	c                óÄ   — t        | «      }t        |«      dk(  rt        d«      ‚dj                  |D �cg c]  }t	        |«      ‘Œ c}«      }|rt        |«       y |S c c}w )Nr   úNo such keys(s)Ú
)r6   r7   r2   ÚjoinÚ_build_option_descriptionÚprint)r;   Ú_print_descr=   rC   Úss        r    Ú_describe_optionrb   ¹   s]   € Ü˜3Ó€DÜ
ˆ4ƒy�A‚~ÜÐ+Ó,Ð,à�	‰	¹Ó>¹°AÔ,¨QÕ/¸Ñ>Ó?€AáÜˆaŒØØ€Hùò ?s   ´Ac                óð   — t        | «      }t        |«      dk(  rt        d«      ‚t        |«      dkD  rt        | «      dk  r| dk7  rt        d«      ‚|D ]!  }t	        |t
        |   j                  |¬«       Œ# y )Nr   r[   r5   é   r.   z’You must specify at least 4 characters when resetting multiple keys, use the special keyword "all" to reset all the options to their default value©r<   )r6   r7   r2   rI   rY   r+   r$   )r;   r<   r=   rC   s       r    Ú_reset_optionrf   Æ   su   € Ü˜3Ó€Dä
ˆ4ƒy�A‚~ÜÐ+Ó,Ð,ä
ˆ4ƒy�1‚}œ˜S› Aš¨#°ª,ÜðDó
ð 	
ó ˆÜ�AÔ*¨1Ñ-×4Ñ4¸VÖDñ r   c                óF   — t        | d¬«      }t        |«      j                  S ©NTre   )r>   rO   r$   )r;   r   s     r    Úget_default_valri   ×   s   € Ü
˜# dÔ
+€CÜ! #Ó&×-Ñ-Ð-r   c                  ó>   — e Zd ZU dZded<   d	d
d„Zdd„Zdd„Zdd„Zy)ÚDictWrapperz/provide attribute-style access to a nested dictr,   Údc                ó`   — t         j                  | d|«       t         j                  | d|«       y )Nrl   Úprefix)r#   Ú__setattr__)Úselfrl   rn   s      r    Ú__init__zDictWrapper.__init__á   s&   € Ü×Ñ˜4  aÔ(Ü×Ñ˜4 ¨6Õ2r   c                óÌ   — t         j                  | d«      }|r|dz  }||z  }|| j                  v r*t        | j                  |   t        «      st        ||«       y t        d«      ‚)Nrn   Ú.z.You can only set the value of existing options)r#   Ú__getattribute__rl   Ú
isinstanceÚdictrY   r2   )rp   r   Úvalrn   s       r    ro   zDictWrapper.__setattr__å   s]   € Ü×(Ñ(¨¨xÓ8ˆÙØ�c‰MˆFØ�#‰ˆð �$—&‘&‰=¤¨D¯F©F°3©K¼Ô!>Ü˜ Õ$äÐNÓOÐOr   c                ó  — t         j                  | d«      }|r|dz  }||z  }	 t         j                  | d«      |   }t	        |t
        «      rt        ||«      S t        |«      S # t        $ r}t        d«      |‚d }~ww xY w)Nrn   rs   rl   zNo such option)r#   rt   ÚKeyErrorr2   ru   rv   rk   rD   )rp   r   rn   rV   Úerrs        r    Ú__getattr__zDictWrapper.__getattr__ñ   s‰   € Ü×(Ñ(¨¨xÓ8ˆÙØ�c‰MˆFØ�#‰ˆð	9Ü×'Ñ'¨¨cÓ2°3Ñ7ˆAô �aœÔÜ˜q &Ó)Ð)ä˜vÓ&Ð&øô ò 	9ÜÐ.Ó/°SÐ8ûð	9ús   ¤A$ Á$	A>Á-A9Á9A>c                óH   — t        | j                  j                  «       «      S r@   )Úlistrl   r=   )rp   s    r    Ú__dir__zDictWrapper.__dir__ÿ   s   € Ü�D—F‘F—K‘K“MÓ"Ð"r   N)Ú )rl   r,   rn   r   ÚreturnÚNone)r   r   rw   r   r€   r�   ©r   r   )r€   r/   )	r   r   r   r3   r   rq   ro   r{   r~   r   r   r    rk   rk   Ü   s    … Ù9àÓô3ó
Pó'ô#r   rk   c                  ó.   — e Zd Zdd„Zdd„Zedd„«       Zy)ÚCallableDynamicDocc                ó    — || _         || _        y r@   )Ú__doc_tmpl__Ú__func__)rp   ÚfuncÚdoc_tmpls      r    rq   zCallableDynamicDoc.__init__  s   € Ø$ˆÔØˆ�r   c                ó&   —  | j                   |i |¤ŽS r@   )r‡   )rp   rR   Úkwdss      r    Ú__call__zCallableDynamicDoc.__call__  s   € Øˆt�}‰}˜dÐ+ dÑ+Ð+r   c                ó¢   — t        dd¬«      }t        t        t        j	                  «       «      «      }| j
                  j                  ||¬«      S )Nr.   F)r`   )Ú	opts_descÚ	opts_list)rb   Úpp_options_listr}   r+   r=   r†   Úformat)rp   rŽ   r�   s      r    r3   zCallableDynamicDoc.__doc__  sC   € ä$ U¸Ô>ˆ	Ü#¤DÔ)<×)AÑ)AÓ)CÓ$DÓEˆ	Ø× Ñ ×'Ñ'°)ÀyÐ'ÓQÐQr   N)rˆ   zCallable[..., T]r‰   r   r€   r�   )r€   r   )r€   r   )r   r   r   rq   rŒ   Úpropertyr3   r   r   r    r„   r„     s"   „ óó,ð òRó ñRr   r„   aÓ  
get_option(pat)

Retrieves the value of the specified option.

Available options:

{opts_list}

Parameters
----------
pat : str
    Regexp which should match a single option.
    Note: partial matches are supported for convenience, but unless you use the
    full option name (e.g. x.y.z.option_name), your code may break in future
    versions if new options with similar names are introduced.

Returns
-------
result : the value of the option

Raises
------
OptionError : if no such option exists

Notes
-----
Please reference the :ref:`User Guide <options>` for more information.

The available options with its descriptions:

{opts_desc}

Examples
--------
>>> pd.get_option('display.max_columns')  # doctest: +SKIP
4
aŒ  
set_option(pat, value)

Sets the value of the specified option.

Available options:

{opts_list}

Parameters
----------
pat : str
    Regexp which should match a single option.
    Note: partial matches are supported for convenience, but unless you use the
    full option name (e.g. x.y.z.option_name), your code may break in future
    versions if new options with similar names are introduced.
value : object
    New value of option.

Returns
-------
None

Raises
------
OptionError if no such option exists

Notes
-----
Please reference the :ref:`User Guide <options>` for more information.

The available options with its descriptions:

{opts_desc}

Examples
--------
>>> pd.set_option('display.max_columns', 4)
>>> df = pd.DataFrame([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]])
>>> df
   0  1  ...  3   4
0  1  2  ...  4   5
1  6  7  ...  9  10
[2 rows x 5 columns]
>>> pd.reset_option('display.max_columns')
a�  
describe_option(pat, _print_desc=False)

Prints the description for one or more registered options.

Call with no arguments to get a listing for all registered options.

Available options:

{opts_list}

Parameters
----------
pat : str
    Regexp pattern. All matching keys will have their description displayed.
_print_desc : bool, default True
    If True (default) the description(s) will be printed to stdout.
    Otherwise, the description(s) will be returned as a unicode string
    (for testing).

Returns
-------
None by default, the description(s) as a unicode string if _print_desc
is False

Notes
-----
Please reference the :ref:`User Guide <options>` for more information.

The available options with its descriptions:

{opts_desc}

Examples
--------
>>> pd.describe_option('display.max_columns')  # doctest: +SKIP
display.max_columns : int
    If max_cols is exceeded, switch to truncate view...
aÍ  
reset_option(pat)

Reset one or more options to their default value.

Pass "all" as argument to reset all options.

Available options:

{opts_list}

Parameters
----------
pat : str/regex
    If specified only options matching `prefix*` will be reset.
    Note: partial matches are supported for convenience, but unless you
    use the full option name (e.g. x.y.z.option_name), your code may break
    in future versions if new options with similar names are introduced.

Returns
-------
None

Notes
-----
Please reference the :ref:`User Guide <options>` for more information.

The available options with its descriptions:

{opts_desc}

Examples
--------
>>> pd.reset_option('display.max_columns')  # doctest: +SKIP
c                  ó(   — e Zd ZdZdd„Zdd„Zdd„Zy)Úoption_contextaF  
    Context manager to temporarily set options in the `with` statement context.

    You need to invoke as ``option_context(pat, val, [(pat, val), ...])``.

    Examples
    --------
    >>> from pandas import option_context
    >>> with option_context('display.max_rows', 10, 'display.max_columns', 5):
    ...     pass
    c           	     ó¤   — t        |«      dz  dk7  st        |«      dk  rt        d«      ‚t        t        |d d d…   |dd d…   «      «      | _        y )NrF   r   z>Need to invoke as option_context(pat, val, [(pat, val), ...]).r5   )r7   rI   r}   rN   Úops)rp   rR   s     r    rq   zoption_context.__init__×  sS   € Üˆt‹9�q‰=˜AÒ¤ T£¨Q¢ÜØPóð ô œ˜D¡ 1 ™I t¨A¨D¨q¨D¡zÓ2Ó3ˆ�r   c                ó²   — | j                   D ��cg c]  \  }}|t        |«      f‘Œ c}}| _        | j                   D ]  \  }}t        ||d¬«       Œ y c c}}w rh   )r–   rD   ÚundorY   )rp   r;   rw   s      r    Ú	__enter__zoption_context.__enter__ß  sN   € Ø=A¿XºXÔF¹X±°°c�cœ; sÓ+Ò,¸XÒFˆŒ	àŸœ‰HˆC�Ü˜˜S¨Ö.ñ !ùó Gs   �Ac                ób   — | j                   r#| j                   D ]  \  }}t        ||d¬«       Œ y y rh   )r˜   rY   )rp   rR   r;   rw   s       r    Ú__exit__zoption_context.__exit__å  s,   € Ø�9Š9Ø ŸIœI‘��SÜ˜C ¨TÖ2ñ &ð r   N©r€   r�   )r   r   r   r3   rq   r™   r›   r   r   r    r”   r”   Ê  s   „ ñ
ó4ó/ô3r   r”   c           
     ó  — ddl }ddl}| j                  «       } | t        v rt	        d| › d�«      ‚| t
        v rt	        d| › d�«      ‚|r ||«       | j                  d«      }|D ]U  }t        j                  d|j                  z   dz   |«      st        |› d	�«      ‚|j                  |«      sŒIt        |› d
�«      ‚ t        }	d}
t        |dd «      D ]P  \  }}t        |	t        «      s-t	        |
j!                  dj#                  |d| «      ¬«      «      ‚||	vri |	|<   |	|   }	ŒR t        |	t        «      s-t	        |
j!                  dj#                  |dd «      ¬«      «      ‚||	|d   <   t%        | ||||¬«      t        | <   y)aÎ  
    Register an option in the package-wide pandas config object

    Parameters
    ----------
    key : str
        Fully-qualified key, e.g. "x.y.option - z".
    defval : object
        Default value of the option.
    doc : str
        Description of the option.
    validator : Callable, optional
        Function of a single argument, should raise `ValueError` if
        called with a value which is not a legal value for the option.
    cb
        a function of a single argument "key", which is called
        immediately after an option value is set/reset. key is
        the full name of the option.

    Raises
    ------
    ValueError if `validator` is specified and `defval` is not a valid value.

    r   NúOption 'z' has already been registeredz' is a reserved keyrs   Ú^Ú$z is not a valid identifierz is a python keywordz5Path prefix to option '{option}' is already an optionéÿÿÿÿ)Úoption)r   r$   r%   r'   r)   )ÚkeywordÚtokenizeÚlowerr+   r2   r0   ÚsplitÚreÚmatchÚNamerI   Ú	iskeywordr-   Ú	enumerateru   rv   r‘   r]   r"   )r   r$   r%   r'   r)   r£   r¤   ÚpathrC   Úcursorr   ÚiÚps                r    Úregister_optionr°   ë  s�  € ó> Ûà
�)‰)‹+€Cà
Ô!Ñ!Ü˜H S EÐ)FÐGÓHÐHØ
ŒnÑÜ˜H S EÐ)<Ð=Ó>Ð>ñ Ù�&Ôð �9‰9�S‹>€DãˆÜ�x‰x˜˜hŸm™mÑ+¨cÑ1°1Ô5Ü ˜sÐ"<Ð=Ó>Ð>Ø×Ñ˜QÕÜ ˜sÐ"6Ð7Ó8Ð8ð	 ô €FØ
A€Cä˜$˜s ˜)Ö$‰ˆˆ1Ü˜&¤$Ô'Ü˜cŸj™j°·±¸¸b¸q¸Ó0B˜jÓCÓDÐDØ�F‰?ØˆF�1‰IØ˜‘‰ð %ô �fœdÔ#Ü˜#Ÿ*™*¨C¯H©H°T¸#¸2°YÓ,?˜*Ó@ÓAÐAà€Fˆ4�‰8Ñô  0Ø˜ C°9Àô Ô˜Òr   c                ó|   — | j                  «       } | t        v rt        d| › d�«      ‚t        | |||«      t        | <   y)a  
    Mark option `key` as deprecated, if code attempts to access this option,
    a warning will be produced, using `msg` if given, or a default message
    if not.
    if `rkey` is given, any access to the key will be re-routed to `rkey`.

    Neither the existence of `key` nor that if `rkey` is checked. If they
    do not exist, any subsequence access will fail as usual, after the
    deprecation warning is given.

    Parameters
    ----------
    key : str
        Name of the option to be deprecated.
        must be a fully-qualified option name (e.g "x.y.z.rkey").
    msg : str, optional
        Warning message to output when the key is referenced.
        if no message is given a default message will be emitted.
    rkey : str, optional
        Name of an option to reroute access to.
        If specified, any referenced `key` will be
        re-routed to `rkey` including set/get/reset.
        rkey must be a fully-qualified option name (e.g "x.y.z.rkey").
        used by the default message if no `msg` is specified.
    removal_ver : str, optional
        Specifies the version in which this option will
        be removed. used by the default message if no `msg` is specified.

    Raises
    ------
    OptionError
        If the specified key has already been deprecated.
    rž   z)' has already been defined as deprecated.N)r¥   r*   r2   r   )r   r   r   r   s       r    Údeprecate_optionr²   6  sD   € ðN �)‰)‹+€Cà
Ô!Ñ!Ü˜H S EÐ)RÐSÓTÐTä/°°S¸$ÀÓLÔ˜Òr   c                óÖ   — | t         v r| gS t        t         j                  «       «      }| dk(  r|S |D �cg c]*  }t        j                  | |t        j
                  «      sŒ)|‘Œ, c}S c c}w )zb
    returns a list of keys matching `pat`

    if pat=="all", returns all registered options
    r.   )r+   Úsortedr=   r§   ÚsearchÚI)r;   r=   rC   s      r    r6   r6   i  sa   € ð Ô!Ñ!Øˆuˆô Ô%×*Ñ*Ó,Ó-€DØ
ˆe‚|ØˆáÓ7‘t�!œrŸy™y¨¨a´·±Õ6ŠA�tÑ7Ð7ùÒ7s   ´*A&ÁA&c                ó\   — | j                  d«      }t        }|d d D ]  }||   }Œ	 ||d   fS )Nrs   r¡   )r¦   r-   )r   r¬   r­   r¯   s       r    rA   rA   {  s<   € Ø�9‰9�S‹>€DÜ€FØ�#�2‹YˆØ˜‘‰ð à�4˜‘8ÐÐr   c                ó2   — | j                  «       } | t        v S )z4Returns True if the given option has been deprecated)r¥   r*   ©r   s    r    Ú_is_deprecatedrº   ƒ  s   € à
�)‰)‹+€CØÔ%Ð%Ð%r   c                ó8   — 	 t         |    }|S # t        $ r Y yw xY w)z±
    Retrieves the metadata for a deprecated option, if `key` is deprecated.

    Returns
    -------
    DeprecatedOption (namedtuple) if key is deprecated, None otherwise
    N)r*   ry   ©r   rl   s     r    Ú_get_deprecated_optionr½   ‰  s,   € ðÜ Ñ$ˆð ˆøô ò Ùðús   ‚	 �	˜c                ó,   — t         j                  | «      S )z¨
    Retrieves the option metadata if `key` is a registered option.

    Returns
    -------
    RegisteredOption (namedtuple) if key is deprecated, None otherwise
    )r+   Úgetr¹   s    r    rO   rO   ™  s   € ô ×"Ñ" 3Ó'Ð'r   c                ó@   — t        | «      }|r|j                  xs | S | S )z‚
    if key id deprecated and a replacement key defined, will return the
    replacement key, otherwise returns `key` as - is
    )r½   r   r¼   s     r    r:   r:   ¤  s$   € ô
 	˜sÓ#€AÙØ�v‰vŠ}˜Ðàˆ
r   c                óp  — t        | «      }|r©|j                  r/t        j                  |j                  t        t        «       ¬«       yd| › d�}|j                  r|d|j                  › �z  }|j                  r|d|j                  › d�z  }n|dz  }t        j                  |t        t        «       ¬«       yy	)
zŸ
    Checks if `key` is a deprecated option and if so, prints a warning.

    Returns
    -------
    bool - True if `key` is deprecated, False otherwise.
    )Ú
stacklevelÚ'z' is deprecatedz and will be removed in z, please use 'z
' instead.z, please refrain from using it.TF)r½   r   rP   ÚwarnÚFutureWarningr   r   r   )r   rl   r   s      r    r8   r8   °  s©   € ô 	˜sÓ#€AÙØ�5Š5Ü�M‰MØ—‘ÜÜ+Ó-õð ð �c�U˜/Ð*ˆCØ�}Š}ØÐ1°!·-±-°ÐAÑA�Ø�vŠvØ˜¨¯© x¨zÐ:Ñ:‘àÐ8Ñ8�ä�M‰M˜#œ}Ô9IÓ9KÕLØØr   c                ód  — t        | «      }t        | «      }| › d�}|j                  r<|dj                  |j                  j	                  «       j                  d«      «      z  }n|dz  }|r |d|j                  › dt        | d«      › d�z  }|r#|j                  xs d}|d	z  }|d
|› d�z  }|dz  }|S )zCBuilds a formatted description of a registered option and prints itÚ r\   zNo description available.z
    [default: z] [currently: TÚ]r   z
    (Deprecatedz, use `z
` instead.Ú))	rO   r½   r%   r]   Ústripr¦   r$   rD   r   )rC   rW   rl   ra   r   s        r    r^   r^   Î  sÀ   € ä˜qÓ!€AÜ˜qÓ!€Aàˆ#ˆQˆ€Aà‡u‚uØ	ˆT�Y‰Y�q—u‘u—{‘{“}×*Ñ*¨4Ó0Ó1Ñ1‰à	Ð(Ñ(ˆáØ	Ð §¡˜z¨¼ÀAÀtÓ8LÐ7MÈQÐOÑOˆáØ�v‰vŠ|˜ˆØ	Ð Ñ ˆØ	ˆw�t�f˜JÐ'Ñ'ˆØ	ˆS‰ˆà€Hr   c                óê  ‡‡— ddl m} ddlmŠ dˆˆfd„}g }t	        | «      D �cg c]  }|j                  d«      dk  sŒ|‘Œ }}|r| |d|«      z  }| D �cg c]  }|j                  d«      dk\  sŒ|‘Œ } } |t	        | «      d„ «      D ]8  \  }}	t        |	«      D �cg c]  }|t        |«      dz   d	 ‘Œ }
}| |||
«      z  }Œ: d
j                  |«      }|rt        |«       y	|S c c}w c c}w c c}w )z@Builds a concise listing of available options, grouped by prefixr   )Úgroupby)Úwrapc                ó€   •— | rd| z   dz   nd} ‰dj                  |«      ‰|dd¬«      }|r|d   r| r|d   d	z   |d<   |S )
Nz- z.[r   z, z  F)Úinitial_indentÚsubsequent_indentÚbreak_long_wordsr¡   rÈ   )r]   )ÚnameÚksÚpfxÚlsÚwidthrÍ   s       €€r    Úppzpp_options_list.<locals>.ppë  sY   ø€ Ù$(ˆd�T‰k˜DÒ ¨bˆÙØ�I‰I�b‹MØØØ"Ø"ô
ˆñ �"�R’&™TØ˜‘V˜c‘\ˆBˆr‰FØˆ	r   rs   r   c                ó*   — | d | j                  d«       S ©Nrs   )Úrfind)Úxs    r    Ú<lambda>z!pp_options_list.<locals>.<lambda>þ  s   € °°.°A·G±G¸C³LÑ0Ar   r5   Nr\   )rÒ   r   rÓ   úIterable[str]r€   r/   )
Ú	itertoolsrÌ   ÚtextwraprÍ   r´   Úfindr}   r7   r]   r_   )r=   rÖ   Ú_printrÌ   r×   rÕ   rÛ   ÚsinglesrC   ÚgrÓ   ra   rÍ   s    `          @r    r�   r�   æ  sî   ù€ å!Ýöð €BÜ  œ,Ó:™,�Q¨!¯&©&°«+¸«/Šq˜,€GÐ:ÙØ
‰b��W‹oÑˆÙÓ0‘t�!˜qŸv™v c›{¨aÓ/ŠA�t€DÐ0áœ˜t›Ñ&AÖB‰ˆˆ1Ü'+¨A¤wÓ/¡w !ˆa”�A“˜‘
�Šo wˆÐ/Ø
‰b��B‹i‰‰ð Cð 	�	‰	�"‹€AÙÜˆa�àˆùò ;ùò 1ùò 0s   ¥C&¿C&ÁC+Á1C+ÂC0c              #  ó²   ‡ K  — dˆ fd„}t         }t        }t        } |t        «      a |t        «      a |t         «      a 	 d–— |a|a|a y# |a|a|a w xY w­w)aÂ  
    contextmanager for multiple invocations of API with a common prefix

    supported API functions: (register / get / set )__option

    Warning: This is not thread - safe, and won't work properly if you import
    the API functions into your module using the "from x import y" construct.

    Example
    -------
    import pandas._config.config as cf
    with cf.config_prefix("display.font"):
        cf.register_option("color", "red")
        cf.register_option("size", " 5 pt")
        cf.set_option(size, " 6 pt")
        cf.get_option(size)
        ...

        etc'

    will register options "display.font.color", "display.font.size", set the
    value of "display.font.size"... and so on.
    c                ó4   •‡ — dˆ ˆfd„}t        t        |«      S )Nc                ó*   •— ‰› d| › �} ‰|g|¢­i |¤ŽS rÙ   r   )r   rR   r‹   Úpkeyrˆ   rn   s       €€r    Úinnerz*config_prefix.<locals>.wrap.<locals>.inner+  s(   ø€ Ø�X˜Q˜s˜eÐ$ˆDÙ˜Ð,˜tÒ, tÑ,Ð,r   r‚   )r   r   )rˆ   rè   rn   s   ` €r    rÍ   zconfig_prefix.<locals>.wrap*  s   ù€ ö	-ô ”A�u‹~Ðr   N)rˆ   r   r€   r   )r°   Ú
get_optionÚ
set_option)rn   rÍ   Ú_register_optionrD   rY   s   `    r    Úconfig_prefixrì     se   øè ø€ õ<ô 'ÐÜ€KÜ€KÙ”jÓ!€JÙ”jÓ!€JÙœ?Ó+€Oð+Ûà ˆ
Ø ˆ
Ø*‰øð !ˆ
Ø ˆ
Ø*‰üs   ƒ=AÁA ÁAÁAÁAc                ó   ‡ — dˆ fd„}|S )a  

    Parameters
    ----------
    `_type` - a type to be compared against (e.g. type(x) == `_type`)

    Returns
    -------
    validator - a function of a single argument x , which raises
                ValueError if type(x) is not equal to `_type`

    c                ó@   •— t        | «      ‰k7  rt        d‰› d�«      ‚y )NzValue must have type 'rÃ   )ÚtyperI   )rÛ   Ú_types    €r    rè   zis_type_factory.<locals>.innerQ  s)   ø€ Ü�‹7�eÒÜÐ5°e°W¸AÐ>Ó?Ð?ð r   rœ   r   )rð   rè   s   ` r    Úis_type_factoryrñ   C  s   ø€ õ@ð €Lr   c                ó¦   ‡ ‡— t        ‰ t        t        f«      r+t        ‰ «      Š dj                  t	        t
        ‰ «      «      Šnd‰ › d�Šdˆ ˆfd„}|S )zê

    Parameters
    ----------
    `_type` - the type to be checked against

    Returns
    -------
    validator - a function of a single argument x , which raises
                ValueError if x is not an instance of `_type`

    Ú|rÃ   c                ó:   •— t        | ‰«      st        d‰› �«      ‚y )NzValue must be an instance of )ru   rI   )rÛ   rð   Ú	type_reprs    €€r    rè   z"is_instance_factory.<locals>.innerk  s%   ø€ Ü˜!˜UÔ#ÜÐ<¸Y¸KÐHÓIÐIð $r   rœ   )ru   Útupler}   r]   Úmapr   )rð   rè   rõ   s   ` @r    Úis_instance_factoryrø   X  sJ   ù€ ô �%œ%¤˜Ô'Ü�e“ˆØ—H‘HœS¤ e›_Ó-‰	à˜�w˜a�Lˆ	öJð €Lr   c                óœ   ‡ ‡— ‰ D �cg c]  }t        |«      sŒ|‘Œ c}Š‰ D �cg c]  }t        |«      rŒ|‘Œ c}Š dˆˆ fd„}|S c c}w c c}w )Nc                óÖ   •‡ — ‰ ‰vr^t        ˆ fd„‰D «       «      sI‰D �cg c]  }t        |«      ‘Œ }}dj                  |«      }d|› �}t        ‰«      r|dz  }t	        |«      ‚y y c c}w )Nc              3  ó.   •K  — | ]  } |‰«      –— Œ y ­wr@   r   )Ú.0ÚcrÛ   s     €r    Ú	<genexpr>z3is_one_of_factory.<locals>.inner.<locals>.<genexpr>x  s   øè ø€ Ð/¡Y ‘q˜—t¡Yùs   ƒró   zValue must be one of z or a callable)Úanyr   r]   r7   rI   )rÛ   ÚlvalÚuvalsÚ	pp_valuesr   Ú	callablesÚlegal_valuess   `    €€r    rè   z is_one_of_factory.<locals>.innerv  ss   ù€ Ø�LÑ ÜÓ/¡YÓ/Ô/Ù/;Ó<©| tœ˜T�¨|�Ð<ØŸH™H U›O�	Ø-¨i¨[Ð9�Ü�y”>ØÐ+Ñ+�CÜ  “oÐ%ð 0ð !ùâ<s   ŸA&rœ   )Úcallable)r  rý   rè   r  s   `  @r    Úis_one_of_factoryr  r  sK   ù€ Ù(Ó8™L�q¬H°Q­K’˜LÑ8€IÙ+Ó?™|˜!´8¸Aµ;’A˜|Ñ?€Lö&ð €Lùò 9ùÚ?s   ‡A˜A£A	´A	c                óN   — | €yt        | t        «      r| dk\  ryd}t        |«      ‚)zö
    Verify that value is None or a positive int.

    Parameters
    ----------
    value : None or int
            The `value` to be checked.

    Raises
    ------
    ValueError
        When the value is not None or is a negative integer
    Nr   z+Value must be a nonnegative integer or None)ru   ÚintrI   )Úvaluer   s     r    Úis_nonnegative_intr
  ƒ  s/   € ð €}Øä	�Eœ3Ô	Ø�AŠ:Øà
7€CÜ
�S‹/Ðr   c                ó0   — t        | «      st        d«      ‚y)z»

    Parameters
    ----------
    `obj` - the object to be checked

    Returns
    -------
    validator - returns True if object is callable
        raises ValueError otherwise.

    zValue must be a callableT)r  rI   )Úobjs    r    Úis_callabler  ¥  s   € ô �CŒ=ÜÐ3Ó4Ð4Ør   )r;   r   r<   Úboolr€   r   )F)r;   r   r<   r  r€   r   rœ   )r   T)r;   r   r`   r  r€   r   )r;   r   r<   r  r€   r�   )r;   r   )r   NN)r   r   r$   r#   r%   r   r'   r&   r)   r(   r€   r�   )NNN)
r   r   r   r   r   r   r   r   r€   r�   )r;   r   r€   r/   )r   r   r€   ztuple[dict[str, Any], str])r   r   r€   r  r‚   )r   r   r€   r   )rC   r   r€   r   )éP   F)r=   rÝ   rÖ   r  rá   r  )rn   r   r€   zGenerator[None, None, None])rð   z	type[Any]r€   úCallable[[Any], None])r€   r  )r	  r#   r€   r�   )r€   r  )Nr3   Ú
__future__r   Ú
contextlibr   r   r§   Útypingr   r   r   r	   r
   r   rP   Úpandas._typingr   r   Úpandas.util._exceptionsr   Úcollections.abcr   r   r   r"   r*   r   r+   r-   r0   ÚAttributeErrorry   r2   r>   rD   rY   rb   rf   ri   rk   r„   Ú_get_option_tmplÚ_set_option_tmplÚ_describe_option_tmplÚ_reset_option_tmplré   rê   Úreset_optionÚdescribe_optionÚoptionsr”   r°   r²   r6   rA   rº   r½   rO   r:   r8   r^   r�   rì   rñ   rø   r  r
  r  Úis_intr  Úis_boolÚfloatÚis_floatr   Úis_strÚbytesÚis_textr  r   r   r    Ú<module>r&     sp  ðò0õd #÷ó 
÷÷ ó ÷õ 5á÷ô�zô ô$�zô $ð 46Ð Ð0Ó 5ð 46Ð Ð0Ó 5ð "$€�Ó #ð #˜G€�	Ó #ô�. (ô ó$ô$óô@
ôEó".÷
$#ñ $#ô`R˜ ™ô Rð %Ð ðN-Ð ð^&Ð ðP"Ð ñL   Ð-=Ó>€
Ù Ð-=Ó>€
Ù! -Ð1CÓD€Ù$Ð%5Ð7LÓM€Ù
�nÓ
%€ô3Ð%ô 3ðH Ø04Ø&*ðHØ	ðHàðHð 
ðHð .ð	Hð
 	$ðHð 
óHðZ ØØ"ð	,MØ	ð,Mà	ð,Mð ð,Mð ð	,Mð
 
ó,Móf8ó$ó&óó (ó	óó<ô0ðL ò/+ó ð/+óló*ó4ó"ñ6 
˜Ó	€Ù
˜$Ó
€Ù˜5Ó!€Ù	˜Ó	€Ù
˜s E˜lÓ
+€ôr   