Ë
    ©Õ°j>Î  ã                  ó^  — U d Z ddlmZ ddlZddlZddlZddlmZmZmZm	Z	m
Z
mZ ddlmZmZmZmZmZmZmZmZmZ ddlmZ ddlmZ er6ddlZdd	lmZmZmZ ej>                  d
k\  rddlm Z  nddl!m Z  ddl"m#Z# ddlm$Z$ g d¢Z%d$d„Z&d%d„Z'd&d„Z( e
d«      Z)eee*f   Z+ e
de+¬«      Z,ejZ                  ej\                  ej^                  ej`                  dœZ1de2d<   d'd„Z3 G d„ de4«      Z5 G d„ dejl                  ¬«      Z7 G d„ de7«      Z8	 	 	 	 	 	 	 	 d(d „Z9 G d!„ d"e7«      Z:	 	 	 	 	 	 d)d#„Z;y)*zŠ
.. testsetup::

    from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier
    from packaging.version import Version
é    )ÚannotationsN)ÚTYPE_CHECKINGÚAnyÚCallableÚFinalÚTypeVarÚUnioné   )	Ú
FULL_RANGEÚbounds_for_specÚcoerce_versionÚfilter_by_rangesÚintersect_specifier_boundsÚmatches_bounds_onlyÚranges_are_prerelease_onlyÚresolve_prereleasesÚtrim_release)Úcanonicalize_version)ÚVersion)ÚIterableÚIteratorÚSequence)é   é
   )Ú	TypeGuard)Úranges)ÚInterval)ÚBaseSpecifierÚInvalidSpecifierÚ	SpecifierÚSpecifierSetc                 ó   — t         S ©N)Ú__all__© ó    úJ/var/www/mission/venv/lib/python3.12/site-packages/packaging/specifiers.pyÚ__dir__r(   <   s   € Ü€Nr&   c               ó–   — t        | t        «      xr8 t        | «      dk(  xr( t        | d   t        «      xr t        | d   t        «      S )Né   r   r
   )Ú
isinstanceÚtupleÚlenÚstr)Úspecs    r'   Ú_validate_specr0   @   sI   € ä�4œÓò 	%Ü�‹I˜‰Nò	%ä�t˜A‘w¤Ó$ò	%ô �t˜A‘w¤Ó$ð	r&   c               ó.   — | d u xs t        | t        «      S r#   )r+   Úbool)Úpres    r'   Ú_validate_prer4   I   s   € Ø�$ˆ;Ò/œ* S¬$Ó/Ð/r&   ÚTÚUnparsedVersionVar)Úbound)ú>=ú<=ú==ú!=z-dict[str, Callable[[Version, Version], bool]]Ú_DIRECT_COMPARE_OPSr    c                óŽ  — | j                   \  }}|j                  d«      s|j                  �yt        j	                  |«      }|� ||| j                  |«      «      S |dv re| j                  |«      }|j                  |j                  k7  s+t        |j                  «      t        |j                  «      k7  r|dk(  r||k  S ||kD  S yy)a!  Match ``parsed`` against ``specifier`` without building a range.

    Handles ``>=``, ``<=``, ``==``, ``!=``, ``<``, ``>`` when the spec is
    not a wildcard and ``parsed`` has no local. Returns ``None`` when the
    range path must be used. Pre-release policy is left to the caller.
    ú.*N)ú<ú>r?   )	Ú_specÚendswithÚlocalr<   ÚgetÚ_require_spec_versionÚepochr   Úrelease)Ú	specifierÚparsedÚop_strÚver_strÚdirect_compareÚspec_vs         r'   Ú_fast_matchrN   ]   sÃ   € ð  —o‘o�O€FˆGØ×Ñ˜Ô §¡Ð!9Øä(×,Ñ,¨VÓ4€NØÐ!Ù˜f i×&EÑ&EÀgÓ&NÓOÐOà�ÑØ×0Ñ0°Ó9ˆð �<‰<˜6Ÿ<™<Ò'¬<¸¿¹Ó+GÌ<Ø�N‰NóL
ò ,
ð '-°¢m�6˜F‘?ÐH¸À&¹ÐHØàr&   c                  ó   — e Zd ZdZy)r   a  
    Raised when attempting to create a :class:`Specifier` with a specifier
    string that is invalid.

    >>> Specifier("lolwat")
    Traceback (most recent call last):
        ...
    packaging.specifiers.InvalidSpecifier: Invalid specifier: 'lolwat'
    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r%   r&   r'   r   r   z   s   „ òr&   r   c                  óÈ  — e Zd ZdZdZdZedd„«       Zej                  dd„«       Z
ej                  dd„«       Zej                  dd„«       Zeej                  dd„«       «       Zej                  dd	„«       Zej                  ddd„«       Zej"                  	 	 d	 	 	 	 	 	 	 dd„«       Zej"                  	 	 d	 	 	 	 	 	 	 dd„«       Zej                  	 	 d	 	 	 	 	 	 	 dd„«       Zy
)r   zO
    Abstract base class for :class:`Specifier` and :class:`SpecifierSet`.
    r%   )Ú_strc                ó   — t        | «      S )z Internal property for match_args©r.   ©Úselfs    r'   rU   zBaseSpecifier._strŽ   s   € ô �4‹yÐr&   c                 ó   — y)zŽ
        Returns the str representation of this Specifier-like object. This
        should be representative of the Specifier itself.
        Nr%   rX   s    r'   Ú__str__zBaseSpecifier.__str__“   ó   � r&   c                 ó   — y)zF
        Returns a hash value for this Specifier-like object.
        Nr%   rX   s    r'   Ú__hash__zBaseSpecifier.__hash__š   r\   r&   c                 ó   — y)z«
        Returns a boolean representing whether or not the two Specifier-like
        objects are equal.

        :param other: The other object to check against.
        Nr%   ©rY   Úothers     r'   Ú__eq__zBaseSpecifier.__eq__    r\   r&   c                 ó   — y)zîWhether or not pre-releases as a whole are allowed.

        This can be set to either ``True`` or ``False`` to explicitly enable or disable
        prereleases or it can be set to ``None`` (the default) to use default semantics.
        Nr%   rX   s    r'   ÚprereleaseszBaseSpecifier.prereleases©   r\   r&   c                 ó   — y)zQSetter for :attr:`prereleases`.

        :param value: The value to set.
        Nr%   ©rY   Úvalues     r'   rd   zBaseSpecifier.prereleases²   r\   r&   Nc                 ó   — y)zR
        Determines if the given item is contained within this specifier.
        Nr%   )rY   Úitemrd   s      r'   ÚcontainszBaseSpecifier.contains¹   r\   r&   c                 ó   — y r#   r%   ©rY   Úiterablerd   Úkeys       r'   ÚfilterzBaseSpecifier.filter¿   ó   € ð (+r&   c                 ó   — y r#   r%   rl   s       r'   ro   zBaseSpecifier.filterÇ   ó   € ð r&   c                 ó   — y)z•
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        Nr%   rl   s       r'   ro   zBaseSpecifier.filterÏ   r\   r&   ©Úreturnr.   ©ru   Úint©ra   Úobjectru   r2   ©ru   úbool | None)rg   r2   ru   ÚNoner#   )ri   r.   rd   r{   ru   r2   ©N.©rm   zIterable[UnparsedVersionVar]rd   r{   rn   r|   ru   zIterator[UnparsedVersionVar]©rm   zIterable[T]rd   r{   rn   zCallable[[T], UnparsedVersion]ru   zIterator[T]©NN©rm   úIterable[Any]rd   r{   rn   ú'Callable[[Any], UnparsedVersion] | Noneru   úIterator[Any])rP   rQ   rR   rS   Ú	__slots__Ú__match_args__ÚpropertyrU   ÚabcÚabstractmethodr[   r^   rb   rd   Úsetterrj   ÚtypingÚoverloadro   r%   r&   r'   r   r   †   s�  „ ñð €IØ€Nàòó ðð 	×Ñòó ðð 	×Ñòó ðð
 	×Ñòó ðð Ø×Ñòó ó ðð ×Ñòó ðð 	×Ñóó ðð
 ‡_�_ð $(Øð	+à.ð+ð !ð+ð ð	+ð
 
&ò+ó ð+ð ‡_�_ð $(Ø.1ð	àðð !ðð ,ð	ð
 
òó ðð 	×Ñð $(Ø7;ð		àð	ð !ð	ð 5ð		ð
 
ò	ó ñ	r&   r   )Ú	metaclassc            	      óü  — e Zd ZU dZdZdZ ej                  dez   dz   ej                  ej                  z  «      Z
ddddd	d
dddœZded<   d%d&d„Zd'd„Zd(d„Zd)d„Zed*d„«       Zej&                  d+d„«       Zd,d„Zd-d„Zed.d„«       Zed.d„«       Zd.d„Zd.d„Zed/d„«       Zd0d„Zd1d„Zd2d „Zd3d4d!„Zej@                  	 	 d5	 	 	 	 	 	 	 d6d"„«       Z!ej@                  	 	 d5	 	 	 	 	 	 	 d7d#„«       Z!	 	 d8	 	 	 	 	 	 	 d9d$„Z!y):r    aí  This class abstracts handling of version specifiers.

    .. tip::

        It is generally not required to instantiate this manually. You should instead
        prefer to work with :class:`SpecifierSet` instead, which can parse
        comma-separated version specifiers (which is what package metadata contains).

    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.
    )Ú_prereleasesÚ_rangesrA   Ú_spec_versiona  
        (?:
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                ===  # Only match for the identity operator
                \s*
                [^\s;)]*  # The arbitrary version can be just about anything,
                          # we match everything except for whitespace, a
                          # semi-colon for marker support, and a closing paren
                          # since versions can be enclosed in them.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?:==|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release

                # You cannot use a wild card and a pre-release, post-release, a dev or
                # local version together so group them with a | and make them optional.
                (?:
                    \.\*  # Wild card syntax of .*
                    |
                    (?a:                                  # pre release
                        [-_\.]?
                        (alpha|beta|preview|pre|a|b|c|rc)
                        [-_\.]?
                        [0-9]*
                    )?
                    (?a:                                  # post release
                        (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                    )?
                    (?a:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?a:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?:~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (alpha|beta|preview|pre|a|b|c|rc)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?:<=|>=|<|>)

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?a:                   # pre release
                    [-_\.]?
                    (alpha|beta|preview|pre|a|b|c|rc)
                    [-_\.]?
                    [0-9]*
                )?
                (?a:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?a:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
        )
        z\s*Ú
compatibleÚequalÚ	not_equalÚless_than_equalÚgreater_than_equalÚ	less_thanÚgreater_thanÚ	arbitrary)ú~=r:   r;   r9   r8   r?   r@   ú===r   Ú
_operatorsNc                óŠ  — | j                   j                  |«      st        d|›�«      ‚|j                  «       }|j	                  d«      r|dd |dd j                  «       }}nB|j	                  d«      r|dd |dd j                  «       }}n|dd |dd j                  «       }}||f| _        || _        d| _        d| _        y)að  Initialize a Specifier instance.

        :param spec:
            The string representation of a specifier which will be parsed and
            normalized before use.
        :param prereleases:
            This tells the specifier if it should accept prerelease versions if
            applicable or not. The default of ``None`` will autodetect it from the
            given specifiers.
        :raises InvalidSpecifier:
            If the given specifier is invalid (i.e. bad syntax).
        zInvalid specifier: r›   Nr   )rš   r:   r;   r9   r8   r*   r
   )	Ú_regexÚ	fullmatchr   ÚstripÚ
startswithrA   r�   r‘   r�   )rY   r/   rd   ÚoperatorÚversions        r'   Ú__init__zSpecifier.__init__c  sÊ   € ð �{‰{×$Ñ$ TÔ*Ü"Ð%8¸¸Ð#AÓBÐBà�z‰z‹|ˆØ�?‰?˜5Ô!Ø $ R a ¨$¨q¨r¨(¯.©.Ó*:�g‰HØ�_‰_Ð;Ô<Ø $ R a ¨$¨q¨r¨(¯.©.Ó*:�g‰Hà $ R a ¨$¨q¨r¨(¯.©.Ó*:�gˆHà'/°Ð&9ˆŒ
ð (ˆÔð :>ˆÔð 37ˆ�r&   c                óŽ   — | j                   �!| j                   d   |k(  r| j                   d   S t        |«      }|€y||f| _         |S )zDOne element cache, as only one spec Version is needed per Specifier.Nr   r
   )r‘   r   )rY   r£   Úversion_specifiers      r'   Ú_get_spec_versionzSpecifier._get_spec_version†  sY   € à×ÑÐ)¨d×.@Ñ.@ÀÑ.CÀwÒ.NØ×%Ñ% aÑ(Ð(ä*¨7Ó3ÐØÐ$Øà%Ð'8Ð9ˆÔØ Ð r&   c                ó0   — | j                  |«      }|€J ‚|S )zÕGet spec version, asserting it's valid (not for === operator).

        This method should only be called for operators where version
        strings are guaranteed to be valid PEP 440 versions (not ===).
        )r§   )rY   r£   Úspec_versions      r'   rE   zSpecifier._require_spec_version’  s&   € ð ×-Ñ-¨gÓ6ˆØÐ'Ð'Ð'ØÐr&   c                óæ   — | j                   �| j                   S | j                  }| j                  }|dk(  rt        }n-| j	                  |j                  d«      «      }t        |||«      }|| _         |S )zØConvert this specifier to sorted, non-overlapping version ranges.

        Each standard operator maps to one or two ranges.  ``===`` is
        modeled as full range (actual check done separately).  Cached.
        r›   r>   )r�   r¢   r£   r   rE   Úremovesuffixr   )rY   ÚoprK   Úresultr£   s        r'   Ú
_to_rangeszSpecifier._to_rangesœ  sk   € ð �<‰<Ð#Ø—<‘<Ðà�]‰]ˆØ—,‘,ˆà�Š;Ü)3‰Fà×0Ñ0°×1EÑ1EÀdÓ1KÓLˆGÜ$ R¨°'Ó:ˆFàˆŒØˆr&   c                óÊ   — | j                   �| j                   S | j                  \  }}|dk(  ry|dk(  r|j                  d«      ry| j                  |«      }|€y |j                  S )Nr;   Fr:   r>   )r�   rA   rB   r§   Úis_prerelease)rY   r¢   Úversion_strr£   s       r'   rd   zSpecifier.prereleases±  sy   € ð ×ÑÐ(Ø×$Ñ$Ð$ð !%§
¡
Ñˆ�+Ø�tÒØð �tÒ × 4Ñ 4°TÔ :Øð ×(Ñ(¨Ó5ˆØˆ?Øð ×$Ñ$Ð$r&   c                ó   — || _         y r#   )r�   rf   s     r'   rd   zSpecifier.prereleasesÍ  s
   € à!ˆÕr&   c                ó2   — | j                   | j                  fS r#   )rA   r�   rX   s    r'   Ú__getstate__zSpecifier.__getstate__Ñ  s   € ð —
‘
˜D×-Ñ-Ð.Ð.r&   c                óV  — d | _         d | _        t        |t        «      r¦t	        |«      dk(  r*|\  }}t        |«      rt        |«      r|| _        || _        y t	        |«      dk(  r`t        |d   t        «      rM|\  }}|j                  d«      }|j                  dd«      }t        |«      rt        |«      r|| _        || _        y t        |t        «      rH|j                  d«      }|j                  dd«      }t        |«      rt        |«      r|| _        || _        y t        d|›�«      ‚)Nr*   r
   rA   r�   ÚinvalidzCannot restore Specifier from )r‘   r�   r+   r,   r-   r0   r4   rA   r�   ÚdictrD   Ú	TypeError)rY   Ústater/   rd   Ú_Ú	slot_dicts         r'   Ú__setstate__zSpecifier.__setstate__×  s  € à!ˆÔØˆŒä�eœUÔ#Ü�5‹z˜QŠà$)Ñ!��kÜ! $Ô'¬M¸+Ô,FØ!%�D”JØ(3�DÔ%ØÜ�5‹z˜QŠ¤:¨e°A©h¼Ô#=à$‘��9Ø —}‘} WÓ-�Ø'Ÿm™m¨N¸IÓF�Ü! $Ô'¬M¸+Ô,FØ!%�D”JØ(3�DÔ%ØÜ�eœTÔ"à—9‘9˜WÓ%ˆDØŸ)™) N°IÓ>ˆKÜ˜dÔ#¬°kÔ(BØ!�”
Ø$/�Ô!ØäÐ8¸¸	ÐBÓCÐCr&   c                ó    — | j                   d   S )z`The operator of this specifier.

        >>> Specifier("==1.2.3").operator
        '=='
        r   ©rA   rX   s    r'   r¢   zSpecifier.operatorø  ó   € ð �z‰z˜!‰}Ðr&   c                ó    — | j                   d   S )zaThe version of this specifier.

        >>> Specifier("==1.2.3").version
        '1.2.3'
        r
   r¾   rX   s    r'   r£   zSpecifier.version  r¿   r&   c                óŒ   — | j                   �d| j                  ›�nd}d| j                  j                  › dt	        | «      ›|› d�S )aT  A representation of the Specifier that shows all internal state.

        >>> Specifier('>=1.0.0')
        <Specifier('>=1.0.0')>
        >>> Specifier('>=1.0.0', prereleases=False)
        <Specifier('>=1.0.0', prereleases=False)>
        >>> Specifier('>=1.0.0', prereleases=True)
        <Specifier('>=1.0.0', prereleases=True)>
        ú, prereleases=Ú r?   ú(ú)>©r�   rd   Ú	__class__rP   r.   ©rY   r3   s     r'   Ú__repr__zSpecifier.__repr__
  sU   € ð × Ñ Ð,ð ˜T×-Ñ-Ð0Ñ1àð 	ð �4—>‘>×*Ñ*Ð+¨1¬S°«Y¨M¸#¸¸bÐAÐAr&   c                ó4   —  dj                   | j                  Ž S )zÐA string representation of the Specifier that can be round-tripped.

        >>> str(Specifier('>=1.0.0'))
        '>=1.0.0'
        >>> str(Specifier('>=1.0.0', prereleases=False))
        '>=1.0.0'
        z{}{})ÚformatrA   rX   s    r'   r[   zSpecifier.__str__  s   € ð ˆv�}‰}˜dŸj™jÐ)Ð)r&   c                óž   — | j                   \  }}|dk(  s|j                  d«      r||fS | j                  |«      }t        ||dk7  ¬«      }||fS )Nr›   r>   rš   )Ústrip_trailing_zero)rA   rB   rE   r   )rY   r¢   r£   r©   Úcanonical_versions        r'   Ú_canonical_speczSpecifier._canonical_spec&  sc   € à ŸJ™JÑˆ�'Ø�uÒ × 0Ñ 0°Ô 6Ø˜WÐ$Ð$à×1Ñ1°'Ó:ˆä0Ø¨x¸4Ñ/?ô
Ðð Ð*Ð*Ð*r&   c                ó,   — t        | j                  «      S r#   )ÚhashrÏ   rX   s    r'   r^   zSpecifier.__hash__4  s   € Ü�D×(Ñ(Ó)Ð)r&   c                óî   — t        |t        «      r	 | j                  t        |«      «      }nt        || j                  «      st        S | j
                  |j
                  k(  S # t        $ r	 t        cY S w xY w)a>  Whether or not the two Specifier-like objects are equal.

        :param other: The other object to check against.

        The value of :attr:`prereleases` is ignored.

        >>> Specifier("==1.2.3") == Specifier("== 1.2.3.0")
        True
        >>> (Specifier("==1.2.3", prereleases=False) ==
        ...  Specifier("==1.2.3", prereleases=True))
        True
        >>> Specifier("==1.2.3") == "==1.2.3"
        True
        >>> Specifier("==1.2.3") == Specifier("==1.2.4")
        False
        >>> Specifier("==1.2.3") == Specifier("~=1.2.3")
        False
        )r+   r.   rÇ   r   ÚNotImplementedrÏ   r`   s     r'   rb   zSpecifier.__eq__7  si   € ô& �eœSÔ!ð&ØŸ™¤s¨5£zÓ2‘ô ˜E 4§>¡>Ô2Ü!Ð!à×#Ñ# u×'<Ñ'<Ñ<Ð<øô $ò &Ü%Ò%ð&ús   ’A" Á"A4Á3A4c                ó$   — | j                  |«      S )a:  Return whether or not the item is contained in this specifier.

        :param item: The item to check for.

        This is used for the ``in`` operator and behaves the same as
        :meth:`contains` with no ``prereleases`` argument passed.

        >>> "1.2.3" in Specifier(">=1.2.3")
        True
        >>> Version("1.2.3") in Specifier(">=1.2.3")
        True
        >>> "1.0.0" in Specifier(">=1.2.3")
        False
        >>> "1.3.0a1" in Specifier(">=1.2.3")
        True
        >>> "1.3.0a1" in Specifier(">=1.2.3", prereleases=True)
        True
        ©rj   ©rY   ri   s     r'   Ú__contains__zSpecifier.__contains__T  ó   € ð& �}‰}˜TÓ"Ð"r&   c                óH  — | j                   d   dk(  r&t        t        | j                  |g|¬«      «      «      S t	        |«      }|€y|€ t        | j                  | j                  «      }|du r|j                  ryt        | |«      }|�|S t        | j                  «       |«      S )a'  Return whether or not the item is contained in this specifier.

        :param item:
            The item to check for, which can be a version string or a
            :class:`~packaging.version.Version` instance.
        :param prereleases:
            Whether or not to match prereleases with this Specifier. If set to
            ``None`` (the default), it will follow the recommendation from
            :pep:`440` and match prereleases, as there are no other versions.

        >>> Specifier(">=1.2.3").contains("1.2.3")
        True
        >>> Specifier(">=1.2.3").contains(Version("1.2.3"))
        True
        >>> Specifier(">=1.2.3").contains("1.0.0")
        False
        >>> Specifier(">=1.2.3").contains("1.3.0a1")
        True
        >>> Specifier(">=1.2.3", prereleases=False).contains("1.3.0a1")
        False
        >>> Specifier(">=1.2.3").contains("1.3.0a1")
        True

        .. versionchanged:: 26.0

            With ``prereleases=None``, a prerelease now matches. A single
            version has no alternatives, so the :pep:`440` rule to accept
            prereleases when nothing else satisfies the specifier applies.
            Earlier versions rejected it. An unparsable version now returns
            ``False`` instead of raising :exc:`~packaging.version.InvalidVersion`.
        r   r›   ©rd   F)rA   r2   Úlistro   r   r   r�   rd   r°   rN   r   r®   )rY   ri   rd   rI   Úmatchs        r'   rj   zSpecifier.containsi  s¤   € ðD �:‰:�a‰=˜EÒ!Üœ˜TŸ[™[¨$¨¸[˜[ÓIÓJÓKÐKä Ó%ˆØˆ>ààÐÜ-¨d×.?Ñ.?À×AQÑAQÓRˆKà˜%Ñ F×$8Ò$8Øô ˜D &Ó)ˆØÐØˆLä" 4§?¡?Ó#4°fÓ=Ð=r&   c                 ó   — y r#   r%   rl   s       r'   ro   zSpecifier.filter¡  rp   r&   c                 ó   — y r#   r%   rl   s       r'   ro   zSpecifier.filter©  rr   r&   c                ó  ‡‡— |€ t        | j                  | j                  «      }| j                  dk(  r3| j                  j                  «       Šˆˆfd„|D «       }t        |‰|«      S t        | j                  «       |‰|«      S )aþ  Filter items in the given iterable, that match the specifier.

        :param iterable:
            An iterable that can contain version strings and
            :class:`~packaging.version.Version` instances. The items in the
            iterable will be filtered according to the specifier.
        :param prereleases:
            Whether or not to allow prereleases in the returned iterator. If set to
            ``None`` (the default), it will follow the recommendation from :pep:`440`
            and match prereleases if there are no other versions.
        :param key:
            A callable that takes a single argument (an item from the iterable) and
            returns a version string or :class:`~packaging.version.Version`
            instance to be used for filtering.

        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
        ['1.3']
        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.2.3", "1.3", Version("1.4")]))
        ['1.2.3', '1.3', <Version('1.4')>]
        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.5a1"]))
        ['1.5a1']
        >>> list(Specifier(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        >>> list(Specifier(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']
        >>> list(Specifier(">=1.2.3").filter(
        ... [{"ver": "1.2"}, {"ver": "1.3"}],
        ... key=lambda x: x["ver"]))
        [{'ver': '1.3'}]

        .. versionchanged:: 26.1

            Added the ``key`` parameter.
        r›   c              3  ón   •K  — | ],  }t        ‰€|n ‰|«      «      j                  «       ‰k(  r|–— Œ. y ­wr#   )r.   Úlower)Ú.0ri   rn   Ú
spec_lowers     €€r'   ú	<genexpr>z#Specifier.filter.<locals>.<genexpr>Þ  s9   øè ø€ ò àÜ˜s˜{‘t±°D³	Ó:×@Ñ@ÓBÀjÒPô ñùs   ƒ25)	r   r�   rd   r¢   r£   rá   Ú_apply_prereleases_filterr   r®   )rY   rm   rd   rn   Úmatchesrã   s      ` @r'   ro   zSpecifier.filter±  sz   ù€ ðP ÐÜ-¨d×.?Ñ.?À×AQÑAQÓRˆKà�=‰=˜EÒ!ØŸ™×+Ñ+Ó-ˆJôà$ôˆGô
 -¨W°c¸;ÓGÐGä §¡Ó 1°8¸SÀ+ÓNÐNr&   ©rÃ   N)r/   r.   rd   r{   ru   r|   )r£   r.   ru   zVersion | None)r£   r.   ru   r   ©ru   zSequence[Interval]rz   ©rg   r{   ru   r|   )ru   z#tuple[tuple[str, str], bool | None]©r¹   ry   ru   r|   rt   )ru   ztuple[str, str]rv   rx   )ri   zstr | Versionru   r2   r#   )ri   ÚUnparsedVersionrd   r{   ru   r2   r}   r~   r   r€   r�   )"rP   rQ   rR   rS   r…   Ú_specifier_regex_strÚreÚcompileÚVERBOSEÚ
IGNORECASErž   rœ   Ú__annotations__r¤   r§   rE   r®   r‡   rd   rŠ   r´   r¼   r¢   r£   rÉ   r[   rÏ   r^   rb   r×   rj   r‹   rŒ   ro   r%   r&   r'   r    r    Ü   sÞ  … ñð&€IðZÐðx ˆR�Z‰ZØÐ%Ñ%¨Ñ.°·
±
¸R¿]¹]Ñ0Jó€Fð ØØØØ"ØØØñ	€J�ó 	ô!7óF
!óóð* ò%ó ð%ð6 ×Ñò"ó ð"ó/óDðB òó ðð òó ðóBó$*ð ò+ó ð+ó*ó=ó:#ô*6>ðp ‡_�_ð $(Øð	+à.ð+ð !ð+ð ð	+ð
 
