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/lib64/python3.12/site-packages/packaging/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

��jJP�	��UddlmZddlZddlZddlZddlZddlZddlmZ	ddl
mZmZm
Z
mZmZmZddlmZmZmZmZmZddlmZddlmZdd	lmZmZdd
lmZerddlm Z gd�Z!d/d
�Z"ee#ee#e	e#fge$fZ%e
dZ&	ddhZ'hd�Z(Gd�de)�Z*Gd�de)�Z+Gd�de,�Z-Gd�de�Z.				d0d�Z/d1d�Z0	d2					d3d�Z1d�d�d�ejdejdejfejdd �d!�Z4d"e5d#<d4d$�Z6								d5d%�Z7						d6d&�Z8						d7d'�Z9d8d(�Z:ejvd9d)��Z<d9d*�Z=Gd+�d,�Z>d:d-�Z?				d;d.�Z@y)<�)�annotationsN)�Set)�
TYPE_CHECKING�Callable�Literal�	TypedDict�Union�cast�)�
MarkerAtom�
MarkerList�Op�Value�Variable)�parse_marker)�ParserSyntaxError)�InvalidSpecifier�	Specifier)�canonicalize_name)�Mapping)�Environment�EvaluateContext�
InvalidMarker�Marker�UndefinedComparison�UndefinedEnvironmentName�default_environmentc��tS�N)�__all__���M/root/parts/certbot/install/lib/python3.12/site-packages/packaging/markers.py�__dir__r$#s���Nr")�metadata�	lock_file�requirement�extras�dependency_groups>�python_version�platform_release�python_full_version�implementation_versionc��eZdZdZy)rz�Raised when attempting to create a :class:`Marker` from invalid input.

    This error indicates that the given marker string does not conform to the
    :ref:`specification of dependency specifiers <pypug:dependency-specifiers>`.
    N��__name__�
__module__�__qualname__�__doc__r!r"r#rr=s��r"rc��eZdZdZy)rz�Raised when evaluating an unsupported marker comparison.

    This can happen when marker values are compared as versions but do not
    conform to the :ref:`specification of version specifiers
    <pypug:version-specifiers>`.
    Nr/r!r"r#rrEs��r"rc��eZdZdZy)ra�Raised when evaluating a marker that references a missing environment key.

    Subclasses :class:`KeyError` so that code catching the bare ``KeyError`` that
    a missing environment lookup historically produced keeps working.

    .. versionchanged:: 26.3
        Now subclasses :class:`KeyError` (was :class:`ValueError`) and is raised by
        :meth:`Marker.evaluate` for missing environment keys, where a bare
        ``KeyError`` was raised before.
    Nr/r!r"r#rrNs��	r"rc��eZdZUdZded<	ded<	ded<	ded<	ded<	ded<	ded	<	ded
<	ded<	ded<	ded
<y)rz�
    A dictionary that represents a Python environment as captured by
    :func:`default_environment`. All fields are required.
    �str�implementation_namer-�os_name�platform_machiner+�platform_system�platform_versionr,�platform_python_implementationr*�sys_platformN)r0r1r2r3�__annotations__r!r"r#rr[s����
��>����
�L��
���������������%(�'����9���r"rc�x�t|t�r|D�cgc]
}t|���c}St|t�s|S|\}}}t|t�r@|j
dk(r1t|t�r!t|j
�}t
|�}n�t|t�r@|j
dk(r1t|t�r!t|j
�}t
|�}nPt|t�r@|j
tvr.t|t�rt
t|j
��}|||fScc}w)N�extra)	�
isinstance�list�_normalize_extras�tupler�valuerr�MARKERS_ALLOWING_SET)�result�r�lhs�op�rhs�normalized_extras      r#rDrD�s����&�$��.4�5��!�!�$�5�5��f�e�$��
��L�C��S��#�x� �S�Y�Y�'�%9�j��e�>T�,�S�Y�Y�7���$�%��	�C��	"�s�y�y�G�';�
�3�PU�@V�,�S�Y�Y�7���$�%���3��!��I�I�-�-��s�E�"��%�c�i�i�0�1����C�<���/6s�D7c�>�|D�cgc]
}t|���c}Scc}w)z!
    Normalize extra values.
    )rD)�resultsrIs  r#�_normalize_extra_valuesrP�s��
