U
    ÎZjÌ  ã                $   @  sÔ   d dl mZ d dlZd dlZd dlZd dlZd dlmZ d dlm	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'œ#Z
d(d)d*d+d,d-d.d/d0d1d2œ
Zd3d4d5œd6d7„Zd>d4d4d4d:d;œd<d=„ZdS )?é    )ÚannotationsN)Úfind_stack_level)ÚVersionz4.9.3z1.21.0z1.3.2z0.7.0z0.4.0z	2021.07.0z1.1z6.13.0z3.0.0z4.6.3z3.3.2z0.53.1z2.7.3z1.4.1z3.0.7z0.15.0z2.8.6z1.0.2z1.0.1z1.1.2z6.0z1.0.8z	2021.08.0z1.7.1z0.6.0z1.4.16z3.6.1z0.8.9z0.19.0z2.0.1z1.3.0z1.4.3z0.15.2z2022.1)#Úbs4ZbloscÚ
bottleneckÚbrotliZfastparquetZfsspecZhtml5libZ
hypothesisZgcsfsÚjinja2ú
lxml.etreeZ
matplotlibZnumbaZnumexprÚodfpyZopenpyxlÚ
pandas_gbqÚpsycopg2ZpymysqlZpyarrowZ
pyreadstatZpytestZpyxlsbZs3fsZscipyÚsnappyÚ
sqlalchemyÚtablesÚtabulateZxarrayZxlrdZxlwtZ
xlsxwriterZ	zstandardZtzdataZbeautifulsoup4Z
BottleneckZbrotlipyZJinja2Zlxmlr
   z
pandas-gbqzpython-snappyZ
SQLAlchemyZpytables)
r   r   r   r   r	   Zodfr   r   r   r   ztypes.ModuleTypeÚstr)ÚmoduleÚreturnc                 C  sn   t | dd ƒ}|d kr t | dd ƒ}|d krT| jdkr6dS | jdkrDdS td| j› �ƒ‚| jdkrj| ¡ d }|S )	NÚ__version__Z__VERSION__r   Ú r   zCan't determine version for r   r   )ÚgetattrÚ__name__ÚImportErrorÚsplit)r   Úversion© r   úZ/var/www/html/TRUCKING_PROJECT/venv/lib/python3.8/site-packages/pandas/compat/_optional.pyÚget_versionE   s    


r   r   Úraisez
str | None)ÚnameÚextraÚerrorsÚmin_versionc                 C  s.  |dkst ‚t | ¡}|dk	r"|n| }d|› d|› d|› d�}zt | ¡}W n, tk
rx   |dkrnt|ƒ‚nY dS Y nX |  d¡d }|| kr |}tj| }	n|}	|dk	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|ƒ‚|S )a9  
    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'``.
    >   r   ÚignoreÚwarnNz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)ÚAssertionErrorÚ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_dependencyZ   s@    )
ÿ
ÿ
ý
r5   )r   r   N)Ú
__future__r   r*   r,   Útypesr/   Zpandas.util._exceptionsr   Zpandas.util.versionr   r.   r(   r   r5   r   r   r   r   Ú<module>   st   Ý*ö   ü