Ë
    	êñi¸,  ã                  óÐ  — d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm	Z	 d dl
mZ d dlmZmZmZmZ erd dlmZ d	Zd	Zd	Zd	Zd	Zd	Zd	Zd	Zd	Zd	Zd	Zd	Zd	Zd	Z  G d
„ de«      Z!d+d„Z"erUd dl#Z#d dl$Z$d dl%Z%d dl&Z&d dl'Z'd dl(Z(d dl)Z)d dl*Z*d dl+Z+d dl,Z,d dl-Z-d dl.Z.d dl/Z/d dl0Z0d dl1Z1d dl2Z2d dl3Z3d dl4Z4d dl5Z4d dl6Z6d dl7Z7nÜ e"d«      \  Z#Z8 e"d«      \  Z$Z8 e"d«      \  Z%Z8 e"d«      \  Z&Z8 e"d«      \  Z'Z8 e"d«      \  Z(Z e"d«      \  Z)Z9 e"d«      \  Z*Z e"d«      \  Z+Z e"d«      \  Z,Z e"d«      \  Z-Z e"d«      \  Z.Z e"d«      \  Z/Z e"d«      \  Z0Z e"d«      \  Z1Z e"d«      \  Z2Z e"d«      \  Z3Z e"d«      \  Z4Z e"d«      \  Z7Z e"d «      \  Z6Z ed,d!„«       Z:d	d"œd-d#„Z;d	d"œd-d$„Z<d	d"œd-d%„Z=d	d"œd-d&„Z>d	d"œd-d'„Z?d	d"œd-d(„Z@	 	 	 	 	 d.	 	 	 	 	 	 	 	 	 	 	 	 	 d/d)„ZAg d*¢ZBy)0é    )ÚannotationsN)Úcache)Úimport_module)Ú	find_spec)Ú
ModuleType)ÚTYPE_CHECKINGÚAnyÚClassVarÚcast)ÚHashableTc                  ó^   ‡ — e Zd ZU dZdZdddddœZded	<   	 	 	 	 	 	 dˆ fd
„Zdd„Zdd„Z	ˆ xZ
S )Ú_LazyModulea/  
    Module that can act both as a lazy-loader and as a proxy.

    Notes
    -----
    We do NOT register this module with `sys.modules` so as not to cause
    confusion in the global environment. This way we have a valid proxy
    module for our own use, but it lives *exclusively* within polars.
    Tznp.zpd.zpa.zpc.)ÚnumpyÚpandasÚpyarrowÚpolars_cloudzClassVar[dict[str, str]]Ú_mod_pfxc               ó^   •— || _         || _        t        «       | _        t        ‰| �  |«       y)a‡  
        Initialise lazy-loading proxy module.

        Parameters
        ----------
        module_name : str
            the name of the module to lazy-load (if available).

        module_available : bool
            indicate if the referenced module is actually available (we will proxy it
            in both cases, but raise a helpful error when invoked if it doesn't exist).
        N)Ú_module_availableÚ_module_nameÚglobalsÚ_globalsÚsuperÚ__init__)ÚselfÚmodule_nameÚmodule_availableÚ	__class__s      €úV/var/www/pod-logistic/pod-ai/venv/lib/python3.12/site-packages/polars/_dependencies.pyr   z_LazyModule.__init__2   s+   ø€ ð$ "2ˆÔØ'ˆÔÜ›	ˆŒÜ‰Ñ˜Õ%ó    c                ó¬   — t        | j                  «      }|| j                  | j                  <   | j                  j                  |j                  «       |S ©N)r   Ú__name__r   r   Ú__dict__Úupdate)r   Úmodules     r   Ú_importz_LazyModule._importI   s?   € ä˜tŸ}™}Ó-ˆØ+1ˆ�‰�d×'Ñ'Ñ(Ø�‰×Ñ˜VŸ_™_Ô-Øˆr    c                óz  — |dk(  r| j                   ›d|›�}t        |«      ‚| j                  r| j                  «       }t	        ||«      S |dk(  r| j                   S t        j                  d|«      r|dk7  ry | j                  j                  | j                   d«      }|› |› d| j                   ›d�}t        |«      d ‚)	NÚ__wrapped__z object has no attribute r#   z	^__\w+__$Ú__version__Ú z
 requires z module to be installed)
