a
    hbòf„  ã                   @   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ZzddlmZ W n ey~   dZY n0 zdd	lmZ W n ey®   dZdZdZY n0 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é   )Ú__version__)Úchardet)Ú	pyopensslc                  C   sŽ   t  ¡ } | dkrt  ¡ }nj| dkr\dtjjtjjtjjf }tjjdkr„d 	|tjjg¡}n(| dkrnt  ¡ }n| dkr€t  ¡ }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.
    Ú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   úV/home/httpd/docs/test/DocsMgr/lib/python3.9/site-packages/pip/_vendor/requests/help.pyÚ_implementation    s$    
þÿ

r    c            
      C   sú   zt  ¡ t  ¡ dœ} W n ty2   dddœ} Y n0 tƒ }dtji}ddi}ddi}trbdtji}trpdtji}dddœ}t	r’t	jdt	j
j dœ}dttddƒi}dttddƒi}tj}d|durÊd| ndi}	| ||	tdutdu ||||||dtid	œS )
z&Generate information for a bug report.)ÚsystemÚreleaser   r   Nr   )r   Úopenssl_versionz%xr   )r   r   Ú
system_sslZusing_pyopensslZusing_charset_normalizerZ	pyOpenSSLr   r   Úcharset_normalizerÚcryptographyr   Úrequests)r   r!   r"   ÚIOErrorr    r   r   r%   r   ÚOpenSSLZSSLÚOPENSSL_VERSION_NUMBERÚgetattrr&   r   Ússlr   Úrequests_version)
Zplatform_infoZimplementation_infoZurllib3_infoZcharset_normalizer_infoZchardet_infoZpyopenssl_infoZcryptography_infoZ	idna_infor$   Zsystem_ssl_infor   r   r   ÚinfoA   sX    þ
þ


þ
þÿÿÿÿôr.   c                   C   s   t tjtƒ ddd�ƒ dS )z)Pretty-print the bug information as JSON.Té   )Ú	sort_keysÚindentN)ÚprintÚjsonÚdumpsr.   r   r   r   r   Úmain~   s    r5   Ú__main__)Ú__doc__Ú
__future__r   r3   r   r   r,   Úpip._vendorr   r   r   r   r-   r%   r   ÚImportErrorÚpip._vendor.urllib3.contribr   r)   r&   r    r.   r5   Ú__name__r   r   r   r   Ú<module>   s4   

!=