&ò+ó ð+ð ‡_�_ð $(Ø.1ð	àðð !ðð ,ð	ð
 
òó ðð $(Ø7;ð	4Oàð4Oð !ð4Oð 5ð	4Oð
 
ô4Or&   c                óT   ‡‡— |€t        | ‰«      S |rt        | «      S ˆˆfd„| D «       S )zÓApply ``prereleases=`` handling to an already-matched iterable.

    ``None`` means PEP 440 default (buffer pre-releases until a final
    appears); ``True`` yields everything; ``False`` drops pre-releases.
    c              3  óh   •K  — | ])  }t        ‰€|n ‰|«      «      xŠ�‰j                  s|–— Œ+ y ­wr#   )r   r°   )râ   ri   rn   rI   s     €€r'   rä   z,_apply_prereleases_filter.<locals>.<genexpr>ö  s<   øè ø€ ò àÜ$¨S¨[¡T¹cÀ$»iÓHÐHˆFÐQØ×#Ò#ô 	ñùs   ƒ/2)Ú_pep440_filter_prereleasesÚiter)ræ   rn   rd   rI   s    ` @r'   rå   rå   è  s7   ù€ ð ÐÜ)¨'°3Ó7Ð7ÙÜ�G‹}Ðôàôð r&   c                  ó¨  — e Zd ZdZdZ	 	 d	 	 	 	 	 dd„Zd d„Zed!d„«       Zej                  d"d„«       Zd#d„Z
