Uname:Linux developmentwebsite.ca 4.18.0-553.168.1.el8_10.x86_64 #1 SMP Thu Sep 24 18:05:46 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 173.249.148.11  /  Your IP : 216.73.216.179
Web Server : Apache/2.4.68 (AlmaLinux)
System : Linux developmentwebsite.ca 4.18.0-553.168.1.el8_10.x86_64 #1 SMP Thu Sep 24 18:05:46 UTC 2026 x86_64
User : devinter ( 1006)
PHP Version : 8.3.35
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /snap/certbot/current/lib/python3.12/site-packages/packaging/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /snap/certbot/current/lib/python3.12/site-packages/packaging/__pycache__/direct_url.cpython-312.pyc
�

��j}-���ddlmZddlZddlZddlZddlmZddlm	Z	m
Z
mZmZe	r,ddl
Z
ddlmZddlmZe
j dk\rddlmZnddlmZgd	�Zd'd
�Zed�ZGd�d
e�Zede��Zd(d�Zd)d�Zd*d�Z								d+d�Zej8d�Zd,d�Zd-d�Zd.d�Z Gd�de!�Z"Gd�de"�Z#ejHdd��Gd�d ��Z%ejHdd��Gd!�d"��Z&ejHdd��Gd#�d$��Z'ejHdd��Gd%�d&��Z(y)/�)�annotationsN)�Mapping)�
TYPE_CHECKING�Any�Protocol�TypeVar)�
Collection)�SplitResult)��)�Self)�ArchiveInfo�DirInfo�	DirectUrl�DirectUrlValidationError�VcsInfoc��tS�N)�__all__���P/root/parts/certbot/install/lib/python3.12/site-packages/packaging/direct_url.py�__dir__rs���Nr�_Tc��eZdZedd��Zy)�_FromMappingProtocolc��yrr��cls�ds  r�
_from_dictz_FromMappingProtocol._from_dict$s��7:rN�r �Mapping[str, Any]�returnr
)�__name__�
__module__�__qualname__�classmethodr!rrrrr#s���:��:rr�_FromMappingProtocolT)�boundc�@�|D��cic]\}}|��	||��
c}}Scc}}wrr)�data�key�values   r�_json_dict_factoryr/+s#��)-�C�:�3���1B�C��J�C�C��Cs�
�c��|j|�x}�yt||�s1tdt|�j�d|j�d�|���|S)zBGet a value from the dictionary and verify it's the expected type.NzUnexpected type z (expected �)��context)�get�
isinstancer�typer%�r �
expected_typer-r.s    r�_getr9/sc�����s����$���e�]�+�&��t�E�{�3�3�4�5�&�/�/�0��
3��
�	
�
�Lrc�:�t|||�x}�t|��|S)zKGet a required value from the dictionary and verify it's the expected type.)r9�_DirectUrlRequiredKeyErrorr7s    r�
_get_requiredr<<s&���a���,�,��5�(��-�-��Lrc��t|t|�x}�y	|j|�S#t$r}t	||��|�d}~wwxYw)zIGet a dictionary value from the dictionary and convert it to a dataclass.Nr2)r9rr!�	Exceptionr)r �target_typer-r.�es     r�_get_objectrACsP���a��#�&�&��/��>��%�%�e�,�,���>�&�q�#�6�A�=��>�s�'�	A�>�Az.^\$\{[A-Za-z0-9-_]+\}(:\$\{[A-Za-z0-9-_]+\})?$c�v�d|vr|S|jdd�\}}||vr|Stj|�r|S|S)N�@�)�rsplit� _PEP610_USER_PASS_ENV_VARS_REGEX�match)�netloc�safe_user_passwords�	user_pass�netloc_no_user_passs    r�_strip_auth_from_netlocrLTsL��
�&���
�%+�]�]�3��%:�"�I�"��'�'��
�'�-�-�i�8��
��rc��tjj|�}t|j|�}tjj|j||j|j|jf�S)z�url with user:password part removed unless it is formed with
    environment variables as specified in PEP 610, or it is a safe user:password
    such as `git`.
    )
�urllib�parse�urlsplitrLrH�
urlunsplit�scheme�path�query�fragment)�urlrI�
parsed_urlrHs    r�
_strip_urlrX_sl��
���&�&�s�+�J�
$�Z�%6�%6�8K�
L�F��<�<�"�"������O�O�������	
��rc�8�|jjd�S)N�/)rS�
startswith)rWs r�_file_url_has_absolute_pathr\qs���?�?�%�%�c�*�*rc�J�eZdZUdZdZded<ded<dd�					d
d�Zdd	�Zy)rzSRaised when when input data is not spec-compliant.

    .. versionadded:: 26.1
    N�
