B ֈ`@sdZddlmZddlZddlZddlZddlZddlZddlZddl m Z y ddl Z Wne k rpdZ YnXy ddlZWne k rdZYnXyddlmZWn e k rdZdZdZYnXddlZddlZddZd d Zd d Zed kredS)z'Module containing bug report helper(s).)print_functionN) __version__) pyopensslcCst}|dkrt}nj|dkr\dtjjtjjtjjf}tjjdkrd |tjjg}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 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. CPythonPyPyz%s.%s.%sfinalJython IronPythonUnknown)nameversion) platformpython_implementationpython_versionsysZpypy_version_infomajorminormicro releaseleveljoin)implementationimplementation_versionr>/opt/alt/python37/lib/python3.7/site-packages/requests/help.py_implementation#s      rc Csyttd}Wntk r4ddd}YnXt}dtji}ddi}ddi}trddtji}trrdtji}ddd}t rt jdt j j d}dt t ddi}dt tddi}tj }d|dk rd|ndi} ||| tdk tdk||||||dtid S) z&Generate information for a bug report.)systemreleaser rNr )rZopenssl_versionz%xr) rr system_sslZusing_pyopensslZusing_charset_normalizerZ pyOpenSSLurllib3chardetcharset_normalizer cryptographyidnarequests)rrrIOErrorrr rr"r!OpenSSLSSLZOPENSSL_VERSION_NUMBERgetattrr#r$sslrrequests_version) platform_infoZimplementation_infoZ urllib3_infoZcharset_normalizer_infoZ chardet_infoZpyopenssl_infoZcryptography_infoZ idna_inforZsystem_ssl_inforrrinfoDsF   r-cCsttjtddddS)z)Pretty-print the bug information as JSON.T) sort_keysindentN)printjsondumpsr-rrrrmainsr4__main__)__doc__ __future__rr2rrr*r$r r rr+r" ImportErrorr!Zurllib3.contribrr'r#rr-r4__name__rrrrs:       !=