3
”Reú
ã @ sÌ d Z ddlmZ ddlZddlZddlZddlZddlmZ ddlm Z ddlm
Z
ddlmZ
ydd lmZ W n ek
r� dZdZdZY nX ddlZddlZd
d„ Zdd
„ Zdd„ ZedkrÈeƒ dS )z'Module containing bug report helper(s).é )Úprint_functionN)Úidna)Úurllib3)Úchardeté )Ú__version__)Ú pyopensslc C sŽ t jƒ } | dkrt jƒ }nj| dkr\dtjjtjjtjjf }tjjdkr„dj |tjjgƒ}n(| dkrnt jƒ }n| dkr€t jƒ }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Ú_implementation s
r c C sÒ yt jƒ t jƒ dœ} W n tk
r4 dddœ} Y nX tƒ }dtji}dtji}dddœ}trrtjdtj j
dœ}dttddƒi}dtt
ddƒi}tj
}d|dk rªd| ndi}| ||tdk |||||dtid œ
S )
z&Generate information for a bug report.)ÚsystemÚreleaser r Nr )r Úopenssl_versionz%xr )
r r Ú
system_sslZusing_pyopensslZ pyOpenSSLr r Úcryptographyr Úrequests)r r! r" ÚIOErrorr r r r ÚOpenSSLZSSLÚOPENSSL_VERSION_NUMBERÚgetattrr% r Ússlr Úrequests_version) Z
platform_infoZimplementation_infoZurllib3_infoZchardet_infoZpyopenssl_infoZcryptography_infoZ idna_infor$ Zsystem_ssl_infor r r Úinfo; s8
r- c C s t tjtƒ ddd�ƒ dS )z)Pretty-print the bug information as JSON.Té )Ú sort_keysÚindentN)ÚprintÚjsonÚdumpsr- r r r r Úmainq s r4 Ú__main__)Ú__doc__Ú
__future__r r2 r r r+ Úpip._vendorr r r r r r, Úpip._vendor.urllib3.contribr ÚImportErrorr( r% r r- r4 Ú__name__r r r r Ú