
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
3
ÝPfS  ã               @   sÌ   d Z ddlmZ ddlZddlZddlZddlZddlmZ ddlm	Z	 ddlm
Z
 ddlmZ ydd	lmZ W n  ek
r�   dZdZdZY nX ddlZddlZd
d„ Zdd„ Zdd„ ZedkrÈeƒ  dS )z'Module containing bug report helper(s).é    )Úprint_functionN)Úidna)Úurllib3)Úchardeté   )Ú__version__)Ú	pyopensslc              C   sŽ   t jƒ } | dkrt jƒ }nj| dkr\dtjjtjjtjjf }tjjdkr„dj	|tjjgƒ}n(| dkrnt jƒ }n| dkr€t jƒ }nd}| |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.
    ZCPythonZPyPyz%s.%s.%sÚfinalÚ ZJythonZ
IronPythonÚUnknown)ÚnameÚversion)
ÚplatformZpython_implementationZpython_versionÚsysZpypy_version_infoÚmajorÚminorÚmicroÚreleaselevelÚjoin)ÚimplementationZimplementation_version© r   ú/usr/lib/python3.6/help.pyÚ_implementation   s     


r   c        	      C   sØ   yt jƒ t jƒ dœ} W n tk
r4   dddœ} Y nX tƒ }dtji}dtji}dddœ}trrtjdtj	j
 dœ}dttddƒi}dttddƒi}ttd	dƒ}d|dk	r°d| ndi}| ||tdk	|||||dtid
œ
S )z&Generate information for a bug report.)ÚsystemÚreleaser   r   Nr
   )r   Zopenssl_versionz%xr   ÚOPENSSL_VERSION_NUMBER)
r   r   Ú
system_sslZusing_pyopensslZ	pyOpenSSLr   r   Úcryptographyr   Zrequests)r   r   r   ÚIOErrorr   r   r   r   ÚOpenSSLZSSLr   Úgetattrr   r   Ússlr   Úrequests_version)	Zplatform_infoZimplementation_infoZurllib3_infoZchardet_infoZpyopenssl_infoZcryptography_infoZ	idna_infor   Zsystem_ssl_infor   r   r   Úinfo;   s8    

r#   c               C   s   t tjtƒ ddd�ƒ dS )z)Pretty-print the bug information as JSON.Té   )Z	sort_keysÚindentN)ÚprintÚjsonÚdumpsr#   r   r   r   r   Úmainr   s    r)   Ú__main__)Ú__doc__Z
__future__r   r'   r   r   r!   Zpip._vendorr   r   r   r
   r   r"   Zpackages.urllib3.contribr   ÚImportErrorr   r   r   r#   r)   Ú__name__r   r   r   r   Ú<module>   s,   
!7