HOME


sh-3ll 1.0
DIR:/usr/local/lib64/python3.6/site-packages/pandas/compat/__pycache__/
Upload File :
Current File : //usr/local/lib64/python3.6/site-packages/pandas/compat/__pycache__/_optional.cpython-36.pyc
3

���h]�@s�ddlZddlZddlZddlZdddddddd	d
ddd
dddddddddddddd�Zddddddd d!�Zejed"�d#d$�Z	d+eee
ed(�d)d*�ZdS),�Nz4.6.0z1.2.1z0.7.4z0.3.2z0.6.0z3.8.0z2.2.2z2.6.2z1.3.0z2.5.7z0.12.0z0.13.0z3.4.3z5.0.1z1.0.6z0.4.0z1.2.0z1.1.4z0.8.3z0.8.2z1.1.0z0.9.8z0.46.0)�bs4�
bottleneckZfsspecZfastparquetZgcsfsz
lxml.etreeZ
matplotlibZnumexpr�odfpyZopenpyxl�
pandas_gbqZpyarrowZpytablesZpytestZpyxlsbZs3fsZscipy�
sqlalchemyZtables�tabulateZxarrayZxlrdZxlwtZ
xlsxwriterZnumbaZbeautifulsoup4Z
Bottleneck�lxmlrz
pandas-gbqZ
SQLAlchemyZJinja2)rrz
lxml.etreeZodfrrZjinja2)�module�returncCs<t|dd�}|dkr t|dd�}|dkr8td|j����|S)N�__version__Z__VERSION__zCan't determine version for )�getattr�ImportError�__name__)r	�version�r�9/tmp/pip-build-5_djhm0z/pandas/pandas/compat/_optional.py�_get_version2sr�T�raise)�name�extra�raise_on_missing�
on_versionc
Cs�tj|�}|dk	r|n|}d|�d|�d|�d�}ytj|�}Wn(tk
rh|r`t|�d�ndSYnXtj|�}|r�t|�}	tjj	|	�|kr�|d
ks�t
�d	|�d
|�d|	�d�}|dkr�tj|t
�dS|dkr�t|��|S)a
    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. This should be top-level only, so that the
        version may be checked.
    extra : str
        Additional text to include in the ImportError message.
    raise_on_missing : bool, default True
        Whether to raise if the optional dependency is not found.
        When False and the module is not present, None is returned.
    on_version : str {'raise', 'warn'}
        What to do when a dependency's version is too old.

        * raise : Raise an ImportError
        * warn : Warn that the version is too old. Returns None
        * ignore: Return the module, even if the version is too old.
          It's expected that users validate the version locally when
          using ``on_version="ignore"`` (see. ``io/html.py``)

    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 `raise_on_missing`
        is False, or when the package's version is too old and `on_version`
        is ``'warn'``.
    NzMissing optional dependency 'z'. z Use pip or conda to install �.�warnr�ignorezPandas requires version 'z' or newer of 'z' (version 'z' currently installed).>rrr)�INSTALL_MAPPING�get�	importlib�
import_moduler
�VERSIONSr�	distutilsrZLooseVersion�AssertionError�warningsr�UserWarning)
rrrr�package_nameZinstall_name�msgr	Zminimum_versionrrrr�import_optional_dependency=s*&


r')rTr)Zdistutils.versionr!r�typesr#r r�
ModuleType�strr�boolr'rrrr�<module>sJ