r   ÚAttributeErrorr   r'   ÚgetattrÚreÚmatchr   ÚgetÚModuleNotFoundError)r   ÚnameÚmsgr&   Úpfxs        r   Ú__getattr__z_LazyModule.__getattr__P   sË   € ð �=Ò Ø×&Ñ&Ð)Ð)BÀ4À(ÐKˆCÜ  Ó%Ð%ð ×!Ò!à—\‘\“^ˆFÜ˜6 4Ó(Ð(ð �ZÒØ×$Ñ$Ð$Ü�X‰X�l DÔ)¨d°mÒ.Cð ð —-‘-×#Ñ# D×$5Ñ$5°rÓ:ˆCØ�E˜$˜˜z¨$×*;Ñ*;Ð)>Ð>UÐVˆCÜ% cÓ*°Ð4r    )r   Ústrr   ÚboolÚreturnÚNone)r8   r   )r2   r6   r8   r	   )r#   Ú
__module__Ú__qualname__Ú__doc__Ú__lazy__r   Ú__annotations__r   r'   r5   Ú__classcell__)r   s   @r   r   r      sW   ø… ñð €Hð ØØØñ	*€HÐ&ó ð&àð&ð ð	&ð
 
õ&ó.÷5r    r   c                óÒ   — | t         j                  v rt         j                  |    dfS 	 t        | «      }|du xs |j                  du  }t        | |¬«      |fS # t        $ r d}Y Œw xY w)aú  
    Lazy import the given module; avoids up-front import costs.

    Parameters
    ----------
    module_name : str
        name of the module to import, eg: "pyarrow".

    Notes
    -----
    If the requested module is not available (eg: has not been installed), a proxy
    module is created in its place, which raises an exception on any attribute
    access. This allows for import and use as normal, without requiring explicit
    guard conditions - if the module is never used, no exception occurs; if it
    is, then a helpful exception is raised.

    Returns
    -------
    tuple of (Module, bool)
        A lazy-loading module and a boolean indicating if the requested/underlying
        module exists (if not, the returned module is a proxy).
    TNF)r   r   )ÚsysÚmodulesr   Úloaderr1   r   )r   Úmodule_specr   s      r   Ú_lazy_importrE   k   s‡   € ð0 ”c—k‘kÑ!Ü�{‰{˜;Ñ'¨Ð-Ð-ð!Ü Ó,ˆØ +¨tÐ 3Ò Q°{×7IÑ7IÈTÐ7QÐRÐô 	Ø#Ø-ô	
ð 	ðð øô ò !Ø Òð!ús   © A ÁA&Á%A&ÚdataclassesÚhtmlÚjsonÚpickleÚ
subprocessÚaltairÚboto3Ú	deltalakeÚfsspecÚgeventÚgreat_tablesÚ
hypothesisr   r   r   r   ÚpydanticÚ	pyicebergÚtorchÚpytzc                óh   ‡— 	 t        ˆfd„| j                  «       D «       «      S # t        $ r Y yw xY w)Nc              3  ó>   •K  — | ]  }‰› d �t        |«      v –— Œ y­w)ú.N©r6   )Ú.0ÚoÚtype_s     €r   ú	<genexpr>z_might_be.<locals>.<genexpr>Ð   s    øè ø€ Ò<¨Q�e�W˜A�;¤# a£&Ô(Ñ<ùs   ƒF)ÚanyÚmroÚ	TypeError)Úclsr\   s    `r   Ú	_might_berb   Ê   s1   ø€ ð
ÜÓ<°#·'±'³)Ô<Ó<Ð<øÜò Ùðús   ƒ!% ¥	1°1)Ú
check_typec               óX   — t         xr# t        t        d|rt        | «      n| «      d«      S )Nr   r   )Ú_NUMPY_AVAILABLErb   r   Útype©Úobjrc   s     r   Ú_check_for_numpyri   Õ   ó*   € Üò ¤	ÜˆZ¡jœ˜cœ°cÓ:¸Gó!ð r    c               óX   — t         xr# t        t        d|rt        | «      n| «      d«      S )Nr   r   )Ú_PANDAS_AVAILABLErb   r   rf   rg   s     r   Ú_check_for_pandasrm   Û   s*   € Üò ¤ÜˆZ¡jœ˜cœ°cÓ:¸Hó"ð r    c               óX   — t         xr# t        t        d|rt        | «      n| «      d«      S )Nr   r   )Ú_PYARROW_AVAILABLErb   r   rf   rg   s     r   Ú_check_for_pyarrowrp   á   s*   € Üò ¤)ÜˆZ¡jœ˜cœ°cÓ:¸Ió#ð r    c               óX   — t         xr# t        t        d|rt        | «      n| «      d«      S )Nr   rR   )Ú_PYDANTIC_AVAILABLErb   r   rf   rg   s     r   Ú_check_for_pydanticrs   ç   s*   € Üò ¤9ÜˆZ¡jœ˜cœ°cÓ:¸Jó$ð r    c               óX   — t         xr# t        t        d|rt        | «      n| «      d«      S )Nr   rT   )Ú_TORCH_AVAILABLErb   r   rf   rg   s     r   Ú_check_for_torchrv   í   rj   r    c               óX   — t         xr# t        t        d|rt        | «      n| «      d«      S )Nr   rU   )Ú_PYTZ_AVAILABLErb   r   rf   rg   s     r   Ú_check_for_pytzry   ó   s*   € Üò œyÜˆZ¡jœ˜cœ°cÓ:¸Fó ð r    c           
     óä  — ddl m} ddlm} | j	                  dd«      d   }	 t        | «      }	|ra ||«      } ||	j                  «      }||k  rB|› d|› ddj                  d„ |D «       «      › ddj                  d„ |D «       «      › d�} ||«      ‚|	S # t        $ rS |r|j                  d«      › d�nd}