d$d	„Zd%d
„Zd%d„Zd&d„Zd'd„Zd(d„Zd&d„Zd)d„Zd*d„Zd+d„Zd+d„Zd,d„Zd-d„Zd.d„Zd.d„Zd.d„Zd/d„Z	 	 d0	 	 	 	 	 	 	 d1d„Zej<                  	 	 d2	 	 	 	 	 	 	 d3d„«       Zej<                  	 	 d2	 	 	 	 	 	 	 d4d„«       Z	 	 d0	 	 	 	 	 	 	 d5d„Zy)6r!   a…  This class abstracts handling of a set of version specifiers.

    It can be passed a single specifier (``>=3.0``), a comma-separated list of
    specifiers (``>=3.0,!=3.1``), or no specifier at all.

    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.
    )Ú_canonicalizedÚ_has_arbitraryÚ_is_unsatisfiabler�   r�   Ú_specsNc                ó¾  — t        |t        «      re|j                  d«      D �cg c]#  }|j                  «       sŒ|j                  «       ‘Œ% }}t	        t        t        |«      «      | _        d|v | _        n1t	        |«      | _        t        d„ | j                  D «       «      | _        t        | j                  «      dk  | _        d| _        d| _        || _        yc c}w )a´  Initialize a SpecifierSet instance.

        :param specifiers:
            The string representation of a specifier or a comma-separated list of
            specifiers which will be parsed and normalized before use.
            May also be an iterable of ``Specifier`` instances, which will be used
            as is.
        :param prereleases:
            This tells the SpecifierSet if it should accept prerelease versions if
            applicable or not. The default of ``None`` will autodetect it from the
            given specifiers.

        :raises InvalidSpecifier:
            If the given ``specifiers`` are not parseable than this exception will be
            raised.
        ú,r›   c              3  ó6   K  — | ]  }d t        |«      v –— Œ y­w©r›   NrW   ©râ   Úss     r'   rä   z(SpecifierSet.__init__.<locals>.<genexpr><  s   è ø€ Ò%K¸! e¬s°1«v¤oÑ%Kùó   ‚r
   N)r+   r.   Úsplitr    r,   Úmapr    rú   rø   Úanyr-   r÷   rù   r�   r�   )rY   Ú
