zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
U
®ý°dnã@s¤ddlmZddlZddlZddlZddlZddlZddlZddlZddl    m
Z
ddl m Z m Z mZddœdd„Zd    dœd
d „Zd    dœd d „Zddddœdd„ZdS)é)Ú annotationsN)ÚJSONSerializable)ÚVERSIONSÚ get_versionÚimport_optional_dependencyz
str | None)ÚreturncCsddlm}|ƒ}|dS)za
    Use vendored versioneer code to get git hash, which handles
    git worktree correctly.
    r)Ú get_versionszfull-revisionid)Zpandas._versionr)rÚversions©r
úRd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/util/_print_versions.pyÚ_get_commit_hashs r zdict[str, JSONSerializable]cCsrt ¡}t ¡\}}tƒd dd„tjDƒ¡t     d¡d|j
|j |j |j |jtjtj d¡tj d¡||dœd    œ S)
zG
    Returns system information as a JSON serializable dictionary.
    Ú.cSsg|] }t|ƒ‘qSr
)Ústr)Ú.0Úir
r
r Ú
<listcomp>&sz!_get_sys_info.<locals>.<listcomp>ÚPéÚLC_ALLÚLANG)ú language-codeÚencoding) ÚcommitÚpythonz python-bitsZOSz
OS-releaseÚVersionÚmachineÚ    processorÚ    byteorderrrÚLOCALE)ÚplatformÚunameÚlocaleÚ    getlocaler ÚjoinÚsysÚ version_infoÚstructÚcalcsizeÚsystemÚreleaseÚversionrrrÚosÚenvironÚget)Ú uname_resultÚ language_coderr
r
r Ú _get_sys_infos  
 
ôr0cCslddddddddd    d
d d d dddddddg}| ttƒ¡i}|D]$}t|dd}|r^t|ƒnd||<qB|S)zK
    Returns dependency information as a JSON serializable dictionary.
    ZpandasÚnumpyZpytzZdateutilÚ
setuptoolsÚpipZCythonZpytestZ
hypothesisZsphinxZbloscZfeatherZ
xlsxwriterz
lxml.etreeÚhtml5libZpymysqlZpsycopg2Zjinja2ZIPythonZpandas_datareaderÚignore)ÚerrorsN)ÚextendÚlistrrr)ÚdepsÚresultÚmodnameÚmodr
r
r Ú_get_dependency_info4s6æ r=Fz
str | boolÚNone)Úas_jsonrc
    Cs:tƒ}tƒ}|rv||dœ}|dkr:tj tj|dd¡n:t|tƒsHt    ‚t
j |ddd}tj ||ddW5QRXnÀt|dt ƒsˆt    ‚|dd    }|dd
}|›d |›|d<td d „|Dƒƒ}tdƒtdƒ| ¡D]"\}}    t|d|››d|    ›ƒqÜtdƒ| ¡D]$\}}    t|d|››d|    ›ƒqdS)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(Z dependenciesTé)ÚindentÚwbÚutf8)rrrrr css|]}t|ƒVqdS)N)Úlen)rÚxr
r
r Ú    <genexpr>sz show_versions.<locals>.<genexpr>z
INSTALLED VERSIONSz------------------ú<z: ÚN)r0r=r$ÚstdoutÚ
writelinesÚjsonÚdumpsÚ
isinstancerÚAssertionErrorÚcodecsÚopenÚdumpÚdictÚmaxÚprintÚitems)
r?Zsys_infor9ÚjÚfr/rÚmaxlenÚkÚvr
r
r Ú show_versions]s*
  r[)F)Ú
__future__rrOrKr!r+rr&r$Zpandas._typingrZpandas.compat._optionalrrrr r0r=r[r
r
r
r Ú<module>s   )