
    g                        d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	m
Z
 e
rd dlmZ d dlmZmZmZ d
dZddZddZddd	Zy)    )annotationsN)TYPE_CHECKING)JSONSerializable)VERSIONSget_versionimport_optional_dependencyc                 V    	 ddl m}  | S # t        $ r ddlm}  |       }|d   cY S w xY w)za
    Use vendored versioneer code to get git hash, which handles
    git worktree correctly.
    r   )__git_version__)get_versionszfull-revisionid)pandas._version_mesonr
   ImportErrorpandas._versionr   )r
   r   versionss      X/var/www/dash_apps/app1/venv/lib/python3.12/site-packages/pandas/util/_print_versions.py_get_commit_hashr      s9    

+	
  +0>)**	+s   
 ((c                    t        j                         } t        j                         \  }}t	               dj                  t        j                  D cg c]  }t        |       c}      t        j                  d      dz  | j                  | j                  | j                  | j                  | j                  t        j                   t"        j$                  j'                  d      t"        j$                  j'                  d      ||ddS c c}w )zG
    Returns system information as a JSON serializable dictionary.
    .P   LC_ALLLANG)language-codeencoding)commitpythonzpython-bitsOSz
OS-releaseVersionmachine	processor	byteorderr   r   LOCALE)platformunamelocale	getlocaler   joinsysversion_infostrstructcalcsizesystemreleaseversionr   r   r    osenvironget)uname_resultlanguage_coder   is       r   _get_sys_infor5   (   s     >>#L$..0M8"$((C,<,<=qCF=>s+a/!!"**''''!++]]**..*

v&$1xH =s   D

c                     g d} | j                  t        t                     i }| D ]!  }t        |d      }|rt	        |      nd||<   # |S )zK
    Returns dependency information as a JSON serializable dictionary.
    )pandasnumpypytzdateutil
setuptoolspipCythonpytest
hypothesissphinxbloscfeather
xlsxwriterz
lxml.etreehtml5libpymysqlpsycopg2jinja2IPythonpandas_datareaderignore)errorsN)extendlistr   r   r   )depsresultmodnamemods       r   _get_dependency_inforR   >   sT    D8 	KKX*,F <(B.1+c*tw< M    c                   t               }t               }| r||d}| du r5t        j                  j	                  t        j                  |d             yt        | t              sJ t        j                  | dd      5 }t        j                  ||d       ddd       yt        |d	   t              sJ |d	   d
   }|d	   d   }| d| |d	<   t        d |D              }t        d       t        d       |j                         D ]  \  }}	t        |d| dd|	         t        d       |j                         D ]  \  }}	t        |d| dd|	         y# 1 sw Y   yxY w)a  
    Provide useful information, important for bug reports.

    It comprises info about hosting operation system, pandas version,
    and versions of other installed relative packages.

    Parameters
    ----------
    as_json : str or bool, default False
        * If False, outputs info in a human readable form to the console.
        * If str, it will be considered as a path to a file.
          Info will be written to that file in JSON format.
        * If True, outputs info in JSON format to the console.

    Examples
    --------
    >>> pd.show_versions()  # doctest: +SKIP
    Your output may look something like this:
    INSTALLED VERSIONS
    ------------------
    commit           : 37ea63d540fd27274cad6585082c91b1283f963d
    python           : 3.10.6.final.0
    python-bits      : 64
    OS               : Linux
    OS-release       : 5.10.102.1-microsoft-standard-WSL2
    Version          : #1 SMP Wed Mar 2 00:30:59 UTC 2022
    machine          : x86_64
    processor        : x86_64
    byteorder        : little
    LC_ALL           : None
    LANG             : en_GB.UTF-8
    LOCALE           : en_GB.UTF-8
    pandas           : 2.0.1
    numpy            : 1.24.3
    ...
    )r,   dependenciesT   )indentwbutf8)r   Nr!   r   r   r   c              3  2   K   | ]  }t        |        y w)N)len).0xs     r   	<genexpr>z show_versions.<locals>.<genexpr>   s     *SV*s   z
INSTALLED VERSIONSz------------------< z: )r5   rR   r'   stdout
writelinesjsondumps
isinstancer)   codecsopendumpdictmaxprintitems)
as_jsonsys_inforN   jfr3   r   maxlenkvs
             r   show_versionsrt   g   sq   J H!D6d?JJ!!$**Qq"9:gs+++WdV< *		!Qq)* * (8,d333 *?;H%j1 -az:*T**$%"#NN$ 	)DAqQq jMA3'(	)b	JJL 	)DAqQq jMA3'(	)* *s   ?EE')returnz
str | None)ru   zdict[str, JSONSerializable])F)rm   z
str | boolru   None)
__future__r   rf   rc   r$   r/   r"   r*   r'   typingr   pandas._typingr   pandas.compat._optionalr   r   r   r   r5   rR   rt    rS   r   <module>r|      sE    "    	   
  / +$,&R?)rS   