o
    h	                     @   s   d Z ddlZddlZddlZddlZddlmZ g dZe	e
ZdefddZdedefd	d
Zejdk r;ejjZn	ddededededee f
ddZejdkrXddlZnddlmZ h dZejdpqejdkoqejdkZdS )zKStuff that differs in different Python versions and platform
distributions.    N)IO)get_path_uidstdlib_pkgstomllibWINDOWSreturnc                  C   s2   zdd l } W dS  ty   Y nw ddlm} |S )Nr   T)IS_PYOPENSSL)_sslImportErrorpip._vendor.urllib3.utilr   )r	   r    r   M/var/www/html/venv/lib/python3.10/site-packages/pip/_internal/utils/compat.pyhas_tls   s   r   pathc                 C   sb   t tdrt| tjtjB }t|j}t| |S tj	| s*t
| j}|S t|  d)a)  
    Return path's uid.

    Does not follow symlinks:
        https://github.com/pypa/pip/pull/935#discussion_r5307003

    Placed this function in compat due to differences on AIX and
    Jython, that should eventually go away.

    :raises OSError: When path is a symlink or can't be read.
    
O_NOFOLLOWz/ is a symlink; Will not return uid for symlinks)hasattrosopenO_RDONLYr   fstatst_uidcloser   islinkstatOSError)r   fdfile_uidr   r   r   r      s   

	r   )      utf-8strictpackageresourceencodingerrorsc                 C   s   t j| | jd||dS )Nr)r#   r$   )	importlib	resourcesfilesr   )r!   r"   r#   r$   r   r   r   open_text_resource>   s   r)   )tomli>   pythonwsgirefargparsewinclint)r   r    )__doc__importlib.resourcesr&   loggingr   systypingr   __all__	getLogger__name__loggerboolr   strintr   version_infor'   	open_textr)   r   pip._vendorr*   r   platform
startswithnamer   r   r   r   r   <module>   s:    





$