specifiersrd   r   Úsplit_specifierss        r'   r¤   zSpecifierSet.__init__  s¸   € ô, �j¤#Ô&ð 4>×3CÑ3CÀCÓ3HÖV¨aÈAÏGÉGÍI §¡¥	ÐVÐÐVä16´s¼9ÐFVÓ7WÓ1XˆDŒKà"'¨:Ð"5ˆDÕä 
Ó+ˆDŒKô #&Ñ%K¸t¿{¹{Ô%KÓ"KˆDÔä! $§+¡+Ó.°!Ñ3ˆÔØ.2ˆÔØ26ˆŒð (ˆÕùò#  Ws
   ¤CºCc                ó¸   — | j                   sCt        t        j                  t	        | j
                  t        ¬«      «      «      | _        d| _         | j
                  S )zBDeduplicate, sort, and cache specs for order-sensitive operations.©rn   T)r÷   r,   r·   ÚfromkeysÚsortedrú   r.   rX   s    r'   Ú_canonical_specszSpecifierSet._canonical_specsF  s=   € à×"Ò"Ü¤§¡¬f°T·[±[ÄcÔ.JÓ KÓLˆDŒKØ"&ˆDÔØ�{‰{Ðr&   c                óˆ   — | j                   �| j                   S | j                  sy t        d„ | j                  D «       «      ryy )Nc              3  ó4   K  — | ]  }|j                   –— Œ y ­wr#   rÚ   rÿ   s     r'   rä   z+SpecifierSet.prereleases.<locals>.<genexpr>\  s   è ø€ Ò2 ˆq�}�}Ñ2ùs   ‚T)r�   rú   r  rX   s    r'   rd   zSpecifierSet.prereleasesM  sB   € ð ×ÑÐ(Ø×$Ñ$Ð$ð
 �{Š{Øô Ñ2 d§k¡kÔ2Ô2Øàr&   c                ó    — || _         d | _        y r#   )r�   rù   rf   s     r'   rd   zSpecifierSet.prereleasesa  s   € à!ˆÔØ!%ˆÕr&   c                ó2   — | j                   | j                  fS r#   )rú   r�   rX   s    r'   r´   zSpecifierSet.__getstate__f  s   € ð —‘˜T×.Ñ.Ð/Ð/r&   c                óÖ  — d | _         d | _        t        |t        «      �rft	        |«      dk(  rk|\  }}t        |t        «      rVt        d„ |D «       «      rDt        |«      r9|| _        || _        t	        |«      dk  | _	        t        d„ |D «       «      | _        y t	        |«      dk(  rßt        |d   t        «      rÌ|\  }}|j                  dd«      }|j                  d«      }t        |t        «      rt        t        |t         ¬«      «      }t        |t        «      rjt        d	„ |D «       «      rXt        |«      rM|| _        || _        t	        | j                  «      dk  | _	        t        d
„ | j                  D «       «      | _        y t        |t        «      rÇ|j                  dd«      }|j                  d«      }t        |t        «      rt        t        |t         ¬«      «      }t        |t        «      rjt        d„ |D «       «      rXt        |«      rM|| _        || _        t	        | j                  «      dk  | _	        t        d„ | j                  D «       «      | _        y t#        d|›�«      ‚)Nr*   c              3  ó<   K  — | ]  }t        |t        «      –— Œ y ­wr#   ©r+   r    rÿ   s     r'   rä   z,SpecifierSet.__setstate__.<locals>.<genexpr>w  ó   è ø€ ÒD¸œJ q¬)×4ÑDùó   ‚r
   c              3  ó6   K  — | ]  }d t        |«      v –— Œ y­wrþ   rW   rÿ   s     r'   rä   z,SpecifierSet.__setstate__.<locals>.<genexpr>}  s   è ø€ Ò-MÀ!¨e´s¸1³v¬oÑ-Mùr  rú   r%   r�   r  c              3  ó<   K  — | ]  }t        |t        «      –— Œ y ­wr#   r  rÿ   s     r'   rä   z,SpecifierSet.__setstate__.<locals>.<genexpr>‰  r  r  c              3  ó6   K  — | ]  }d t        |«      v –— Œ y­wrþ   rW   rÿ   s     r'   rä   z,SpecifierSet.__setstate__.<locals>.<genexpr>�  s   è ø€ Ò-SÀ!¨e´s¸1³v¬oÑ-Sùr  c              3  ó<   K  — | ]  }t        |t        «      –— Œ y ­wr#   r  rÿ   s     r'   rä   z,SpecifierSet.__setstate__.<locals>.<genexpr>š  s   è ø€ Ò@°Qœ
 1¤i×0Ñ@ùr  c              3  ó6   K  — | ]  }d t        |«      v –— Œ y­wrþ   rW   rÿ   s     r'   rä   z,SpecifierSet.__setstate__.<locals>.<genexpr>   s   è ø€ Ò)O¸a¨%´3°q³6¬/Ñ)Oùr  z!Cannot restore SpecifierSet from )r�   rù   r+   r,   r-   Úallr4   rú   r�   r÷   r  rø   r·   rD   Ú	frozensetr
  r.   r¸   )rY   r¹   Úspecsrd   rº   r»   s         r'   r¼   zSpecifierSet.__setstate__l  só  € àˆŒØ!%ˆÔä�eœUÕ#Ü�5‹z˜QŠà%*Ñ"��{ä˜u¤eÔ,ÜÑD¸eÔDÔDÜ% kÔ2à"'�D”KØ(3�DÔ%Ü*-¨e«*¸©/�DÔ'Ü*-Ñ-MÀuÔ-MÓ*M�DÔ'ØÜ�5‹z˜QŠ¤:¨e°A©h¼Ô#=à$‘��9Ø!Ÿ™ h°Ó3�Ø'Ÿm™m¨NÓ;�ä˜e¤YÔ/Ü!¤&¨´CÔ"8Ó9�Eä˜u¤eÔ,ÜÑD¸eÔDÔDÜ% kÔ2à"'�D”KØ(3�DÔ%Ü*-¨d¯k©kÓ*:¸aÑ*?�DÔ'Ü*-Ñ-SÀtÇ{Á{Ô-SÓ*S�DÔ'ØÜ�eœTÔ"à—I‘I˜h¨Ó+ˆEØŸ)™) NÓ3ˆKä˜%¤Ô+Üœf U´Ô4Ó5�ä˜5¤%Ô(ÜÑ@¸%Ô@Ô@Ü! +Ô.à#�”Ø$/�Ô!Ü&)¨$¯+©+Ó&6¸!Ñ&;�Ô#Ü&)Ñ)OÀ4Ç;Á;Ô)OÓ&O�Ô#ØäÐ;¸E¸9ÐEÓFÐFr&   c                óŒ   — | j                   �d| j                  ›�nd}d| j                  j                  › dt	        | «      ›|› d�S )a  A representation of the specifier set that shows all internal state.

        Note that the ordering of the individual specifiers within the set may not
        match the input string.

        >>> SpecifierSet('>=1.0.0,!=2.0.0')
        <SpecifierSet('!=2.0.0,>=1.0.0')>
        >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=False)
        <SpecifierSet('!=2.0.0,>=1.0.0', prereleases=False)>
        >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=True)
        <SpecifierSet('!=2.0.0,>=1.0.0', prereleases=True)>
        rÂ   rÃ   r?   rÄ   rÅ   rÆ   rÈ   s     r'   rÉ   zSpecifierSet.__repr__¥  sU   € ð × Ñ Ð,ð ˜T×-Ñ-Ð0Ñ1àð 	ð �4—>‘>×*Ñ*Ð+¨1¬S°«Y¨M¸#¸¸bÐAÐAr&   c                óN   — dj                  d„ | j                  «       D «       «      S )an  A string representation of the specifier set that can be round-tripped.

        Note that the ordering of the individual specifiers within the set may not
        match the input string.

        >>> str(SpecifierSet(">=1.0.0,!=1.0.1"))
        '!=1.0.1,>=1.0.0'
        >>> str(SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False))
        '!=1.0.1,>=1.0.0'
        rü   c              3  ó2   K  — | ]  }t        |«      –— Œ y ­wr#   rW   rÿ   s     r'   rä   z'SpecifierSet.__str__.<locals>.<genexpr>Å  s   è ø€ Ò@ 1œ˜AŸÑ@ùs   ‚)Újoinr  rX   s    r'   r[   zSpecifierSet.__str__º  s"   € ð �x‰xÑ@¨×(=Ñ(=Ó(?Ô@Ó@Ð@r&   c                ó4   — t        | j                  «       «      S r#   )rÑ   r  rX   s    r'   r^   zSpecifierSet.__hash__Ç  s   € Ü�D×)Ñ)Ó+Ó,Ð,r&   c                óò  — t        |t        «      rt        |«      }nt        |t        «      st        S t        «       }| j                  |j                  z   |_        t        |j                  «      dk  |_        | j                  xs |j                  |_        | j                  �| j                  |j                  k(  r|j                  |_        |S |j                  €| j                  |_        |S t        d«      ‚)a‚  Return a SpecifierSet which is a combination of the two sets.

        :param other: The other object to combine with.

        >>> SpecifierSet(">=1.0.0,!=1.0.1") & '<=2.0.0,!=2.0.1'
        <SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>
        >>> SpecifierSet(">=1.0.0,!=1.0.1") & SpecifierSet('<=2.0.0,!=2.0.1')
        <SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>
        r
   zFCannot combine SpecifierSets with True and False prerelease overrides.)
