3 ”Reú ã @sÌdZddlmZddlZddlZddlZddlZddlmZddlm Z ddlm Z ddl m Z ydd lmZWn ek r�dZdZdZYnXddlZddlZd d „Zd d „Zdd„ZedkrÈeƒdS)z'Module containing bug report helper(s).é)Úprint_functionN)Úidna)Úurllib3)Úchardeté)Ú __version__)Ú pyopensslcCsŽtjƒ}|dkrtjƒ}nj|dkr\dtjjtjjtjjf}tjjdkr„dj |tjjgƒ}n(|dkrntjƒ}n|dkr€tjƒ}nd}||d œS) a×Return 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. ÚCPythonÚPyPyz%s.%s.%sÚfinalÚÚJythonÚ IronPythonÚUnknown)ÚnameÚversion) ÚplatformÚpython_implementationÚpython_versionÚsysÚpypy_version_infoÚmajorÚminorÚmicroÚ releaselevelÚjoin)ÚimplementationÚimplementation_version©rúˆ/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/requests/help.pyÚ_implementations      r c CsÒytjƒtjƒdœ}Wntk r4dddœ}YnXtƒ}dtji}dtji}dddœ}trrtjdtj j dœ}dt t ddƒi}dt t ddƒi}tj }d|dk rªd|ndi}|||tdk |||||dtid œ S) z&Generate information for a bug report.)ÚsystemÚreleaserrNr )rÚopenssl_versionz%xr) rrÚ system_sslZusing_pyopensslZ pyOpenSSLrrÚ cryptographyrÚrequests)rr!r"ÚIOErrorr rrrÚOpenSSLZSSLÚOPENSSL_VERSION_NUMBERÚgetattrr%rÚsslrÚrequests_version) Z platform_infoZimplementation_infoZ urllib3_infoZ chardet_infoZpyopenssl_infoZcryptography_infoZ idna_infor$Zsystem_ssl_inforrrÚinfo;s8  r-cCsttjtƒddd�ƒdS)z)Pretty-print the bug information as JSON.Té)Ú sort_keysÚindentN)ÚprintÚjsonÚdumpsr-rrrrÚmainqsr4Ú__main__)Ú__doc__Ú __future__rr2rrr+Ú pip._vendorrrrr rr,Úpip._vendor.urllib3.contribrÚ ImportErrorr(r%r r-r4Ú__name__rrrrÚs,      !6