a oe#@sdZddlZddlZddlZddlZddlZddlZddlmZ z ddl Z Wne ybdZ Yn0z ddl Z Wne ydZ Yn0zddl mZWne ydZdZdZYn0ddlZddlZddZdd Zd d Zed kredS) z'Module containing bug report helper(s).N) __version__) pyopensslcCst}|dkrt}nj|dkr\dtjjtjjtjj}tjj dkrd |tjj g}n(|dkrnt}n|dkrt}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 3.10.3 it will return {'name': 'CPython', 'version': '3.10.3'}. 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{}.{}.{}finalZJythonZ IronPythonUnknown)nameversion) platformZpython_implementationZpython_versionformatsysZpypy_version_infomajorminormicro releaseleveljoin)implementationZimplementation_versionr.C:\Program Files\Certbot\pkgs\requests\help.py_implementation"s&      rc Cszttd}Wnty2ddd}Yn0t}dtji}ddi}ddi}trbdtji}trpdtji}ddd}t rt jt j j dd}dt t ddi}dt tddi}tj }d|dur|dndi} ||| tdutdu||||||dtid S) z&Generate information for a bug report.)systemreleaserr Nr)r Zopenssl_versionxr) r r system_sslZusing_pyopensslZusing_charset_normalizerZ pyOpenSSLurllib3chardetcharset_normalizer cryptographyidnaZrequests)r rrOSErrorrrrrrOpenSSLZSSLZOPENSSL_VERSION_NUMBERgetattrrrsslrrequests_version) Z platform_infoZimplementation_infoZ urllib3_infoZcharset_normalizer_infoZ chardet_infoZpyopenssl_infoZcryptography_infoZ idna_inforZsystem_ssl_inforrrinfoEsV         r$cCsttjtddddS)z)Pretty-print the bug information as JSON.T)Z sort_keysindentN)printjsondumpsr$rrrrmainsr*__main__)__doc__r(r r"r rrrrr#r ImportErrorrZurllib3.contribrr rrr$r*__name__rrrrs8         #;