File: //usr/local/lib/python3.10/dist-packages/pip/_internal/utils/__pycache__/compat.cpython-310.pyc
o
��h� � @ s� d Z ddlZddlZddlZddlZddlmZ g d�Ze� e
�Zdefdd�Z
dedefd d
�Zejdk r;ejjZn
ddededededee f
dd�ZejdkrXddlZnddlmZ h d�Zej�d�pqejdkoqejdkZdS )zKStuff that differs in different Python versions and platform
distributions.� N)�IO)�get_path_uid�stdlib_pkgs�tomllib�WINDOWS�returnc C s2 zdd l } W dS ty Y nw ddlm} |S )Nr T)�IS_PYOPENSSL)�_ssl�ImportError�pip._vendor.urllib3.utilr )r r � r �E/usr/local/lib/python3.10/dist-packages/pip/_internal/utils/compat.py�has_tls s �r �pathc C sb t td�rt�| tjtjB �}t�|�j}t�|� |S tj� | �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�| �| jd||d�S )N�r)r# r$ )� importlib� resources�filesr )r! r"