r+   r.   r!   rÓ   rú   r-   r÷   rø   r�   Ú
ValueError)rY   ra   rH   s      r'   Ú__and__zSpecifierSet.__and__Ê  sâ   € ô �eœSÔ!Ü  Ó'‰EÜ˜E¤<Ô0Ü!Ð!ä “Nˆ	ØŸ;™;¨¯©Ñ5ˆ	ÔÜ#& y×'7Ñ'7Ó#8¸AÑ#=ˆ	Ô Ø#'×#6Ñ#6Ò#N¸%×:NÑ:Nˆ	Ô ð ×ÑÐ$¨×(9Ñ(9¸U×=OÑ=OÒ(OØ%*×%7Ñ%7ˆIÔ"ð Ðð ×ÑÐ'Ø%)×%6Ñ%6ˆIÔ"ð Ðô	 ØXóð r&   c                óÆ   — t        |t        t        f«      rt        t        |«      «      }nt        |t        «      st        S | j                  «       |j                  «       k(  S )a¡  Whether or not the two SpecifierSet-like objects are equal.

        :param other: The other object to check against.

        The value of :attr:`prereleases` is ignored.

        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> (SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False) ==
        ...  SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True))
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == ">=1.0.0,!=1.0.1"
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.2")
        False
        )r+   r.   r    r!   rÓ   r  r`   s     r'   rb   zSpecifierSet.__eq__ê  sN   € ô& �eœc¤9Ð-Ô.Ü ¤ U£Ó,‰EÜ˜E¤<Ô0Ü!Ð!à×$Ñ$Ó&¨%×*@Ñ*@Ó*BÑBÐBr&   c                ó,   — t        | j                  «      S )z7Returns the number of specifiers in this specifier set.)r-   rú   rX   s    r'   Ú__len__zSpecifierSet.__len__  s   € ä�4—;‘;ÓÐr&   c                ó,   — t        | j                  «      S )zð
        Returns an iterator over all the underlying :class:`Specifier` instances
        in this specifier set.

        >>> sorted(SpecifierSet(">=1.0.0,!=1.0.1"), key=str)
        [<Specifier('!=1.0.1')>, <Specifier('>=1.0.0')>]
        )rõ   rú   rX   s    r'   Ú__iter__zSpecifierSet.__iter__  s   € ô �D—K‘KÓ Ð r&   c                óŒ   — | j                   �| j                   S t        d„ | j                  D «       «      | _         | j                   S )z¨Intersect all specifiers into a single sequence of version ranges.

        Empty when unsatisfiable. Callers must ensure ``self._specs``
        is non-empty.
        c              3  ó<   K  — | ]  }|j                  «       –— Œ y ­wr#   )r®   rÿ   s     r'   rä   z+SpecifierSet._get_ranges.<locals>.<genexpr>  s   è ø€ Ò1VÀQ°!·,±,·.Ñ1Vùr  )r�   r   rú   rX   s    r'   Ú_get_rangeszSpecifierSet._get_ranges  s8   € ð �<‰<Ð#Ø—<‘<Ðä1Ñ1VÈ$Ï+É+Ô1VÓVˆŒØ�|‰|Ðr&   c                óô   — | j                   }|�|S | j                  sd| _         y| j                  «        }|s| j                  «       }|s'| j                  du rt        | j                  «       «      }|| _         |S )aÆ  Check whether this specifier set can never be satisfied.

        Returns True if no version can satisfy all specifiers simultaneously.

        >>> SpecifierSet(">=2.0,<1.0").is_unsatisfiable()
        True
        >>> SpecifierSet(">=1.0,<2.0").is_unsatisfiable()
        False
        >>> SpecifierSet("").is_unsatisfiable()
        False
        >>> SpecifierSet("==1.0,!=1.0").is_unsatisfiable()
        True

        .. versionadded:: 26.1
        F)rù   rú   r,  Ú_check_arbitrary_unsatisfiablerd   r   )rY   Úcachedr­   s      r'   Úis_unsatisfiablezSpecifierSet.is_unsatisfiable  s~   € ð  ×'Ñ'ˆØÐØˆMà�{Š{Ø%*ˆDÔ"Øà×%Ñ%Ó'Ð'ˆáØ×8Ñ8Ó:ˆFá˜$×*Ñ*¨eÑ3Ü/°×0@Ñ0@Ó0BÓCˆFà!'ˆÔØˆr&   c                óÎ  ‡‡— | j                   D �cg c]  }|j                  dk(  sŒ|‘Œ }}|sy|d   j                  j                  «       Št	        ˆfd„|dd D «       «      ryt        |d   j                  «      Š| j                  du r‰�‰j                  ry| j                   D �cg c]  }|j                  dk7  sŒ|‘Œ }}|sy‰€yt        ˆfd„|D «       «       S c c}w c c}w )	a  Check === (arbitrary equality) specs for unsatisfiability.

        === uses case-insensitive string comparison, so the only candidate
        that can match ``===V`` is the literal string V.  This method
        checks whether that candidate is excluded by other specifiers.
        r›   Fr   c              3  óX   •K  — | ]!  }|j                   j                  «       ‰k7  –— Œ# y ­wr#   )r£   rá   )râ   r   Úfirsts     €r'   rä   z>SpecifierSet._check_arbitrary_unsatisfiable.<locals>.<genexpr>N  s!   øè ø€ ÒA¨aˆq�y‰y�‰Ó  EÕ)ÑAùó   ƒ'*r
   NTc              3  ó@   •K  — | ]  }|j                  ‰«      –— Œ y ­wr#   rÕ   )râ   r   Ú	candidates     €r'   rä   z>SpecifierSet._check_arbitrary_unsatisfiable.<locals>.<genexpr>f  s   øè ø€ Ò?°�q—z‘z )×,Ñ?ùs   ƒ)	rú   r¢   r£   rá   r  r   rd   r°   r  )rY   r   r™   Ústandardr6  r3  s       @@r'   r.  z+SpecifierSet._check_arbitrary_unsatisfiableA  sç   ù€ ð !%§¡ÖC˜1¨q¯z©z¸UÓ/B’QÐCˆ	ÐCÙØð ˜!‘×$Ñ$×*Ñ*Ó,ˆÜÓA°9¸Q¸R°=ÔAÔAØô # 9¨Q¡<×#7Ñ#7Ó8ˆ	ð
 ×Ñ Ñ%ØÐ%Ø×'Ò'àà#Ÿ{™{ÖB˜!¨a¯j©j¸EÓ.A’AÐBˆÐBÙØàÐàäÓ?°hÔ?Ó?Ð?Ð?ùò= Dùò, Cs   ‘C¦CÂ'C"Â<C"c                ó0   — ddl m} |j                  | «      S )ac  Return the :class:`~packaging.ranges.VersionRange` this set accepts.

        An empty set yields the full range; an unsatisfiable set yields the
        empty range. ``===`` specifiers contribute literal-string admission.

        >>> SpecifierSet(">=1.0,<2.0").to_range()
        <VersionRange '[1.0, 2.0.dev0)'>

        .. versionadded:: 26.3
        r
   )ÚVersionRange)r   r9  Ú_from_specifier_set)rY   r9  s     r'   Úto_rangezSpecifierSet.to_rangeh  s   € õ 	)à×/Ñ/°Ó5Ð5r&   c                ó€   — t        |t        «      st        d«      ‚| j                  s|j                  rt	        d«      ‚y )Nzexpected a SpecifierSetz+set relations do not support === specifiers)r+   r!   r¸   rø   r#  r`   s     r'   Ú_check_relation_operandz$SpecifierSet._check_relation_operandw  s:   € Ü˜%¤Ô.ÜÐ5Ó6Ð6Ø×Ò %×"6Ò"6ÜÐJÓKÐKð #7r&   c                ó~   — | j                  |«       | j                  «       j                  |j                  «       «      S )a=  Return whether every version matching this set also matches other.

        :raises ValueError:
            If either set uses ``===`` specifiers, or the two sets were
            given different ``prereleases`` arguments (unset on one side
            counts as different).
        :raises TypeError:
            If other is not a :class:`SpecifierSet`.

        >>> SpecifierSet(">=3.12,<3.13").is_subset(SpecifierSet(">=3.12"))
        True
        >>> SpecifierSet(">=3.12").is_subset(SpecifierSet(">=3.12,<3.13"))
        False

        .. versionadded:: 26.3
        )r=  r;  Ú	is_subsetr`   s     r'   r?  zSpecifierSet.is_subset}  s0   € ð" 	×$Ñ$ UÔ+Ø�}‰}‹×(Ñ(¨¯©Ó)9Ó:Ð:r&   c                ó~   — | j                  |«       | j                  «       j                  |j                  «       «      S )aæ  Return whether every version matching other also matches this set.

        :raises ValueError:
            If either set uses ``===`` specifiers, or the two sets were
            given different ``prereleases`` arguments (unset on one side
            counts as different).
        :raises TypeError:
            If other is not a :class:`SpecifierSet`.

        >>> SpecifierSet(">=3.12").is_superset(SpecifierSet(">=3.12,<3.13"))
        True

        .. versionadded:: 26.3
        )r=  r;  Úis_supersetr`   s     r'   rA  zSpecifierSet.is_superset‘  s0   € ð 	×$Ñ$ UÔ+Ø�}‰}‹×*Ñ*¨5¯>©>Ó+;Ó<Ð<r&   c                ó~   — | j                  |«       | j                  «       j                  |j                  «       «      S )a.  Return whether this set and other share no matching versions.

        :raises ValueError:
            If either set uses ``===`` specifiers, or the two sets were
            given different ``prereleases`` arguments (unset on one side
            counts as different).
        :raises TypeError:
            If other is not a :class:`SpecifierSet`.

        >>> SpecifierSet("<3.12").is_disjoint(SpecifierSet(">=3.12"))
        True
        >>> SpecifierSet("<3.12").is_disjoint(SpecifierSet(">=3.11"))
        False

        .. versionadded:: 26.3
        )r=  r;  Úis_disjointr`   s     r'   rC  zSpecifierSet.is_disjoint£  s0   € ð" 	×$Ñ$ UÔ+Ø�}‰}‹×*Ñ*¨5¯>©>Ó+;Ó<Ð<r&   c                ó$   — | j                  |«      S )aq  Return whether or not the item is contained in this specifier.

        :param item: The item to check for.

        This is used for the ``in`` operator and behaves the same as
        :meth:`contains` with no ``prereleases`` argument passed.

        >>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> Version("1.2.3") in SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> "1.0.1" in SpecifierSet(">=1.0.0,!=1.0.1")
        False
        >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True)
        True
        rÕ   rÖ   s     r'   r×   zSpecifierSet.__contains__·  rØ   r&   c                ó
  — t        |«      }|�|r|j                  rd}|�| j                  rt        |t        «      s|}n|}|�œ| j                  s�|j
                  €„| j                  rx|j                  r|du s|€| j                  du ry| j                  }|€=| j                  D ]  }t        ||«      }|€ n|rŒ y y| j                  «       x}| _        t        ||«      S t        t        | j                  |g|¬«      «      «      S )a<  Return whether or not the item is contained in this SpecifierSet.

        :param item:
            The item to check for, which can be a version string or a
            :class:`~packaging.version.Version` instance.
        :param prereleases:
            Whether or not to match prereleases with this SpecifierSet. If set to
            ``None`` (the default), it will follow the recommendation from :pep:`440`
            and match prereleases, as there are no other versions.
        :param installed:
            Whether or not the item is installed. If set to ``True``, it will
            accept prerelease versions even if the specifier does not allow them.

        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.2.3")
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains(Version("1.2.3"))
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.0.1")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1")
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False).contains("1.3.0a1")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1", prereleases=True)
        True

        .. versionchanged:: 26.0

            With ``prereleases=None``, a prerelease now matches. A single
            version has no alternatives, so the :pep:`440` rule to accept
            prereleases when nothing else satisfies the specifiers applies.
            Earlier versions rejected it. An unparsable version now returns
            ``False`` instead of raising :exc:`~packaging.version.InvalidVersion`.
        TFrÚ   )r   r°   rø   r+   r   rC   rú   r�   r�   rN   r,  r   r2   rÛ   ro   )	rY   ri   rd   Ú	installedr£   Ú
check_itemÚboundsr/   rÜ   s	            r'   rj   zSpecifierSet.containsÌ  s  € ôP ! Ó&ˆàÐ¡9°×1FÒ1FØˆKð ˆ?˜t×2Ò2¼:ÀdÌGÔ;TØ‰Jà ˆJð ÐØ×'Ò'Ø—‘Ð%Ø—’à×$Ò$Ø˜uÑ$ØÐ'¨D×,=Ñ,=ÀÑ,Fàà—\‘\ˆFØˆ~ð
 !ŸK™Kò  �DÜ'¨¨gÓ6�EØ�}ÙÚ Ù$ð ð  à(,×(8Ñ(8Ó(:Ð:�˜œä& v¨wÓ7Ð7ä”D˜Ÿ™ j \¸{˜ÓKÓLÓMÐMr&   c                 ó   — y r#   r%   rl   s       r'   ro   zSpecifierSet.filter$  rp   r&   c                 ó   — y r#   r%   rl   s       r'   ro   zSpecifierSet.filter,  rr   r&   c                ó&  ‡‡— |€| j                   �| j                   }| j                  r]| j                  r%| j                  Šˆˆfd„|D «       }t        |‰|«      S | j                  }|€| j                  «       }t        ||‰|«      S t        |‰|«      S )a—  Filter items in the given iterable, that match the specifiers in this set.

        :param iterable:
            An iterable that can contain version strings and
            :class:`~packaging.version.Version` instances. The items in the
            iterable will be filtered according to the specifier.
        :param prereleases:
            Whether or not to allow prereleases in the returned iterator. If set to
            ``None`` (the default), it will follow the recommendation from :pep:`440`
            and match prereleases if there are no other versions.
        :param key:
            A callable that takes a single argument (an item from the iterable) and
            returns a version string or :class:`~packaging.version.Version`
            instance to be used for filtering.

        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
        ['1.3']
        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", Version("1.4")]))
        ['1.3', <Version('1.4')>]
        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.5a1"]))
        ['1.5a1']
        >>> list(SpecifierSet(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        >>> list(SpecifierSet(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']
        >>> list(SpecifierSet(">=1.2.3").filter(
        ... [{"ver": "1.2"}, {"ver": "1.3"}],
        ... key=lambda x: x["ver"]))
        [{'ver': '1.3'}]

        An "empty" SpecifierSet will filter items based on the presence of prerelease
        versions in the set.

        >>> list(SpecifierSet("").filter(["1.3", "1.5a1"]))
        ['1.3']
        >>> list(SpecifierSet("").filter(["1.5a1"]))
        ['1.5a1']
        >>> list(SpecifierSet("", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']
        >>> list(SpecifierSet("").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']

        .. versionchanged:: 26.0

            Prerelease filtering now follows the PEP 440 recommendation of
            yielding prereleases only when no final release is present.

        .. versionchanged:: 26.1

            Added the ``key`` parameter.
        c              3  óN   •‡K  — | ]  Št        ˆˆfd „‰D «       «      r‰–— Œ y­w)c              3  óX   •K  — | ]!  }|j                  ‰€‰n ‰‰«      d¬«      –— Œ# y ­w)NTrÚ   rÕ   )râ   r   ri   rn   s     €€r'   rä   z0SpecifierSet.filter.<locals>.<genexpr>.<genexpr>z  s1   øè ø€ ò àð Ÿ
™
¨3¨;¡4¹CÀ»IÐSW˜
×Xñùr4  N)r  )râ   ri   rn   r  s    @€€r'   rä   z&SpecifierSet.filter.<locals>.<genexpr>w  s.   ùè ø€ ò àÜô à!&ôô ô ñùs   „!%)rd   rú   rø   rå   r�   r,  r   )rY   rm   rd   rn   ræ   r   r  s      `  @r'   ro   zSpecifierSet.filter4  s™   ù€ ðx Ð 4×#3Ñ#3Ð#?Ø×*Ñ*ˆKà�;Š;Ø×"Ò"àŸ™�ôà (ô�ô 1°¸#¸{ÓKÐKà—\‘\ˆFØˆ~Ø×)Ñ)Ó+�Ü# F¨H°c¸;ÓGÐGô )¨°3¸ÓDÐDr&   rç   )r  zstr | Iterable[Specifier]rd   r{   ru   r|   )ru   ztuple[Specifier, ...]rz   ré   )ru   z)tuple[tuple[Specifier, ...], bool | None]rê   rt   rv   )ra   zSpecifierSet | strru   r!   rx   )ru   zIterator[Specifier]rè   )ru   r2   )ru   zranges.VersionRange)ra   ry   ru   r|   )ra   r!   ru   r2   )ri   rë   ru   r2   r€   )ri   rë   rd   r{   rF  r{   ru   r2   r}   r~   r   r�   ) rP   rQ   rR   rS   r…   r¤   r  r‡   rd   rŠ   r´   r¼   rÉ   r[   r^   r$  rb   r'  r)  r,  r0  r.  r;  r=  r?  rA  rC  r×   rj   r‹   rŒ   ro   r%   r&   r'   r!   r!   þ  sÖ  „ ñð$€Ið 13Ø#'ð*(à-ð*(ð !ð*(ð 
ó	*(óXð òó ðð& ×Ñò&ó ð&ó0ó7GórBó*Aó-óó@Có4 ó!ó
ó!óF%@óN6óLó;ó(=ó$=ó(#ð0 $(Ø!%ð	VNàðVNð !ðVNð ð	VNð
 
óVNðp ‡_�_ð $(Øð	+à.ð+ð !ð+ð ð	+ð
 
&ò+ó ð+ð ‡_�_ð $(Ø.1ð	àðð !ðð ,ð	ð
 
òó ðð $(Ø7;ð	SEàðSEð !ðSEð 5ð	SEð
 
ôSEr&   r!   c              #  ó0  K  — g }g }d}| D ]v  }t        |€|n ||«      «      }|€*|r|–— n"|j                  |«       |j                  |«       ŒD|j                  s|s|E d{  –—†  d}|–— Œc|rŒf|j                  |«       Œx |s|E d{  –—†  yy7 Œ/7 Œ­w)z?Filter per PEP 440: exclude prereleases unless no finals exist.FNT)r   Úappendr°   )rm   rn   Úall_nonfinalÚarbitrary_stringsÚfound_finalri   rI   s          r'   rô   rô   Š  s¼   è ø€ ð !€LØ#%Ðà€KØò &ˆÜ¨¨¡¹¸T»ÓCˆàˆ>ñ Ø“
à!×(Ñ(¨Ô.Ø×#Ñ# DÔ)Øà×#Ò#áØ,×,Ð,Ø"�ØŠJØò Ø×Ñ Õ%ð1&ñ6 Ø×Ñð ð -øð 	 ús*   ‚A BÁ"BÁ#BÁ1BÂBÂBÂB)ru   z	list[str])r/   ry   ru   zTypeGuard[tuple[str, str]])r3   ry   ru   zTypeGuard[bool | None])rH   r    rI   r   ru   r{   )ræ   r‚   rn   rƒ   rd   r{   ru   r„   )rm   r‚   rn   rƒ   ru   r„   )<rS   Ú
__future__r   rˆ   rí   r‹   r   r   r   r   r   r	   r�   r   r   r   r   r   r   r   r   r   Úutilsr   r£   r   ÚsysÚcollections.abcr   r   r   Úversion_infor   Útyping_extensionsrÃ   r   r   r$   r(   r0   r4   r5   r.   rë   r6   Ú__ge__Ú__le__rb   Ú__ne__r<   rñ   rN   r#  r   ÚABCMetar   r    rå   r!   rô   r%   r&   r'   ú<module>r]     sW  ðòõ #ã 
Û 	Û ÷÷ ÷
÷ 
õ 
õ (Ý áÛß<Ñ<à
×Ñ˜7Ò"Þ$å/åÝ!ò€óóó0ñ ˆCƒL€Ø˜ ˜Ñ%€ÙÐ1¸ÔIÐ ð �.‰.Ø
�.‰.Ø
�.‰.Ø
�.‰.ñ	FÐ ÐBó óô:	�zô 	ôS˜cŸk™kõ SôlIO�ô IOðXØðà	0ðð ðð ó	ô,I
E�=ô I
EðX' Øð' Ø"Ið' àô' r&   