Viewing File: /opt/hc_python/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/compat.cpython-312.pyc

�

T�*j�	���dZddlZddlZddlZddlZddlmZgd�Zeje
�Zdefd�Z
dedefd�Zej"d	krej$j&Zn	dd
ededed
edeef
d�Zej"d	k\rddlZnddlmZhd�Zej2j5d�xs ej2dk(xrej6dk(Zy)zKStuff that differs in different Python versions and platform
distributions.�N)�IO)�get_path_uid�stdlib_pkgs�tomllib�WINDOWS�returnc�<�	ddl}y#t$rYnwxYwddlm}|S)NrT)�IS_PYOPENSSL)�_ssl�ImportError�pip._vendor.urllib3.utilr
)rr
s  �I/opt/hc_python/lib/python3.12/site-packages/pip/_internal/utils/compat.py�has_tlsrs*��
�����
��
��6��s��	��pathc��ttd�rktj|tjtjz�}tj
|�j}tj|�|Stjj|�s!tj|�j}|St|�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_uids   rrrs����r�<� �
�W�W�T�2�;�;����6�
7���8�8�B�<�&�&��
������O�
�w�w�~�~�d�#��w�w�t�}�+�+�H��O��T�F�"Q�R�S�S�)���package�resource�encoding�errorsc�j�tjj|�|zjd||��S)N�r)r$r%)�	importlib�	resources�filesr)r"r#r$r%s    r�open_text_resourcer+>s:���#�#�)�)�'�2�X�=�C�C��(�6�D�
�	
r)�tomli>�python�wsgiref�argparse�win�cli�nt)zutf-8�strict)�__doc__�importlib.resourcesr(�loggingr�sys�typingr�__all__�	getLogger�__name__�logger�boolr�str�intr�version_infor)�	open_textr+r�pip._vendorr,r�platform�
startswith�namer�rr�<module>rGs������	�
��
?��
��	�	�8�	$��
��
��s��s��:���g��"�,�,�6�6��MU�
��
� #�
�/2�
�FI�
�	�C��
����w���,�0���,�,�
!�
!�%�
(�
W�S�\�\�U�-B�-V�r�w�w�RV��r
Back to Directory File Manager