o
    uvXj»  ã                   @   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ZddlZddl	Z	ddl
mZ zddlmZ W n eyA   dZdZdZY n	w ddlZddlZdd„ Zd	d
„ Zdd„ Zedkr_eƒ  dS dS )z'Module containing bug report helper(s).é    )Úprint_functionNé   )Ú__version__)Ú	pyopensslc                  C   sŽ   t  ¡ } | dkrt  ¡ }n5| 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r7t  ¡ }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   úJ/var/www/html/myproject/venv/lib/python3.10/site-packages/requests/help.pyÚ_implementation   s&   
þÿ€


r   c            	      C   sÐ   zt  ¡ t  ¡ dœ} W n ty   dddœ} Y nw tƒ }dtji}dtji}dddœ}tr8tjdtj	j
 dœ}dttddƒi}dttddƒi}tj
}d|durTd| ndi}| ||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_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_infor   r   r   Úinfo;   sL   
þ
þÿ

þ
þÿÿÿÿör8   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Údumpsr8   r   r   r   r   Úmainq   s   r?   Ú__main__)Ú__doc__Ú
__future__r   r=   r   r   r.   r'   r$   r%   r	   r   r/   Úurllib3.contribr   ÚImportErrorr*   r&   r   r8   r?   Ú__name__r   r   r   r   Ú<module>   s2    ý!6
ÿ