+2�2�Q��a� �2�2��2s�c���t|tttf�sJ�t|t�r7t	|�dk(r)t|dttf�rt|d|��St|t�r3d�|D�}|rdj
|�Sddj
|�zdzSt|t�r-dj
|D�cgc]}|j���c}�S|Scc}w)Nrr��firstc3�6K�|]}t|d�����y�w)FrRN)�_format_marker)�.0�ms  r#�	<genexpr>z!_format_marker.<locals>.<genexpr>�s����@�A����/�/�@�s�� �(�))rBrCrEr7�lenrU�join�	serialize)�markerrS�innerrWs    r#rUrU�s����f�t�U�C�0�1�1�1�
	�6�4� ���K�1���v�a�y�4��-�0��f�Q�i�u�5�5��&�$��@��@����8�8�E�?�"�����%��(�3�.�.�	�F�E�	"��x�x��7�1�����7�8�8��
��8s�C'c�
�||vSrr!�rJrLs  r#�<lambda>rc�s
��3�#�:�r"c�
�||vSrr!rbs  r#rcrc�s
��s�#�~�r"c��y�NFr!��_lhs�_rhss  r#rcrc���r"c��yrfr!rgs  r#rcrc�rjr")�inznot in�<z<=z==z!=z>=�>zdict[str, Operator]�
_operatorsc	��|j�}|tvr#	t|�|���}|j|d��St
j
|�}|�td|�d|�d|�d���|||�S#t$rY�@wxYw)NT)�prereleasesz
Undefined z on z and �.)r^�MARKERS_REQUIRING_VERSIONr�containsrro�getr)rJrKrL�key�op_str�spec�opers       r#�_eval_oprz�s���
�\�\�^�F�
�'�'�	8���x��u�-�.�D��=�=��$�=�7�7�&�N�N�6�2�D��|�!�J�r�f�D���u�S�G�1�"M�N�N���S�>��� �	��	�s�A1�1	A=�<A=c��|dk(rt|t�sJd��||fS|tvrJt|t�rt|�t|�fSt|�|D�chc]
}t|���c}fS||fScc}w)NrAzextra value must be a string)rBr7rGr)rJrLrv�vs    r#�
_normalizer}s����g�~��#�s�#�C�%C�C�#��S�z��
�"�"��c�3��%�c�*�,=�c�,B�C�C�%�c�*�3�,O�a�->�q�-A�,O�P�P���8�O��-Ps�A7c�@�	||S#t$r
t|�d�wxYwr)�KeyErrorr)�environmentrvs  r#�_lookup_environmentr�s.��6��3�����6�&�s�+��5�6�s��c
��gg}|D�]3}t|t�r|djt||���3t|t�r�|\}}}t|t
�r%|j}t||�}|j}	n$|j}|j}t||�}	t|t�s#td|�d|�d|j��d���t||	|��\}}	|djt|||	|�����	|dk(r|jg���!|dk(r��(td	|����td
�|D��S)N���zSet-valued marker z= can only be used with the membership form (e.g. "<name>" in z-); it cannot appear on the left-hand side of rr)rv�or�andzUnexpected marker c3�2K�|]}t|����y�wr)�all)rV�items  r#rXz$_evaluate_markers.<locals>.<genexpr>Gs����,�T�s�4�y�,�s�)rBrC�append�_evaluate_markersrErrFr�r7rr^r}rz�	TypeError�any)
�markersr��groupsr_rJrKrL�environment_key�	lhs_value�	rhs_values
          r#r�r�#sQ��!#�t�F��=���f�d�#��2�J���/���D�E�
