
    aVg                        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d	Zed
k(  r ej*                   e              yy)    )annotationsN)JSONSerializable)VERSIONSget_versionimport_optional_dependencyc                 &    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     \/var/www/html/hubwallet-dev/venv/lib/python3.12/site-packages/pandas/util/_print_versions.py_get_commit_hashr      s    
 -~H%&&    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_infor2      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_inforO   4   sT    D8 	KKX*,F <(B.1+c*tw< Mr   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.
    )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: )r2   rO   r$   stdout
writelinesjsondumps
isinstancer&   codecsopendumpdictmaxprintitems)
as_jsonsys_inforK   jfr0   r   maxlenkvs
             r   show_versionsrp   ]   sp    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'c                     ddl m}   |        }|j                  ddddd       |j                         \  }}|j                  d	k(  rd
|_        t        |j                         y)Nr   )OptionParserz-jz--jsonFILE   z>Save output as JSON into file, pass in '-' to output to stdout)metavarnargshelp-T)ri   )optparserr   
add_option
parse_argsr_   rp   )rr   parseroptionsargss       r   mainr      sd    %^F
M   '')OWd||s',,'r   __main__)returnz
str | None)r   zdict[str, JSONSerializable])F)ri   z
str | boolr   None)r   int)
__future__r   rb   r_   r!   r,   r   r'   r$   pandas._typingr   pandas.compat._optionalr   r   r   r   r2   rO   rp   r   __name__exit r   r   <module>r      sd    "    	   
 + ',&R))X, zCHHTV r   