|rd|j                  d«      › �nd}|
› d| › d|› d	�|xs d
|› d�z   }t        |«      d‚w xY w)aj  
    Import an optional dependency, returning the module.

    Parameters
    ----------
    module_name : str
        Name of the dependency to import.
    err_prefix : str, optional
        Error prefix to use in the raised exception (appears before the module name).
    err_suffix: str, optional
        Error suffix to use in the raised exception (follows the module name).
    min_version : {str, tuple[int]}, optional
        If a minimum module version is required, specify it here.
    min_err_prefix : str, optional
        Override the standard "requires" prefix for the minimum version error message.
    install_message : str, optional
        Override the standard "Please install it using..." exception message fragment.

    Examples
    --------
    >>> from polars._dependencies import import_optional
    >>> import_optional(
    ...     "definitely_a_real_module",
    ...     err_prefix="super-important package",
    ... )  # doctest: +SKIP
    ImportError: super-important package 'definitely_a_real_module' not installed.
    Please install it using the command `pip install definitely_a_real_module`.
    r   )Úparse_version)ÚModuleUpgradeRequiredErrorrX   é   ú r+   ú'z.
z.Please install using the command `pip install z`.Nc              3  ó2   K  — | ]  }t        |«      –— Œ y ­wr"   rY   ©rZ   Úvs     r   r]   z"import_optional.<locals>.<genexpr>2  s   è ø€ Ò8 qœC ŸFÑ8ùó   ‚z or higher (found c              3  ó2   K  — | ]  }t        |«      –— Œ y ­wr"   rY   r�   s     r   r]   z"import_optional.<locals>.<genexpr>3  s   è ø€ Ò#@¨q¤C¨§FÑ#@ùrƒ   ú))Úpolars._utils.variousr{   Úpolars.exceptionsr|   Úsplitr   ÚImportErrorÚstripr1   r*   Újoin)r   Ú
err_prefixÚ
err_suffixÚmin_versionÚmin_err_prefixÚinstall_messager{   r|   Úmodule_rootr&   ÚprefixÚsuffixÚerr_messageÚmod_versionr3   s                  r   Úimport_optionalr–   ù   s>  € õH 4Ý<à×#Ñ# C¨Ó+¨AÑ.€Kð	9Ü˜{Ó+ˆñ Ù# KÓ0ˆÙ# F×$6Ñ$6Ó7ˆØ˜Ò$à!Ð" ! K =°Ø—8‘8Ñ8¨KÔ8Ó8Ð9ð :ØŸ8™8Ñ#@°KÔ#@Ó@ÐAÀðDð ñ
 -¨SÓ1Ð1à€Møô) ò 9Ù0:�J×$Ñ$ SÓ)Ð*¨!Ñ,ÀˆÙ0:�1�Z×%Ñ% cÓ*Ð+Ñ,ÀˆØ˜  + ¨a°¨x°sÐ;Øò PØ?À¸}ÈBÐOñ
