o
    d                     @  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Zd dlZd dlZd dl	m
Z
 d dlmZmZmZ dddZdd
dZdddZddddZdS )    )annotationsN)JSONSerializable)VERSIONSget_versionimport_optional_dependencyreturn
str | Nonec                  C  s   ddl m}  |  }|d S )za
    Use vendored versioneer code to get git hash, which handles
    git worktree correctly.
    r   )get_versionszfull-revisionid)pandas._versionr	   )r	   versions r   `/var/www/html/visualizacion-main/env/lib/python3.10/site-packages/pandas/util/_print_versions.py_get_commit_hash   s   r   dict[str, JSONSerializable]c                  C  sr   t  } t \}}t ddd tjD t	dd | j
| j| j| j| jtjtjdtjd||dd	S )
zG
    Returns system information as a JSON serializable dictionary.
    .c                 S  s   g | ]}t |qS r   )str).0ir   r   r   
<listcomp>&   s    z!_get_sys_info.<locals>.<listcomp>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structcalcsizesystemreleaseversionr   r    r!   osenvironget)uname_resultlanguage_coder   r   r   r   _get_sys_info   s   

r4   c                  C  sH   g d} |  tt i }| D ]}t|dd}|rt|nd||< q|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modr   r   r   _get_dependency_info4   s   rP   Fas_json
str | boolNonec           
      C  sR  t  }t }| rH||d}| du rtjtj|dd dS t| ts%J t	j
| ddd}tj||dd W d   dS 1 sAw   Y  dS t|d	 tsQJ |d	 d
 }|d	 d }| d| |d	< tdd |D }td td | D ]\}}	t|d| d|	  q{td | D ]\}}	t|d| d|	  qdS )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.
    )r,   dependenciesT   )indentwbutf8)r   Nr"   r   r   r   c                 s  s    | ]}t |V  qd S )N)len)r   xr   r   r   	<genexpr>   s    z show_versions.<locals>.<genexpr>z
INSTALLED VERSIONSz------------------<z:  )r4   rP   r(   stdout
writelinesjsondumps
isinstancer   codecsopendumpdictmaxprintitems)
rQ   sys_inforL   jfr3   r   maxlenkvr   r   r   show_versions]   s.   
"rp   )r   r   )r   r   )F)rQ   rR   r   rS   )
__future__r   rc   r`   r%   r/   r#   r*   r(   pandas._typingr   pandas.compat._optionalr   r   r   r   r4   rP   rp   r   r   r   r   <module>   s    


)