o Ec@sdZddlmZddlZddlZddlZddlZddlmZddlm Z ddl m Z dZ zddlmZWn ey?dZYnwzdd lmZWneyWdZdZdZYn wddlZddlZd d Zd d ZddZedkruedSdS)z'Module containing bug report helper(s).)print_functionN)idna)urllib3) __version__)chardet) pyopensslcCst}|dkr t}n5|dkr.dtjjtjjtjjf}tjjdkr-d |tjjg}n|dkr7t}n |dkr@t}nd}||d S) aReturn a dict with the Python implementation and version. Provide both the name and the version of the Python implementation currently running. For example, on CPython 2.7.5 it will return {'name': 'CPython', 'version': '2.7.5'}. This function works best on CPython and PyPy: in particular, it probably doesn't work for Jython or IronPython. Future investigation should be done to work out the correct shape of the code for those platforms. ZCPythonZPyPyz%s.%s.%sfinalZJythonZ IronPythonUnknown)nameversion) platformZpython_implementationZpython_versionsysZpypy_version_infomajorminormicro releaseleveljoin)implementationZimplementation_versionrL/opt/alt/python310/lib/python3.10/site-packages/pip/_vendor/requests/help.py_implementation s&      rc Csz ttd}Wntyddd}Ynwt}dtji}ddi}ddi}tr1dtji}tr8dtji}ddd}t rIt jdt j j d}dt t ddi}dt tddi}tj }d|dured|ndi} ||| tdutdu||||||dtid S) z&Generate information for a bug report.)systemreleaser r Nr )r Zopenssl_versionz%xr) rr system_sslZusing_pyopensslZusing_charset_normalizerZ pyOpenSSLrrcharset_normalizer cryptographyrZrequests)rrrIOErrorrrrrrOpenSSLZSSLZOPENSSL_VERSION_NUMBERgetattrrrsslrrequests_version) Z platform_infoZimplementation_infoZ urllib3_infoZcharset_normalizer_infoZ chardet_infoZpyopenssl_infoZcryptography_infoZ idna_inforZsystem_ssl_inforrrinfoAsZ        r#cCsttjtddddS)z)Pretty-print the bug information as JSON.T)Z sort_keysindentN)printjsondumpsr#rrrrmain~sr)__main__)__doc__Z __future__rr'rrr!Z pip._vendorrrr rr"rr ImportErrorZpip._vendor.urllib3.contribrrrrr#r)__name__rrrrs<      !=