
    d                        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Zdd	Zdd
ZdddZdS )    )annotationsN)JSONSerializable)VERSIONSget_versionimport_optional_dependencyreturn
str | Nonec                 2    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   versionss     W/var/www/html/t/fyr/venv311/lib/python3.11/site-packages/pandas/util/_print_versions.py_get_commit_hashr      s-    
 -,,,,,|~~H%&&    dict[str, JSONSerializable]c                    t          j                    } t          j                    \  }}t	                      d                    d t          j        D                       t          j	        d          dz  | 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                ,    g | ]}t          |          S  )str).0is     r   
<listcomp>z!_get_sys_info.<locals>.<listcomp>&   s    ===qCFF===r   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   s      r   _get_sys_infor9      s     >##L$.00M8"$$((==C,<===>>s++a/!"*''!+]*..**
v&&$1xHH  r   c                     g d} |                      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_inforV   4   su      D8 	KKX*,F < <(BBB.1;+c***twMr   Fas_json
str | boolNonec                X   t                      }t                      }| r||d}| du r5t          j                            t          j        |d                     dS t          | t                    sJ t          j
        | dd          5 }t          j        ||d           ddd           dS # 1 swxY w Y   dS t          |d	         t                    sJ |d	         d
         }|d	         d         }| d| |d	<   t          d |D                       }t          d           t          d           |                                D ]\  }}	t          |d| d|	            t          d           |                                D ]\  }}	t          |d| d|	            d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.
    )r1   dependenciesT   )indentwbutf8)r   Nr'   r   r   r   c              3  4   K   | ]}t          |          V  d S )N)len)r   xs     r   	<genexpr>z show_versions.<locals>.<genexpr>   s(      **SVV******r   z
INSTALLED VERSIONSz------------------<z:  )r9   rV   r-   stdout
writelinesjsondumps
isinstancer   codecsopendumpdictmaxprintitems)
rW   sys_inforR   jfr8   r   maxlenkvs
             r   show_versionsrx   ]   s4    H!!D )66d??J!!$*Qq"9"9"9:::::gs+++++WdV<<< *	!Qq))))* * * * * * * * * * * * * * * * * * (8,d33333 *?;H%j1 -::::**T*****$%%%"###NN$$ 	) 	)DAqQ'''''A''((((b			JJLL 	) 	)DAqQ'''''A''((((	) 	)s   B00B47B4)r   r	   )r   r   )F)rW   rX   r   rY   )
__future__r   rk   rh   r*   r4   r(   r/   r-   pandas._typingr   pandas.compat._optionalr   r   r   r   r9   rV   rx   r   r   r   <module>r|      s    " " " " " "    				   



 + + + + + +         ' ' ' '   ,& & & &R)) )) )) )) )) )) ))r   