3

V'íc€ã@sdZddlmZddlZddlZddlZddlZddlZddlZddl	m
ZyddlZWne
k
rpdZYnXyddlZWne
k
r–dZYnXyddlmZWn e
k
rÈdZdZdZYnXddlZddlZdd„Zd	d
„Zdd„Zed
kreƒdS)z'Module containing bug report helper(s).é)Úprint_functionNé)Ú__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ú1/tmp/pip-build-gk9425m9/requests/requests/help.pyÚ_implementation#s 


rc
Csüytjƒtjƒdœ}Wntk
r4dddœ}YnXtƒ}dtji}ddi}ddi}trddtji}trrdtji}dddœ}t	r”t	jdt	j
jdœ}dtt
ddƒi}dttddƒi}tj}d|dk	rÌd|ndi}	|||	tdk	tdk||||||dtid	œS)
z&Generate information for a bug report.)ÚsystemÚreleaserrNr	)rÚopenssl_versionz%xr)rrÚ
system_sslZusing_pyopensslZusing_charset_normalizerZ	pyOpenSSLÚurllib3ÚchardetÚcharset_normalizerÚcryptographyÚidnaÚrequests)rrrÚIOErrorrr"rr$r#ÚOpenSSLZSSLÚOPENSSL_VERSION_NUMBERÚgetattrr%r&ÚsslrÚrequests_version)
Z
platform_infoZimplementation_infoZurllib3_infoZcharset_normalizer_infoZchardet_infoZpyopenssl_infoZcryptography_infoZ	idna_infor!Zsystem_ssl_inforrrÚinfoDsF


r.cCsttjtƒdddƒdS)z)Pretty-print the bug information as JSON.Té)Ú	sort_keysÚindentN)ÚprintÚjsonÚdumpsr.rrrrÚmainsr5Ú__main__)Ú__doc__Ú
__future__rr3rrr,r&r"r	rr-r$ÚImportErrorr#Úurllib3.contribrr)r%rr.r5Ú__name__rrrrÚ<module>s:


!=