
    Zh                         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ZddlZddl	Z	ddl
mZ 	 ddlmZ ddlZddlZd Zd Zd	 Zed
k(  r e        yy# e$ r	 dZdZdZY $w xY w)z'Module containing bug report helper(s).    )print_functionN   )__version__)	pyopensslc                     t        j                         } | dk(  rt        j                         }n| dk(  rt        j                  j
                  dt        j                  j                  dt        j                  j                  }t        j                  j                  dk7  rbdj                  |t        j                  j                  g      }n6| dk(  rt        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.
    CPythonPyPy.final Jython
IronPythonUnknown)nameversion)
platformpython_implementationpython_versionsyspypy_version_infomajorminormicroreleaseleveljoin)implementationimplementation_versions     \/mounts/lovelace/software/anaconda3/envs/py312/lib/python3.12/site-packages/requests/help.py_implementationr      s     335N"!)!8!8!:	6	!/2/D/D/J/J/2/D/D/J/J/2/D/D/J/J"L   --8%'WW&(=(=(J(J. &" 
8	#!)!8!8!:	<	'!)!8!8!:!*"/EFF    c                      	 t        j                         t        j                         d} t	               }dt
        j                  i}dt        j                  i}ddd}t        r.t        j                  dt        j                  j                  z  d}dt        t        dd      i}dt        t        dd      i}t        j                  }d|d|z  ndi}| ||t        du|||||dt         id	
S # t        $ r ddd} Y w xY w)
z&Generate information for a bug report.)systemreleaser   r   Nr   )r   openssl_versionz%xr   )
r   r   
system_sslusing_pyopenssl	pyOpenSSLurllib3chardetcryptographyidnarequests)r   r"   r#   IOErrorr   r(   r   r)   OpenSSLSSLOPENSSL_VERSION_NUMBERgetattrr*   r+   sslr   requests_version)	platform_infoimplementation_infourllib3_infochardet_infopyopenssl_infocryptography_info	idna_infor%   system_ssl_infos	            r   infor<   ;   s.   	
oo''')
 *+w223Lw223L N **#gkk&H&HH

 	7<; 	743I ++J
(>4*$BO
 "-%$D0#)'
 ?  
 

s   )C, ,C=<C=c                  V    t        t        j                  t               dd             y)z)Pretty-print the bug information as JSON.T   )	sort_keysindentN)printjsondumpsr<    r    r   mainrE   q   s    	$**TVtA
67r    __main__)__doc__
__future__r   rB   r   r   r2   r+   r(   r)   r   r   r3   urllib3.contribr   r.   r*   ImportErrorr   r<   rE   __name__rD   r    r   <module>rL      sz    - %   
 
    -) GB3l8
 zF K  IGLs   A AA