���
&�!�L�C��S��#�x�(�"%�)�)��/��_�M�	��I�I�	��I�I�	�"%�)�)��/��_�M�	��i��-�)�(��(;�<B�&�'�(�!�|�|�~�0��3���$.�i���#X� �I�y��2�J���h�y�"�i�_�U�V�
�t�^��M�M�"��
�u�_���0��
�;�<�<�;=�>�,�V�,�,�,r"c��|j�d|j�d|j��}|j}|dk7r||dt	|j
�zz
}|S)Nrr�finalr)�major�minor�micro�releaselevelr7�serial)�info�version�kinds   r#�_format_full_versionr�JsW������A�d�j�j�\��4�:�:�,�7�G����D��w���4��7�S����-�-�-���Nr"c���ttjj�}tjj}||t
jt
j�t
j�t
j�t
j�t
j�t
j�djt
j�dd�tjd�S)aVBuild the default marker environment for the current Python process.

    The values are derived from process-constant data (the running interpreter
    and the host platform), so this is cached and built only once. The result is
    shared between callers and must never be mutated; :func:`default_environment`
    returns a fresh copy.
    rrN�)r8r-r9r:r+r;r<r,r=r*r>)r��sys�implementationr��name�os�platform�machine�release�systemr*�python_implementationr]�python_version_tuple)�iverr8s  r#�_cached_default_environmentr�Rs��� �� 2� 2� :� :�;�D��,�,�1�1��2�"&��7�7�$�,�,�.�$�,�,�.�#�?�?�,�$�,�,�.�'�6�6�8�*2�*H�*H�*J��(�(�8�#@�#@�#B�2�A�#F�G�����r"c�<�tdtt���S)ayReturn the default marker environment for the current Python process.

    This is the base environment used by :meth:`Marker.evaluate`. A fresh copy
    is returned on every call so callers may freely mutate the result; a shallow
    copy suffices because all values are immutable strings.

    .. versionchanged:: 26.3
        The environment is computed once per process and cached, since it is
        derived from process-constant data. Patching ``platform``/``sys``/``os``
        after the first call has no effect; pass an explicit ``environment`` to
        :meth:`Marker.evaluate` to evaluate against different values.
    r)r
�dictr�r!r"r#rrls���
�t�$?�$A�B�C�Cr"c��eZdZdZdZdd�Zedd��Zdd�Zdd�Z	dd�Z
dd�Zdd	�Zdd
�Z
dd�Zdd�Z		d					dd�Zy
)ra�Represents a parsed dependency marker expression.

    Marker expressions are parsed according to the
    :ref:`specification of dependency specifiers <pypug:dependency-specifiers>`.

    :param marker: The string representation of a marker expression.
    :raises InvalidMarker: If ``marker`` cannot be parsed.

    Instances are safe to serialize with :mod:`pickle`. They use a stable
    format so the same pickle can be loaded in future packaging releases.

    .. versionchanged:: 26.2

        Added a stable pickle format. Pickles created with packaging 26.2+ can
        be unpickled with future releases.  Backward compatibility with pickles
        from packaging < 26.2 is supported but may be removed in a future
        release.
    )�_markersc��g|_	tt|��|_y#t$r}t	t|��|�d}~wwxYwr)r�rP�
_parse_markerrrr7)�selfr_�es   r#�__init__zMarker.__init__�sD��%'��
�	/�3�M�&�4I�J�D�M��"!�	/���A��'�Q�.��	/�s�#�	A�A�Ac�6�|j|�}||_|S)z�Create a Marker instance from a pre-parsed marker tree.

        This avoids re-parsing serialised marker strings when combining markers.
        )�__new__r�)�clsr��news   r#�
_from_markerszMarker._from_markers�s���k�k�#�������
r"c�,�t|j�Sr)rUr��r�s r#�__str__zMarker.__str__�s���d�m�m�,�,r"c�N�d|jj�dt|��d�S)NrmrZz)>)�	__class__r0r7r�s r#�__repr__zMarker.__repr__�s&���4�>�>�*�*�+�1�S��Y�M��<�<r"c�*�tt|��Sr)�hashr7r�s r#�__hash__zMarker.__hash__�s���C��I��r"c�\�t|t�stSt|�t|�k(Sr)rBr�NotImplementedr7�r��others  r#�__eq__z
Marker.__eq__�s%���%��(�!�!��4�y�C��J�&�&r"c��t|�Sr)r7r�s r#�__getstate__zMarker.__getstate__�s���4�y�r"c��t|t�r	tt|��|_yt|t�r!d|vr|d}t|t�r||_yt|t�rDt|�dk(r6|\}}t|t�r!d|vr|d}t|t�r||_yt
d|����#t
$r}t
d|���|�d}~wwxYw)NzCannot restore Marker from r�r�)rBr7rPr�r�rr�r�rCrEr\)r��state�excr��_�	slot_dicts      r#�__setstate__zMarker.__setstate__�s����e�S�!�
R� 7�
�e�8L� M��
�
��e�T�"�z�U�':��J�'�G��'�4�(� '��
���e�U�#��E�
�a�� �L�A�y��)�T�*�z�Y�/F�#�J�/���g�t�,�$+�D�M���5�e�Y�?�@�@��#%�
R��"=�e�Y� G�H�c�Q��
R�s�B?�?	C�C�Cc�~�t|t�stS|j|jd|jg�S)zXCombine this marker with another using ``and``.

        .. versionadded:: 26.1
        r��rBrr�r�r�r�s  r#�__and__zMarker.__and__�s4��
