a
    é´«já  ã                '   @  sè   d dl mZ d dlZd dlZd dlmZ d dlZd dlmZ d dl	m
Z
 erTd dlZddddd	d
ddddddddddddddddddd
dddddd dd!d"dd#d$d%d&œ&Zd'd(d)d*d+d,d-d.d/d0œ	Zd1d2d3œd4d5„Zd<d2d2d2d8d9œd:d;„ZdS )=é    )ÚannotationsN)ÚTYPE_CHECKING)Úfind_stack_level)ÚVersionz0.8.0z4.11.2z1.21.3z1.3.6z0.1.7z	2022.12.0z	2022.11.0z1.1z6.46.1z3.1.2z4.9.2z3.6.3z0.56.4z2.8.4z1.4.1z3.1.0z0.19.0z2.9.6z1.0.2z10.0.1z1.2.0z7.3.2z1.0.10z1.10.0z2.0.0z3.8.0z0.9.0z2.0.1z3.0.5z2022.7z2.3.0z5.15.9)&zadbc-driver-postgresqlzadbc-driver-sqliteÚbs4ZbloscÚ
bottleneckzdataframe-api-compatZfastparquetZfsspecÚhtml5libZ
hypothesisZgcsfsÚjinja2ú
lxml.etreeZ
matplotlibZnumbaZnumexprÚodfpyZopenpyxlÚ
pandas_gbqÚpsycopg2ZpymysqlZpyarrowZ
pyreadstatZpytestúpython-calamineZpyxlsbZs3fsZscipyÚ
sqlalchemyÚtablesÚtabulateZxarrayZxlrdZ
xlsxwriterZ	zstandardZtzdataZqtpyZpyqt5Zbeautifulsoup4Z
BottleneckZJinja2Úlxmlr   z
pandas-gbqr   Z
SQLAlchemyZpytables)	r   r   r	   r
   Zodfr   Zpython_calaminer   r   ztypes.ModuleTypeÚstr)ÚmoduleÚreturnc                 C  s>   t | dd ƒ}|d u r$td| j› �ƒ‚| jdkr:| ¡ d }|S )NÚ__version__zCan't determine version for r   r   )ÚgetattrÚImportErrorÚ__name__Úsplit)r   Úversion© r   úV/var/www/html/laksyashrimp/venv/lib/python3.9/site-packages/pandas/compat/_optional.pyÚget_versionJ   s    
r   Ú Úraisez
str | None)ÚnameÚextraÚerrorsÚmin_versionc                 C  s,  |dv sJ ‚t  | ¡}|dur"|n| }d|› d|› d|› d�}zt | ¡}W n$ typ   |dkrjt|ƒ‚Y dS 0 |  d¡d }|| kr˜|}tj| }	n|}	|dur¨|nt |¡}
|
�r(t	|	ƒ}|�r(t
|ƒt
|
ƒk �r(d	|
› d
|› d|› d�}|dk�rtj|ttƒ d� dS |dk�r$t|ƒ‚ndS |S )aI  
    Import an optional dependency.

    By default, if a dependency is missing an ImportError with a nice
    message will be raised. If a dependency is present, but too old,
    we raise.

    Parameters
    ----------
    name : str
        The module name.
    extra : str
        Additional text to include in the ImportError message.
    errors : str {'raise', 'warn', 'ignore'}
        What to do when a dependency is not found or its version is too old.

        * raise : Raise an ImportError
        * warn : Only applicable when a module's version is to old.
          Warns that the version is too old and returns None
        * ignore: If the module is not installed, return None, otherwise,
          return the module, even if the version is too old.
          It's expected that users validate the version locally when
          using ``errors="ignore"`` (see. ``io/html.py``)
    min_version : str, default None
        Specify a minimum version that is different from the global pandas
        minimum version required.
    Returns
    -------
    maybe_module : Optional[ModuleType]
        The imported module, when found and the version is correct.
        None is returned when the package is not found and `errors`
        is False, or when the package's version is too old and `errors`
        is ``'warn'`` or ``'ignore'``.
    >   ÚwarnÚignorer    NzMissing optional dependency 'z'. z Use pip or conda to install Ú.r    r   zPandas requires version 'z' or newer of 'z' (version 'z' currently installed).r%   )Ú
stacklevel)ÚINSTALL_MAPPINGÚgetÚ	importlibÚimport_moduler   r   ÚsysÚmodulesÚVERSIONSr   r   Úwarningsr%   ÚUserWarningr   )r!   r"   r#   r$   Úpackage_nameZinstall_nameÚmsgr   ÚparentZmodule_to_getÚminimum_versionr   r   r   r   Úimport_optional_dependencyU   sJ    (
ÿÿÿÿ
ý

r6   )r   r    N)Ú
__future__r   r+   r-   Útypingr   r0   Zpandas.util._exceptionsr   Zpandas.util.versionr   Útypesr/   r)   r   r6   r   r   r   r   Ú<module>   s|   Ú-÷   ü