str | Noner3�str�messager2c���t|t�rJ|jr%|r|�d|j��n|j|_n||_|j|_y||_t	|�|_y)N�.)r5rr3r`r_)�self�causer3s   r�__init__z!DirectUrlValidationError.__init__~s]���e�5�6��}�}�4;�w�i�q�����0������ '��� �=�=�D�L�"�D�L��u�:�D�Lrc�h�|jr|j�d|j��S|jS)Nz in )r3r`�rcs r�__str__z DirectUrlValidationError.__str__�s-���<�<��l�l�^�4����'7�8�8��|�|�r)rdzstr | Exceptionr3r^r$�None)r$r_)r%r&r'�__doc__r3�__annotations__rerhrrrrrusC���
�G�Z��
�L�#�	&��&��	&�

�&�$rrc� ��eZdZd�fd�Z�xZS)r;c�(��t�|�d|��y)NzMissing required valuer2)�superre)rcr-�	__class__s  �rrez#_DirectUrlRequiredKeyError.__init__�s���
���1�3��?r)r-r_r$ri)r%r&r're�
__classcell__)ros@rr;r;�s���@�@rr;TF)�frozen�initc�b�eZdZUdZded<ded<dZded<dd�							dd	�Zedd
��Zy)
rz8The version control information of a :class:`DirectUrl`.r_�vcs�	commit_idNr^�requested_revision)rvc��tj|d|�tj|d|�tj|d|�y)Nrtrurv��object�__setattr__)rcrtrurvs    rrezVcsInfo.__init__�s<��	���4���,����4��i�8����4�!5�7I�Jrc	�r�|t|td�t|td�t|td���S)Nrtrvru)rtrvru)r<r_r9rs  rr!zVcsInfo._from_dict�s6����a��e�,�#�A�s�,@�A�#�A�s�K�8�
�	
r)rtr_rur_rvr^r$rir")	r%r&r'rjrkrvrer(r!rrrrr�se��B�	�H��N�%)��
�)�*.�	K��	K��		K�
'�	K�
�
	K��
��
rrc�F�eZdZUdZdZded<dd�			dd�Zed	d��Zy)
rz0The archive information of a :class:`DirectUrl`.N�Mapping[str, str] | None�hashes�r~c�2�tj|d|�y)Nr~rx)rcr~s  rrezArchiveInfo.__init__�s��
	���4��6�2rc�p�t|td�}|�-td�|j�D��s
t	dd���t|t
d�}|�[d|vr
t	dd���|j
dd�\}}|�||i}n.||vrt	d	|�d
�d���|||k7rt	d	|�d�d���||��S)
Nr~c3�<K�|]}t|t����y�wr)r5r_)�.0�hs  r�	<genexpr>z)ArchiveInfo._from_dict.<locals>.<genexpr>�s����)V��*�Q��*<�)V�s�zHash values must be stringsr2�hash�=z3Invalid hash format (expected '<algorithm>=<hash>')rDz
Algorithm z2 used in hash field is not present in hashes fieldz7 used in hash field has different value in hashes fieldr)r9r�all�valuesrr_�split)rr r~�legacy_hash�hash_algorithm�
hash_values      rr!zArchiveInfo._from_dict�s����a��(�+����c�)V�f�m�m�o�)V�&V�*�-�x��
��1�c�6�*���"��+�%�.�I�"���*5�):�):�3��)B�&�N�J��~�(�*�5��"��/�2�$�^�$6�79�:� (���
�.�)�Z�7�2�$�^�$6�7>�?� &���
�&�!�!r)r~r}r$rir")	r%r&r'rjr~rkrer(r!rrrrr�sB��:�'+�F�$�+�
,0�3�)�3�
�	3��"��"rrc�F�eZdZUdZdZded<dd�			dd�Zed	d��Zy)
rz8The local directory information of a :class:`DirectUrl`.N�bool | None�editable�r�c�2�tj|d|�y)Nr�rx)rcr�s  rrezDirInfo.__init__�s��
	���4��X�6rc�2�|t|td���S)Nr�r�)r9�boolrs  rr!zDirInfo._from_dict�s����!�T�:�.�
