3 M(Y  @sdZddlmZddlZddlZddlZddlZddlZddlZddl Z ddl m Z yddl mZWn ek rdZdZdZYnXddlZddlZddZd d Zd d Zed kredS)z'Module containing bug report helper(s).)print_functionN) __version__) pyopensslcCstj}|dkrtj}nj|dkr\dtjjtjjtjjf}tjjdkrdj |tjjg}n(|dkrntj}n|dkrtj}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_versionsyspypy_version_infomajorminormicro releaseleveljoin)implementationimplementation_versionr9/private/tmp/pip-build-nl73fm5q/requests/requests/help.py_implementations      rc Csytjtjd}Wntk r4ddd}YnXt}dtji}dtji}ddd}trrtjdtj j d}dt t ddi}dt t ddi}t td d}d|dk rd|ndi}|||tdk |||||dtid S) z&Generate information for a bug report.)systemreleaser rNr )ropenssl_versionz%xrOPENSSL_VERSION_NUMBER) rr system_sslZusing_pyopensslZ pyOpenSSLurllib3chardet cryptographyidnarequests)rrrIOErrorrr#rr$OpenSSLZSSLr!getattrr%r&sslrrequests_version) Z platform_infoZimplementation_infoZ urllib3_infoZ chardet_infoZpyopenssl_infoZcryptography_infoZ idna_infor"Zsystem_ssl_inforrrinfo;s8   r-cCsttjtddddS)z)Pretty-print the bug information as JSON.T) sort_keysindentN)printjsondumpsr-rrrrmainrsr4__main__)__doc__ __future__rr2rrr+r&r#r$r rr,Zpackages.urllib3.contribr ImportErrorr)r%rr-r4__name__rrrrs,   !7