gL i xddlmZddlZddlZddlmZddlZddlmZddl m Z erddl Z iddddd d d d d dddddddddddddddddddd d!d"d#d$d%id&d'd(d)d*d+d,d-d.d/d0d1d2d3d4dd5d6d7dd8d9d:d;dd?d@ddAdBdCdDd)dEdFdGdHZ dIdJdKdLd$dMd4dNdOdP Z dSdQZ dT dUdRZy)V) annotationsN) TYPE_CHECKING)find_stack_level)Versionzadbc-driver-postgresqlz0.8.0zadbc-driver-sqlitebs4z4.11.2bloscz1.21.3 bottleneckz1.3.6zdataframe-api-compatz0.1.7 fastparquetz 2022.12.0fsspecz 2022.11.0html5libz1.1 hypothesisz6.46.1gcsfsjinja2z3.1.2 lxml.etreez4.9.2 matplotlibz3.6.3numbaz0.56.4numexprz2.8.4odfpyz1.4.1openpyxlz3.1.0 pandas_gbqz0.19.0psycopg2z2.9.6pymysqlz1.0.2pyarrowz10.0.1 pyreadstatz1.2.0pytestz7.3.2zpython-calaminepyxlsbz1.0.10s3fsscipyz1.10.0 sqlalchemyz2.0.0tablesz3.8.0tabulatez0.9.0xarrayxlrdz2.0.1 xlsxwriterz3.0.5z2022.7z2.3.0z5.15.9) zstandardtzdataqtpypyqt5beautifulsoup4 BottleneckJinja2lxmlz pandas-gbq SQLAlchemypytables) rr rrodfrpython_calaminerr ct|dd}|td|j|jdk(r|jd}|S)N __version__zCan't determine version for rr)getattr ImportError__name__split)moduleversions ]/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pandas/compat/_optional.py get_versionr:JsNfmT2G88IJKK *$--/!$ Nc8|dvsJtj|}||n|}d|d|d|d} tj|}|j dd}||k7r|}t j|} n|} ||ntj|} | rkt| } | r^t| t| krGd | d |d | d }|d k(r%tj|tty|dk(r t |y|S#t$r|dk(r t |YywxYw)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'``. >warnraiseignoreNzMissing optional dependency 'z'. z Use pip or conda to install .r>rzPandas requires version 'z' or newer of 'z ' (version 'z' currently installed).r=) stacklevel)INSTALL_MAPPINGget importlib import_moduler4r6sysmodulesVERSIONSr:rwarningsr= UserWarningr) nameextraerrors min_version package_name install_namemsgr7parent module_to_getminimum_versionr8s r9import_optional_dependencyrUUsdP 0 00 0"&&t,L#/#;<L ( ~S@''3nA 7((.ZZ_Q F ~  L1  %0%  /1 7"!#&& MA  W c" "sC==DD)r7ztypes.ModuleTypereturnstr)r>N)rKrWrLrWrMrWrNz str | None) __future__rrDrFtypingrrIpandas.util._exceptionsrpandas.util.versionrtypesrHrBr:rUr;r9r_s9" 4'' g' ''  8'  X '  ' '  G ' ;'  k' ' ('  ['  g' '' ''  X'  w!' " W#' $%' &('' ()' *w+' ,x-' .'/' 0 g1' 2w3' 4 h5' 6 K7' 8 X9' :';' < g=' >?' @ kA' B GC' D'E' F  M' Z  ( " S S S S Sr;