�%��(�!�!��!�!�4�=�=�%����"H�I�Ir"c�~�t|t�stS|j|jd|jg�S)zWCombine this marker with another using ``or``.

        .. versionadded:: 26.1
        r�r�r�s  r#�__or__z
Marker.__or__�s4��
�%��(�!�!��!�!�4�=�=�$����"G�H�Hr"Nc��tdt��}|dk(r|t�t�d�z}n
|dk(rd|d<|�*||z}d|vr!td|d�}|rt|�nd|d<t	|j
t
|��S)a�Evaluate a marker.

        Return the boolean from evaluating this marker against the environment.
        The environment is determined from the current Python process unless
        passed in explicitly.

        :param environment: Mapping containing keys and values to override the
           detected environment.
        :param EvaluateContext context: The context in which the marker is
            evaluated, which influences what marker names are considered valid.
            Accepted values are ``"metadata"`` (for core metadata; default),
            ``"lock_file"``, and ``"requirement"`` (i.e. all other situations).
        :raises UndefinedComparison: If the marker uses a comparison on values
            that are not valid versions per the :ref:`specification of version
            specifiers <pypug:version-specifiers>`.
        :raises UndefinedEnvironmentName: If the marker references a value that
            is missing from the evaluation environment.
        :returns: ``True`` if the marker matches, otherwise ``False``.

        .. versionchanged:: 25.0
            Added the ``context`` parameter, which influences which marker names
            are considered valid.
        �!dict[str, str | AbstractSet[str]]r&)r(r)r%�rAz
str | None)r
r�	frozensetrr�r��_repair_python_full_version)r�r��context�current_environmentrAs     r#�evaluatezMarker.evaluate�s���8#�/�1D�1F�
���k�!��#�+�%.�[�$�
���
�
"�+-���(��"��;�.���-�-��\�+>�w�+G�H��KP�/@��/G�VX�#�G�,� ��M�M�6�7J�K�
�	
r")r_r7�return�None)r�r
r�r)r�r7)r��int)r��objectr��bool)r�r�r�r�)r�rr�r)Nr%)r�z+Mapping[str, str | AbstractSet[str]] | Noner�rr�r�)r0r1r2r3�	__slots__r��classmethodr�r�r�r�r�r�r�r�r�r�r!r"r#rr|s}���&�I�/�<����-�=��'��
A�0J�I�DH�#-�2
�@�2
�!�2
�
�	2
r"rc�2�|jd�r|�d�S|S)��
    Work around platform.python_version() returning something that is not PEP 440
    compliant for non-tagged Python builds.
    �+�local)�endswith)r,s r#�_pep440_python_full_versionr�-s&��
�#�#�C�(�%�&�e�,�,��r"c�@�td|d�}t|�|d<|S)r�r7r,)r
r�)�envr,s  r#r�r�7s-���u�c�*?�&@�A��!<�=P�!Q�C����Jr")r�z	list[str])rH�MarkerList | MarkerAtom | strr�r�)rOr
r�r
)T)r_zlist[str] | MarkerAtom | strrSzbool | Noner�r7)
rJr7rKrrL�str | AbstractSet[str]rvr7r�r�)rJr7rLr�rvr7r�z"tuple[str, str | AbstractSet[str]])r�r�rvr7r�r�)r�r
r�r�r�r�)r�zsys._version_infor�r7)r�r)r,r7r�r7)r�r�r�r�)A�
__future__r�	functools�operatorr�r�r��collections.abcr�AbstractSet�typingrrrrr	r
�_parserrr
rrrrr��
_tokenizerr�
specifiersrr�utilsrrr r$r7r��OperatorrrGrs�
ValueErrorrrrrrrDrPrU�eq�neror?rzr}r�r�r��cacher�rrr�r�r!r"r#�<module>r�s���
#���	��
�.�K�K�@�@�2�)�3�$��'�����S�%��[��%5� 5�6�7��=�>���@�A��	�!�"5�6�����J���*��
�x�
�J�)�J�Z�)��"��<3�@D��(��1<����6&�-�	!�
�+�+�
�+�+�
�+�+�
�+�+�	!�	#�
��	��"�	��)��03��'��*6�2�6�9<�6��6�$-�
�$-�&G�$-�	�$-�N�������2
D� n
�n
�b�	�	*�	�&�	r"

Youez - 2016 - github.com/yon3zu
LinuXploit