ˆô " +Ó.°DÐ8ð9ús   £B ÂAC/)&rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   r   r   r   rR   rS   r   rT   rU   ri   rm   rp   rs   rv   ry   Ú_ALTAIR_AVAILABLEÚ_DELTALAKE_AVAILABLEÚ_FSSPEC_AVAILABLEÚ_GEVENT_AVAILABLEÚ_GREAT_TABLES_AVAILABLEÚ_HYPOTHESIS_AVAILABLEre   rl   Ú_POLARS_CLOUD_AVAILABLEro   rr   Ú_PYICEBERG_AVAILABLEru   )r   r6   r8   ztuple[ModuleType, bool])ra   rf   r\   r6   r8   r7   )rh   r	   rc   r7   r8   r7   )zrequired packagez	not foundNÚrequiresN)r   r6   rŒ   r6   r�   r6   rŽ   zstr | tuple[int, ...] | Noner�   r6   r�   z
str | Noner8   r	   )CÚ
__future__r   r.   rA   Ú	functoolsr   Ú	importlibr   Úimportlib.utilr   Útypesr   Útypingr   r	   r
   r   Úcollections.abcr   r—   r˜   r™   rš   r›   rœ   re   rl   r�   ro   rr   rž   ru   rx   r   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   r   r   r   r   rR   rS   Úpyiceberg.schemarU   rT   Ú_Ú_BOTO3_AVAILABLErb   ri   rm   rp   rs   rv   ry   r–   Ú__all__© r    r   ú<module>r¬      s»  ðÝ "ã 	Û 
Ý Ý #Ý $Ý ß 5Ó 5áÝ(àÐ ØÐ ØÐ ØÐ ØÐ ØÐ ØÐ ØÐ ØÐ ØÐ ØÐ ØÐ ØÐ Ø€ôJ5�*ô J5óZ*ñZ ÛÛÛÛÛãÛÛÛÛÛÛÛÛÛÛÛÛÛÛÜñ " -Ó0�N€K�Ù˜6Ó"�G€Dˆ!Ù˜6Ó"�G€Dˆ!Ù˜XÓ&�I€FˆAÙ  Ó.�M€J�ñ !-¨XÓ 6Ñ€FÐÙ*¨7Ó3Ñ€EÐÙ&2°;Ó&?Ñ#€IÐ#Ù ,¨XÓ 6Ñ€FÐÙ ,¨XÓ 6Ñ€FÐÙ,8¸Ó,HÑ)€LÐ)Ù(4°\Ó(BÑ%€JÐ%Ù*¨7Ó3Ñ€EÐÙ ,¨XÓ 6Ñ€FÐÙ,8¸Ó,HÑ)€LÐ)Ù".¨yÓ"9Ñ€GÐÙ$0°Ó$<Ñ!€HÐ!Ù&2°;Ó&?Ñ#€IÐ#Ù*¨7Ó3Ñ€EÐÙ(¨Ó0Ñ€Dˆ/ð òó ðð 6:õ ð 7;õ ð 8<õ ð 9=õ ð 6:õ ð 59õ ð )Ø!Ø04Ø$Ø"&ð>Øð>àð>ð ð>ð .ð	>ð
 ð>ð  ð>ð 	ó>òB+�r    