o
    թZh                  
   @  sn  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r*d dlZi 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%i d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4dd5d6d7dd8d9d:d;d<d=d>d?d@ddAdBdCdDd)dEdFdGdHZdIdJdKdLd$dMd4dNdOdP	Zd`dUdVZ	W	X	dadbd^d_ZdS )c    )annotationsN)TYPE_CHECKING)find_stack_level)Versionzadbc-driver-postgresqlz0.8.0zadbc-driver-sqlitebs4z4.11.2Zbloscz1.21.3
bottleneckz1.3.6zdataframe-api-compatz0.1.7Zfastparquetz	2022.12.0Zfsspecz	2022.11.0Zhtml5libz1.1Z
hypothesisz6.46.1Zgcsfsjinja2z3.1.2
lxml.etreez4.9.2Z
matplotlibz3.6.3Znumbaz0.56.4Znumexprz2.8.4Zodfpyz1.4.1Zopenpyxlz3.1.0
pandas_gbqz0.19.0psycopg2z2.9.6Zpymysqlz1.0.2Zpyarrowz10.0.1Z
pyreadstatz1.2.0Zpytestz7.3.2zpython-calamineZpyxlsbz1.0.10Zs3fsZscipyz1.10.0
sqlalchemyz2.0.0tablesz3.8.0tabulatez0.9.0ZxarrayZxlrdz2.0.1Z
xlsxwriterz3.0.5z2022.7z2.3.0z5.15.9)Z	zstandardZtzdataZqtpyZpyqt5Zbeautifulsoup4Z
BottleneckZJinja2Zlxmlz
pandas-gbqZ
SQLAlchemyZpytables)	r   r   r   r	   Zodfr
   Zpython_calaminer   r   moduletypes.ModuleTypereturnstrc                 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   N/var/www/html/lang_env/lib/python3.10/site-packages/pandas/compat/_optional.pyget_versionJ   s   
r    raisenameextraerrorsmin_version
str | Nonec                 C  s   |dv sJ t | }|dur|n| }d| d| d| d}zt| }W n ty8   |dkr5t|Y dS w | dd }|| krL|}tj| }	n|}	|durT|nt|}
|
rt	|	}|rt
|t
|
k rd	|
 d
| d| d}|dkrtj|tt d dS |dkrt|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'``.
    >   ignorer   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)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   sL   (
r4   )r   r   r   r   )r   r   N)r   r   r   r   r    r   r!   r"   )
__future__r   r)   r+   typingr   r.   Zpandas.util._exceptionsr   Zpandas.util.versionr   typesr-   r'   r   r4   r   r   r   r   <module>   s    	
 !"#-