�	
r)r�r�r$rir")	r%r&r'rjr�rkrer(r!rrrrr�sA��B� �H�k� �
!%�7��7�
�	7��
��
rrc���eZdZUdZded<dZded<dZded<dZd	ed
<dZded<ddddd
�											dd�Z	e
dd��Ze
dd��Zdddd�							dd�Z
dd�Zy)rzCA class representing a direct URL.

    .. versionadded:: 26.1
    r_rVN�ArchiveInfo | None�archive_info�VcsInfo | None�vcs_info�DirInfo | None�dir_infor^�subdirectory)r�r�r�r�c���tj|d|�tj|d|�tj|d|�tj|d|�tj|d|�y)NrVr�r�r�r�rx)rcrVr�r�r�r�s      rrezDirectUrl.__init__	s^��	���4���,����4���>����4��X�6����4��X�6����4���>rc�&�|t|td�t|td�t|td�t|t
d�t
|td���}t|j�t|j�zt|j�zdk7rtd��|j�]tjj|j�}|j d	k7r
td
d���t#|�s
tdd���|S)
NrVr�r�r�r�)rVr�r�r�r�rDz?Exactly one of vcs_info, archive_info, dir_info must be present�filez3URL scheme must be file:// when dir_info is presentr2z2File URL must be absolute when dir_info is present)r<r_rArrrr9r�r�r�r�rrNrOrPrVrRr\)rr �
direct_urlrWs    rr!zDirectUrl._from_dicts����a��e�,�$�Q��^�D� ��G�Z�8� ��G�Z�8��a��n�5�
�
�
��$�$�%��:�*�*�+�
,��:�&�&�'�
(��	�
+�Q��
����*����.�.�z�~�~�>�J�� � �F�*�.�I�!���/�z�:�.�H�!���
�rc�$�|j|�S)z@Create and validate a DirectUrl instance from a JSON dictionary.)r!rs  r�	from_dictzDirectUrl.from_dict8s���~�~�a� � rFT)�git)�generate_legacy_hash�strip_user_passwordrIc�F�tj|t��}|rh|jr\|jjrFtt
|jjj���\}}|�d|��|dd<|rt|j|�|d<|S)a�Convert the DirectUrl instance to a JSON dictionary.

        :param generate_legacy_hash: If True, include a legacy `hash` field in
            `archive_info` for backward compatibility with tools that don't
            support the `hashes` field.
        :param strip_user_password: If True, strip user:password from the URL
            unless it is formed with environment variables as specified in PEP
            610, or it is a safe user:password such as `git`.
        :param safe_user_passwords: A collection of user:password strings that
            should not be stripped from the URL even if `strip_user_password` is
            True.
        )�dict_factoryr�r�r�rV)
�dataclasses�asdictr/r�r~�next�iter�itemsrXrV)rcr�r�rI�resr�r�s       r�to_dictzDirectUrl.to_dict=s���&� � ��4F�G���D�$5�$5�$�:K�:K�:R�:R�)-�d�4�3D�3D�3K�3K�3Q�3Q�3S�.T�)U�&�N�J�-;�,<�A�j�\�*J�C����'��#�D�H�H�.A�B�C��J��
rc�B�|j|j��y)z�Validate the DirectUrl instance against the specification.

        Raises :class:`DirectUrlValidationError` if invalid.
        N)r�r�rgs r�validatezDirectUrl.validateXs��
	
���t�|�|�~�&r)rVr_r�r�r�r�r�r�r�r^r$rir")r�r�r�r�rI�Collection[str]r$r#)r$ri)r%r&r'rjrkr�r�r�r�rer(r!r�r�r�rrrrr�s����


�H�'+�L�$�+�#�H�n�#�#�H�n�#�#�L�*�#�,0�#'�#'�#'�
?��
?�)�	
?�
!�
?�!�

?�!�
?�
�
?�����>�!��!�&+�$(�/7��#��"�	�
-��
�
�6'rr)r$z	list[str])r,zlist[tuple[str, Any]]r$zdict[str, Any])r r#r8�type[_T]r-r_r$z	_T | None)r r#r8r�r-r_r$r)r r#r?ztype[_FromMappingProtocolT]r-r_r$z_FromMappingProtocolT | None)rHr_rIr�r$r_)rVr_rIr�r$r_)rWr
r$r�))�
__future__rr��re�urllib.parserN�collections.abcr�typingrrrr�sysr	r
�version_infor
�typing_extensionsrrrrr)r/r9r<rA�compilerFrLrXr\r>rr;�	dataclassrrrrrrr�<module>r�s���"��	��#�8�8���*�(�
���7�"��*����
�T�]��;�8�;�
 � 7�?S�T��D�
��	>��	>�'B�	>�IL�	>�!�	>�$.�2�:�:�5�$� �
��$+��y��B@�!9�@�
����d��/�
�
�0�
�8����d��/�,"�,"�0�,"�^����d��/�
�
�0�
�&����d��/�`'�`'�0�`'r

Youez - 2016 - github.com/yon3zu
LinuXploit