§
    ZŠtj>Î  ã                  ó4  — 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r2d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%d6d„Z&d7d„Z'd8d„Z( e
d¦  «        Z)eee*f         Z+ e
de+¬¦  «        Z,ej-        ej.        ej/        ej0        dœZ1de2d<   d9d$„Z3 G d%„ d&e4¦  «        Z5 G d'„ d(ej6        ¬)¦  «        Z7 G d*„ d e7¦  «        Z8d:d1„Z9 G d2„ d3e7¦  «        Z:d;d5„Z;dS )<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ÚSpecifierSetÚreturnú	list[str]c                 ó   — t           S ©N)Ú__all__© ó    úR/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/packaging/specifiers.pyÚ__dir__r*   <   s   € Ý€Nr(   ÚspecÚobjectúTypeGuard[tuple[str, str]]c               ó¾   — t          | t          ¦  «        oHt          | ¦  «        dk    o5t          | d         t          ¦  «        ot          | d         t          ¦  «        S )Né   r   r
   )Ú
isinstanceÚtupleÚlenÚstr)r+   s    r)   Ú_validate_specr4   @   sT   € å�4�ÑÔð 	%Ý�‰IŒI˜ŠNð	%å�t˜A”w¥Ñ$Ô$ð	%õ �t˜A”w¥Ñ$Ô$ð	r(   ÚpreúTypeGuard[bool | None]c               ó4   — | d u pt          | t          ¦  «        S r%   )r0   Úbool)r5   s    r)   Ú_validate_prer9   I   s   € Ø�$ˆ;Ð/�* S­$Ñ/Ô/Ð/r(   ÚTÚUnparsedVersionVar)Úbound)ú>=ú<=ú==ú!=z-dict[str, Callable[[Version, Version], bool]]Ú_DIRECT_COMPARE_OPSÚ	specifierr    Úparsedr   úbool | Nonec                óš  — | j         \  }}|                     d¦  «        s|j        �dS t                               |¦  «        }|� |||                      |¦  «        ¦  «        S |dv rc|                      |¦  «        }|j        |j        k    s*t          |j        ¦  «        t          |j        ¦  «        k    r|dk    r||k     n||k    S dS dS )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)ú<ú>rG   )	Ú_specÚendswithÚlocalrA   ÚgetÚ_require_spec_versionÚepochr   Úrelease)rB   rC   Úop_strÚver_strÚdirect_compareÚspec_vs         r)   Ú_fast_matchrT   ]   sè   € ð  ”o�O€FˆGØ×Ò˜ÑÔð  ¤Ð!9Øˆtå(×,Ò,¨VÑ4Ô4€NØÐ!Øˆ~˜f i×&EÒ&EÀgÑ&NÔ&NÑOÔOÐOà�ÐÐØ×0Ò0°Ñ9Ô9ˆð Œ<˜6œ<Ò'Ð'­<¸¼Ñ+GÔ+GÍ<ØŒNñL
ô L
ò ,
ð ,
ð '-°¢m m�6˜F’?�?¸À&ºÐHØˆtàˆ4r(   c                  ó   — e Zd ZdZdS )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/d0d$„¦   «         ZdS )1r   zO
    Abstract base class for :class:`Specifier` and :class:`SpecifierSet`.
    r'   )Ú_strr"   r3   c                ó    — t          | ¦  «        S )z Internal property for match_args©r3   ©Úselfs    r)   r[   zBaseSpecifier._strŽ   s   € õ �4‰yŒyÐr(   c                ó   — dS )zŽ
        Returns the str representation of this Specifier-like object. This
        should be representative of the Specifier itself.
        Nr'   r^   s    r)   Ú__str__zBaseSpecifier.__str__“   ó   € € € r(   Úintc                ó   — dS )zF
        Returns a hash value for this Specifier-like object.
        Nr'   r^   s    r)   Ú__hash__zBaseSpecifier.__hash__š   rb   r(   Úotherr,   r8   c                ó   — dS )z«
        Returns a boolean representing whether or not the two Specifier-like
        objects are equal.

        :param other: The other object to check against.
        Nr'   ©r_   rf   s     r)   Ú__eq__zBaseSpecifier.__eq__    rb   r(   rD   c                ó   — dS )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'   r^   s    r)   ÚprereleaseszBaseSpecifier.prereleases©   rb   r(   ÚvalueÚNonec                ó   — dS )zQSetter for :attr:`prereleases`.

        :param value: The value to set.
        Nr'   ©r_   rl   s     r)   rk   zBaseSpecifier.prereleases²   rb   r(   NÚitemrk   c                ó   — dS )zR
        Determines if the given item is contained within this specifier.
        Nr'   )r_   rp   rk   s      r)   ÚcontainszBaseSpecifier.contains¹   rb   r(   .ÚiterableúIterable[UnparsedVersionVar]ÚkeyúIterator[UnparsedVersionVar]c                ó   — d S r%   r'   ©r_   rs   rk   ru   s       r)   ÚfilterzBaseSpecifier.filter¿   ó	   € ð (+ sr(   úIterable[T]úCallable[[T], UnparsedVersion]úIterator[T]c                ó   — d S r%   r'   rx   s       r)   ry   zBaseSpecifier.filterÇ   ó	   € ð �cr(   úIterable[Any]ú'Callable[[Any], UnparsedVersion] | NoneúIterator[Any]c                ó   — dS )z•
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        Nr'   rx   s       r)   ry   zBaseSpecifier.filterÏ   rb   r(   ©r"   r3   ©r"   rc   ©rf   r,   r"   r8   ©r"   rD   )rl   r8   r"   rm   r%   )rp   r3   rk   rD   r"   r8   ©N.©rs   rt   rk   rD   ru   rm   r"   rv   ©rs   r{   rk   rD   ru   r|   r"   r}   ©NN©rs   r€   rk   rD   ru   r�   r"   r‚   )rV   rW   rX   rY   Ú	__slots__Ú__match_args__Úpropertyr[   ÚabcÚabstractmethodra   re   ri   rk   Úsetterrr   ÚtypingÚoverloadry   r'   r(   r)   r   r   †   s¾  € € € € € ðð ð €IØ€Nàðð ð ñ „Xðð 	Ôðð ð ñ Ôðð 	Ôðð ð ñ Ôðð
 	Ôðð ð ñ Ôðð ØÔðð ð ñ Ôñ „Xðð Ôðð ð ñ Ôðð 	Ôðð ð ð ñ Ôðð
 „_ð $(Øð	+ð +ð +ð +ñ „_ð+ð „_ð $(Ø.1ð	ð ð ð ñ „_ðð 	Ôð $(Ø7;ð		ð 	ð 	ð 	ñ Ôð	ð 	ð 	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<   dFdGd„ZdHd„ZdId„ZdJd„ZedKd „¦   «         Zej        dLd"„¦   «         ZdMd$„ZdNd'„ZedOd(„¦   «         ZedOd)„¦   «         ZdOd*„ZdOd+„ZedPd-„¦   «         ZdQd/„ZdRd2„ZdSd5„ZdTdUd7„Zej         	 	 dVdWd=„¦   «         Z!ej         	 	 dVdXdA„¦   «         Z!	 	 dYdZdE„Z!dS )[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Ú_rangesrI   Ú_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@   r>   r=   rG   rH   ú===r   Ú
_operatorsÚ Nr+   r3   rk   rD   r"   rm   c                óþ  — | j                              |¦  «        st          d|›�¦  «        ‚|                     ¦   «         }|                     d¦  «        r'|dd…         |dd…                              ¦   «         }}nb|                     d¦  «        r'|dd…         |dd…                              ¦   «         }}n&|dd…         |dd…                              ¦   «         }}||f| _        || _        d| _        d| _        dS )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@   r>   r=   r/   r
   )	Ú_regexÚ	fullmatchr   ÚstripÚ
startswithrI   r—   r™   r˜   )r_   r+   rk   ÚoperatorÚversions        r)   Ú__init__zSpecifier.__init__c  s  € ð Œ{×$Ò$ TÑ*Ô*ð 	CÝ"Ð#A¸Ð#AÐ#AÑBÔBÐBà�zŠz‰|Œ|ˆØ�?Š?˜5Ñ!Ô!ð 	;Ø $ R a R¤¨$¨q¨r¨r¬(¯.ª.Ñ*:Ô*:�gˆHˆHØ�_Š_Ð;Ñ<Ô<ð 	;Ø $ R a R¤¨$¨q¨r¨r¬(¯.ª.Ñ*:Ô*:�gˆHˆHà $ R a R¤¨$¨q¨r¨r¬(¯.ª.Ñ*:Ô*:�gˆHà'/°Ð&9ˆŒ
ð (ˆÔð :>ˆÔð 37ˆŒˆˆr(   r¬   úVersion | Nonec                óˆ   — | j         �| j         d         |k    r| j         d         S t          |¦  «        }|€dS ||f| _         |S )zDOne element cache, as only one spec Version is needed per Specifier.Nr   r
   )r™   r   )r_   r¬   Úversion_specifiers      r)   Ú_get_spec_versionzSpecifier._get_spec_version†  sX   € àÔÐ)¨dÔ.@ÀÔ.CÀwÒ.NÐ.NØÔ% aÔ(Ð(å*¨7Ñ3Ô3ÐØÐ$Ø�4à%Ð'8Ð9ˆÔØ Ð r(   r   c                ó8   — |                       |¦  «        }|€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±   )r_   r¬   Úspec_versions      r)   rM   zSpecifier._require_spec_version’  s)   € ð ×-Ò-¨gÑ6Ô6ˆØÐ'Ð'Ð'ØÐr(   úSequence[Interval]c                óÚ   — | j         �| j         S | j        }| j        }|dk    rt          }n9|                      |                     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.
        Nr£   rF   )r˜   r«   r¬   r   rM   Úremovesuffixr   )r_   ÚoprQ   Úresultr¬   s        r)   Ú
_to_rangeszSpecifier._to_rangesœ  sp   € ð Œ<Ð#Ø”<ÐàŒ]ˆØ”,ˆà�Š;ˆ;Ý)3ˆFˆFà×0Ò0°×1EÒ1EÀdÑ1KÔ1KÑLÔLˆGÝ$ R¨°'Ñ:Ô:ˆFàˆŒØˆr(   c                ó¼   — | j         �| j         S | j        \  }}|dk    rdS |dk    r|                     d¦  «        rdS |                      |¦  «        }|€d S |j        S )Nr@   Fr?   rF   )r—   rI   rJ   r±   Úis_prerelease)r_   r«   Úversion_strr¬   s       r)   rk   zSpecifier.prereleases±  sƒ   € ð ÔÐ(ØÔ$Ð$ð !%¤
Ñˆ�+Ø�tÒÐØ�5ð �tÒÐ × 4Ò 4°TÑ :Ô :ÐØ�5ð ×(Ò(¨Ñ5Ô5ˆØˆ?Ø�4ð Ô$Ð$r(   rl   c                ó   — || _         d S r%   )r—   ro   s     r)   rk   zSpecifier.prereleasesÍ  s   € à!ˆÔÐÐr(   ú#tuple[tuple[str, str], bool | None]c                ó   — | j         | j        fS r%   )rI   r—   r^   s    r)   Ú__getstate__zSpecifier.__getstate__Ñ  s   € ð ”
˜DÔ-Ð.Ð.r(   Ústater,   c                óì  — d | _         d | _        t          |t          ¦  «        rÒt	          |¦  «        dk    r3|\  }}t          |¦  «        rt          |¦  «        r|| _        || _        d S t	          |¦  «        dk    ryt          |d         t          ¦  «        r^|\  }}| 
                    d¦  «        }| 
                    dd¦  «        }t          |¦  «        rt          |¦  «        r|| _        || _        d S t          |t          ¦  «        rY| 
                    d¦  «        }| 
                    dd¦  «        }t          |¦  «        rt          |¦  «        r|| _        || _        d S t          d|›�¦  «        ‚)Nr/   r
   rI   r—   ÚinvalidzCannot restore Specifier from )r™   r˜   r0   r1   r2   r4   r9   rI   r—   ÚdictrL   Ú	TypeError)r_   rÁ   r+   rk   Ú_Ú	slot_dicts         r)   Ú__setstate__zSpecifier.__setstate__×  sp  € à!ˆÔØˆŒå�e�UÑ#Ô#ð 	Ý�5‰zŒz˜QŠˆà$)Ñ!��kÝ! $Ñ'Ô'ð ­M¸+Ñ,FÔ,Fð Ø!%�D”JØ(3�DÔ%Ø�FÝ�5‰zŒz˜QŠˆ¥:¨e°A¬h½Ñ#=Ô#=ˆà$‘��9Ø —}’} WÑ-Ô-�Ø'Ÿmšm¨N¸IÑFÔF�Ý! $Ñ'Ô'ð ­M¸+Ñ,FÔ,Fð Ø!%�D”JØ(3�DÔ%Ø�FÝ�e�TÑ"Ô"ð 	à—9’9˜WÑ%Ô%ˆDØŸ)š) N°IÑ>Ô>ˆKÝ˜dÑ#Ô#ð ­°kÑ(BÔ(Bð Ø!�”
Ø$/�Ô!Ø�åÐB¸ÐBÐBÑCÔCÐCr(   c                ó   — | j         d         S )z`The operator of this specifier.

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

        >>> Specifier("==1.2.3").version
        '1.2.3'
        r
   rÊ   r^   s    r)   r¬   zSpecifier.version  rË   r(   c                ól   — | 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)>
        Nú, prereleases=r¥   rG   ú(ú)>©r—   rk   Ú	__class__rV   r3   ©r_   r5   s     r)   Ú__repr__zSpecifier.__repr__
  sT   € ð Ô Ð,ð 2˜TÔ-Ð1Ð1Ð1àð 	ð B�4”>Ô*ÐAÐA­S°©Y¬YÐA¸#ÐAÐAÐAÐAr(   c                ó    —  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{}{})ÚformatrI   r^   s    r)   ra   zSpecifier.__str__  s   € ð ˆvŒ}˜dœjÐ)Ð)r(   útuple[str, str]c                ó°   — | j         \  }}|dk    s|                     d¦  «        r||fS |                      |¦  «        }t          ||dk    ¬¦  «        }||fS )Nr£   rF   r¢   )Ústrip_trailing_zero)rI   rJ   rM   r   )r_   r«   r¬   r³   Úcanonical_versions        r)   Ú_canonical_speczSpecifier._canonical_spec&  sw   € à œJÑˆ�'Ø�uÒÐ × 0Ò 0°Ñ 6Ô 6ÐØ˜WÐ$Ð$à×1Ò1°'Ñ:Ô:ˆå0Ø¨x¸4Ò/?ð
ñ 
ô 
Ðð Ð*Ð*Ð*r(   rc   c                ó*   — t          | j        ¦  «        S r%   )ÚhashrÛ   r^   s    r)   re   zSpecifier.__hash__4  s   € Ý�DÔ(Ñ)Ô)Ð)r(   rf   r8   c                óú   — t          |t          ¦  «        r;	 |                      t          |¦  «        ¦  «        }n3# t          $ r
 t          cY S w xY wt          || j        ¦  «        st          S | j        |j        k    S )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
        )r0   r3   rÒ   r   ÚNotImplementedrÛ   rh   s     r)   ri   zSpecifier.__eq__7  s†   € õ& �e�SÑ!Ô!ð 	"ð&ØŸš¥s¨5¡z¤zÑ2Ô2��øÝ#ð &ð &ð &Ý%Ð%Ð%Ð%ð&øøøå˜E 4¤>Ñ2Ô2ð 	"Ý!Ð!àÔ# uÔ'<Ò<Ð<s   —": ºAÁArp   ústr | Versionc                ó,   — |                       |¦  «        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
        ©rr   ©r_   rp   s     r)   Ú__contains__zSpecifier.__contains__T  ó   € ð& �}Š}˜TÑ"Ô"Ð"r(   ÚUnparsedVersionc                ól  — | j         d         dk    r2t          t          |                      |g|¬¦  «        ¦  «        ¦  «        S t	          |¦  «        }|€dS |€t          | j        | j        ¦  «        }|du r	|j        rdS t          | |¦  «        }|�|S t          |                      ¦   «         |¦  «        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£   ©rk   NF)rI   r8   Úlistry   r   r   r—   rk   r»   rT   r   r¹   )r_   rp   rk   rC   Úmatchs        r)   rr   zSpecifier.containsi  s¾   € ðD Œ:�aŒ=˜EÒ!Ð!Ý�˜TŸ[š[¨$¨¸[˜[ÑIÔIÑJÔJÑKÔKÐKå Ñ%Ô%ˆØˆ>à�5àÐÝ-¨dÔ.?ÀÔAQÑRÔRˆKà˜%ÐÐ FÔ$8ÐØ�5õ ˜D &Ñ)Ô)ˆØÐØˆLå" 4§?¢?Ñ#4Ô#4°fÑ=Ô=Ð=r(   .rs   rt   ru   rv   c                ó   — d S r%   r'   rx   s       r)   ry   zSpecifier.filter¡  rz   r(   r{   r|   r}   c                ó   — d S r%   r'   rx   s       r)   ry   zSpecifier.filter©  r   r(   r€   r�   r‚   c                ó  ‡‡— |€t          | j        | j        ¦  «        }| j        dk    r9| j                             ¦   «         Šˆˆfd„|D ¦   «         }t          |‰|¦  «        S t          |                      ¦   «         |‰|¦  «        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.
        Nr£   c              3  ó€   •K  — | ]8}t          ‰€|n
 ‰|¦  «        ¦  «                             ¦   «         ‰k    ¯4|V — Œ9d S r%   )r3   Úlower)Ú.0rp   ru   Ú
spec_lowers     €€r)   ú	<genexpr>z#Specifier.filter.<locals>.<genexpr>Þ  s^   øè è € ð ð àÝ˜s˜{�t�t°°°D±	´	Ñ:Ô:×@Ò@ÑBÔBÀjÒPÐPð àPÐPÐPÐPðð r(   )	r   r—   rk   r«   r¬   rï   Ú_apply_prereleases_filterr   r¹   )r_   rs   rk   ru   Úmatchesrñ   s      ` @r)   ry   zSpecifier.filter±  s¡   øø€ ðP ÐÝ-¨dÔ.?ÀÔAQÑRÔRˆKàŒ=˜EÒ!Ð!Øœ×+Ò+Ñ-Ô-ˆJðð ð ð ð à$ðñ ô ˆGõ
 -¨W°c¸;ÑGÔGÐGå §¢Ñ 1Ô 1°8¸SÀ+ÑNÔNÐNr(   ©r¥   N)r+   r3   rk   rD   r"   rm   )r¬   r3   r"   r®   )r¬   r3   r"   r   ©r"   r´   r‡   ©rl   rD   r"   rm   )r"   r¾   ©rÁ   r,   r"   rm   r„   )r"   r×   r…   r†   )rp   rà   r"   r8   r%   )rp   ræ   rk   rD   r"   r8   rˆ   r‰   rŠ   r‹   rŒ   )"rV   rW   rX   rY   r�   Ú_specifier_regex_strÚreÚcompileÚVERBOSEÚ
IGNORECASEr§   r¤   Ú__annotations__r­   r±   rM   r¹   r�   rk   r’   rÀ   rÈ   r«   r¬   rÔ   ra   rÛ   re   ri   rä   rr   r“   r”   ry   r'   r(   r)   r    r    Ü   sÈ  € € € € € € ðð ð&€IðZÐðx ˆRŒZØÐ%Ñ%¨Ñ.°´
¸R¼]Ñ0Jñô €Fð ØØØØ"ØØØð	ð 	€Jð 	ð 	ð 	ñ 	ð!7ð !7ð !7ð !7ð !7ðF
!ð 
!ð 
!ð 
!ðð ð ð ðð ð ð ð* ð%ð %ð %ñ „Xð%ð6 Ôð"ð "ð "ñ Ôð"ð/ð /ð /ð /ðDð Dð Dð DðB ðð ð ñ „Xðð ðð ð ñ „XððBð Bð Bð Bð$*ð *ð *ð *ð ð+ð +ð +ñ „Xð+ð*ð *ð *ð *ð=ð =ð =ð =ð:#ð #ð #ð #ð*6>ð 6>ð 6>ð 6>ð 6>ðp „_ð $(Øð	+ð +ð +ð +ñ „_ð+ð „_ð $(Ø.1ð	ð ð ð ñ „_ðð $(Ø7;ð	4Oð 4Oð 4Oð 4Oð 4Oð 4Oð 4Or(   rô   r€   ru   r�   rk   r‚   c                ój   ‡‡— |€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.
    Nc              3  óf   •K  — | ]+}t          ‰€|n
 ‰|¦  «        ¦  «        xŠ�‰j        °'|V — Œ,d S r%   )r   r»   )rð   rp   ru   rC   s     €€r)   rò   z,_apply_prereleases_filter.<locals>.<genexpr>ö  s^   øè è € ð ð àÝ$¨S¨[ T T¸c¸cÀ$¹i¼iÑHÔHÐHˆFÐQØÔ#ð Rð 	àQÐQÐQÐQðð r(   )Ú_pep440_filter_prereleasesÚiter)rô   ru   rk   rC   s    ` @r)   ró   ró   è  s`   øø€ ð ÐÝ)¨'°3Ñ7Ô7Ð7Øð Ý�G‰}Œ}Ððð ð ð ð àðñ ô ð r(   c                  ób  — e Zd ZdZdZ	 	 d@dAd„ZdBd„ZedCd„¦   «         Zej	        dDd„¦   «         ZdEd„Z
dFd„ZdGd„ZdGd„ZdHd„ZdId„ZdJd„ZdHd „ZdKd"„ZdLd$„ZdMd%„ZdMd&„ZdNd(„ZdOd)„ZdPd*„ZdPd+„ZdPd,„ZdQd/„Z	 	 dRdSd1„Zej        	 	 dTdUd7„¦   «         Zej        	 	 dTdVd;„¦   «         Z	 	 dRdWd?„ZdS )Xr!   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˜   Ú_specsr¥   NÚ
specifiersústr | Iterable[Specifier]rk   rD   r"   rm   c                ó¢  — t          |t          ¦  «        rPd„ |                     d¦  «        D ¦   «         }t          t	          t
          |¦  «        ¦  «        | _        d|v | _        n7t          |¦  «        | _        t          d„ | j        D ¦   «         ¦  «        | _        t          | j        ¦  «        dk    | _
        d| _        d| _        || _        dS )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.
        c                ó^   — g | ]*}|                      ¦   «         ¯|                      ¦   «         ‘Œ+S r'   )r©   ©rð   Úss     r)   ú
<listcomp>z)SpecifierSet.__init__.<locals>.<listcomp>3  s-   € ÐVÐVÐV¨aÈAÏGÊGÉIÌIÐV §¢¡	¤	ÐVÐVÐVr(   ú,r£   c              3  ó8   K  — | ]}d t          |¦  «        v V — ŒdS ©r£   Nr]   r  s     r)   rò   z(SpecifierSet.__init__.<locals>.<genexpr><  s,   è è € Ð%KÐ%K¸! e­s°1©v¬v oÐ%KÐ%KÐ%KÐ%KÐ%KÐ%Kr(   r
   N)r0   r3   Úsplitr1   Úmapr    r  r  Úanyr2   r  r  r˜   r—   )r_   r  rk   Úsplit_specifierss       r)   r­   zSpecifierSet.__init__  sÎ   € õ, �j¥#Ñ&Ô&ð 	Lð  WÐV°:×3CÒ3CÀCÑ3HÔ3HÐVÑVÔVÐå16µs½9ÐFVÑ7WÔ7WÑ1XÔ1XˆDŒKà"'¨:Ð"5ˆDÔÐå 
Ñ+Ô+ˆDŒKõ #&Ð%KÐ%K¸t¼{Ð%KÑ%KÔ%KÑ"KÔ"KˆDÔå! $¤+Ñ.Ô.°!Ò3ˆÔØ.2ˆÔØ26ˆŒð (ˆÔÐÐr(   útuple[Specifier, ...]c                ó¶   — | j         sLt          t                               t	          | j        t          ¬¦  «        ¦  «        ¦  «        | _        d| _         | j        S )zBDeduplicate, sort, and cache specs for order-sensitive operations.©ru   T)r  r1   rÄ   ÚfromkeysÚsortedr  r3   r^   s    r)   Ú_canonical_specszSpecifierSet._canonical_specsF  sG   € àÔ"ð 	'Ý¥§¢­f°T´[ÅcÐ.JÑ.JÔ.JÑ KÔ KÑLÔLˆDŒKØ"&ˆDÔØŒ{Ðr(   c                ót   — | j         �| j         S | j        sd S t          d„ | j        D ¦   «         ¦  «        rdS d S )Nc              3  ó$   K  — | ]}|j         V — Œd S r%   rè   r  s     r)   rò   z+SpecifierSet.prereleases.<locals>.<genexpr>\  s$   è è € Ð2Ð2 ˆqŒ}Ð2Ð2Ð2Ð2Ð2Ð2r(   T)r—   r  r  r^   s    r)   rk   zSpecifierSet.prereleasesM  sT   € ð ÔÐ(ØÔ$Ð$ð
 Œ{ð 	Ø�4õ Ð2Ð2 d¤kÐ2Ñ2Ô2Ñ2Ô2ð 	Ø�4àˆtr(   rl   c                ó"   — || _         d | _        d S r%   )r—   r  ro   s     r)   rk   zSpecifierSet.prereleasesa  s   € à!ˆÔØ!%ˆÔÐÐr(   ú)tuple[tuple[Specifier, ...], bool | None]c                ó   — | j         | j        fS r%   )r  r—   r^   s    r)   rÀ   zSpecifierSet.__getstate__f  s   € ð ”˜TÔ.Ð/Ð/r(   rÁ   r,   c                óö  — d | _         d | _        t          |t          ¦  «        �r¿t	          |¦  «        dk    rˆ|\  }}t          |t          ¦  «        rnt          d„ |D ¦   «         ¦  «        rUt          |¦  «        rF|| _        || _        t	          |¦  «        dk    | _	        t          d„ |D ¦   «         ¦  «        | _        d S t	          |¦  «        dk    �rt          |d         t          ¦  «        rõ|\  }}|                     dd¦  «        }|                     d¦  «        }t          |t          ¦  «        r#t          t          |t           ¬¦  «        ¦  «        }t          |t          ¦  «        rxt          d	„ |D ¦   «         ¦  «        r_t          |¦  «        rP|| _        || _        t	          | j        ¦  «        dk    | _	        t          d
„ | j        D ¦   «         ¦  «        | _        d S t          |t          ¦  «        rð|                     dd¦  «        }|                     d¦  «        }t          |t          ¦  «        r#t          t          |t           ¬¦  «        ¦  «        }t          |t          ¦  «        rxt          d„ |D ¦   «         ¦  «        r_t          |¦  «        rP|| _        || _        t	          | j        ¦  «        dk    | _	        t          d„ | j        D ¦   «         ¦  «        | _        d S t#          d|›�¦  «        ‚)Nr/   c              3  ó@   K  — | ]}t          |t          ¦  «        V — Œd S r%   ©r0   r    r  s     r)   rò   z,SpecifierSet.__setstate__.<locals>.<genexpr>w  ó,   è è € ÐDÐD¸�J q­)Ñ4Ô4ÐDÐDÐDÐDÐDÐDr(   r
   c              3  ó8   K  — | ]}d t          |¦  «        v V — ŒdS r  r]   r  s     r)   rò   z,SpecifierSet.__setstate__.<locals>.<genexpr>}  s,   è è € Ð-MÐ-MÀ!¨eµs¸1±v´v¨oÐ-MÐ-MÐ-MÐ-MÐ-MÐ-Mr(   r  r'   r—   r  c              3  ó@   K  — | ]}t          |t          ¦  «        V — Œd S r%   r#  r  s     r)   rò   z,SpecifierSet.__setstate__.<locals>.<genexpr>‰  r$  r(   c              3  ó8   K  — | ]}d t          |¦  «        v V — ŒdS r  r]   r  s     r)   rò   z,SpecifierSet.__setstate__.<locals>.<genexpr>�  s,   è è € Ð-SÐ-SÀ!¨eµs¸1±v´v¨oÐ-SÐ-SÐ-SÐ-SÐ-SÐ-Sr(   c              3  ó@   K  — | ]}t          |t          ¦  «        V — Œd S r%   r#  r  s     r)   rò   z,SpecifierSet.__setstate__.<locals>.<genexpr>š  s,   è è € Ð@Ð@°Q�
 1¥iÑ0Ô0Ð@Ð@Ð@Ð@Ð@Ð@r(   c              3  ó8   K  — | ]}d t          |¦  «        v V — ŒdS r  r]   r  s     r)   rò   z,SpecifierSet.__setstate__.<locals>.<genexpr>   s,   è è € Ð)OÐ)O¸a¨%µ3°q±6´6¨/Ð)OÐ)OÐ)OÐ)OÐ)OÐ)Or(   z!Cannot restore SpecifierSet from )r˜   r  r0   r1   r2   Úallr9   r  r—   r  r  r  rÄ   rL   Ú	frozensetr  r3   rÅ   )r_   rÁ   Úspecsrk   rÆ   rÇ   s         r)   rÈ   zSpecifierSet.__setstate__l  sÛ  € àˆŒØ!%ˆÔå�e�UÑ#Ô#ñ 	Ý�5‰zŒz˜QŠˆà%*Ñ"��{å˜u¥eÑ,Ô,ð	åÐDÐD¸eÐDÑDÔDÑDÔDð	õ & kÑ2Ô2ð	ð
 #(�D”KØ(3�DÔ%Ý*-¨e©*¬*¸ª/�DÔ'Ý*-Ð-MÐ-MÀuÐ-MÑ-MÔ-MÑ*MÔ*M�DÔ'Ø�FÝ�5‰zŒz˜QŠ‰¥:¨e°A¬h½Ñ#=Ô#=ˆà$‘��9Ø!Ÿš h°Ñ3Ô3�Ø'Ÿmšm¨NÑ;Ô;�å˜e¥YÑ/Ô/ð :Ý!¥&¨µCÐ"8Ñ"8Ô"8Ñ9Ô9�Eå˜u¥eÑ,Ô,ð	åÐDÐD¸eÐDÑDÔDÑDÔDð	õ & kÑ2Ô2ð	ð
 #(�D”KØ(3�DÔ%Ý*-¨d¬kÑ*:Ô*:¸aÒ*?�DÔ'Ý*-Ð-SÐ-SÀtÄ{Ð-SÑ-SÔ-SÑ*SÔ*S�DÔ'Ø�FÝ�e�TÑ"Ô"ð 	à—I’I˜h¨Ñ+Ô+ˆEØŸ)š) NÑ3Ô3ˆKå˜%¥Ñ+Ô+ð 6Ý�f UµÐ4Ñ4Ô4Ñ5Ô5�å˜5¥%Ñ(Ô(ð	åÐ@Ð@¸%Ð@Ñ@Ô@Ñ@Ô@ð	õ " +Ñ.Ô.ð	ð
 $�”Ø$/�Ô!Ý&)¨$¬+Ñ&6Ô&6¸!Ò&;�Ô#Ý&)Ð)OÐ)OÀ4Ä;Ð)OÑ)OÔ)OÑ&OÔ&O�Ô#Ø�åÐE¸EÐEÐEÑFÔFÐFr(   r3   c                ól   — | 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)>
        NrÎ   r¥   rG   rÏ   rÐ   rÑ   rÓ   s     r)   rÔ   zSpecifierSet.__repr__¥  sT   € ð Ô Ð,ð 2˜TÔ-Ð1Ð1Ð1àð 	ð B�4”>Ô*ÐAÐA­S°©Y¬YÐA¸#ÐAÐAÐAÐAr(   c                ód   — d                      d„ |                      ¦   «         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  ó4   K  — | ]}t          |¦  «        V — Œd S r%   r]   r  s     r)   rò   z'SpecifierSet.__str__.<locals>.<genexpr>Å  s(   è è € Ð@Ð@ 1�˜A™œÐ@Ð@Ð@Ð@Ð@Ð@r(   )Újoinr  r^   s    r)   ra   zSpecifierSet.__str__º  s1   € ð �xŠxÐ@Ð@¨×(=Ò(=Ñ(?Ô(?Ð@Ñ@Ô@Ñ@Ô@Ð@r(   rc   c                óD   — t          |                      ¦   «         ¦  «        S r%   )rÝ   r  r^   s    r)   re   zSpecifierSet.__hash__Ç  s   € Ý�D×)Ò)Ñ+Ô+Ñ,Ô,Ð,r(   rf   úSpecifierSet | strc                óº  — t          |t          ¦  «        rt          |¦  «        }nt          |t          ¦  «        st          S t          ¦   «         }| j        |j        z   |_        t          |j        ¦  «        dk    |_        | j        p|j        |_        | j        �| j        |j        k    r|j        |_        n#|j        €| j        |_        nt          d¦  «        ‚|S )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
   NzFCannot combine SpecifierSets with True and False prerelease overrides.)
r0   r3   r!   rß   r  r2   r  r  r—   Ú
ValueError)r_   rf   rB   s      r)   Ú__and__zSpecifierSet.__and__Ê  sß   € õ �e�SÑ!Ô!ð 	"Ý  Ñ'Ô'ˆEˆEÝ˜E¥<Ñ0Ô0ð 	"Ý!Ð!å ‘N”Nˆ	Øœ;¨¬Ñ5ˆ	ÔÝ#& yÔ'7Ñ#8Ô#8¸AÒ#=ˆ	Ô Ø#'Ô#6Ð#N¸%Ô:Nˆ	Ô ð ÔÐ$¨Ô(9¸UÔ=OÒ(OÐ(OØ%*Ô%7ˆIÔ"Ð"ØÔÐ'Ø%)Ô%6ˆIÔ"Ð"åØXñô ð ð Ðr(   r8   c                ó   — t          |t          t          f¦  «        rt          t          |¦  «        ¦  «        }nt          |t          ¦  «        st          S |                      ¦   «         |                     ¦   «         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
        )r0   r3   r    r!   rß   r  rh   s     r)   ri   zSpecifierSet.__eq__ê  sk   € õ& �e�c¥9Ð-Ñ.Ô.ð 	"Ý ¥ U¡¤Ñ,Ô,ˆEˆEÝ˜E¥<Ñ0Ô0ð 	"Ý!Ð!à×$Ò$Ñ&Ô&¨%×*@Ò*@Ñ*BÔ*BÒBÐBr(   c                ó*   — t          | j        ¦  «        S )z7Returns the number of specifiers in this specifier set.)r2   r  r^   s    r)   Ú__len__zSpecifierSet.__len__  s   € å�4”;ÑÔÐr(   úIterator[Specifier]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  r^   s    r)   Ú__iter__zSpecifierSet.__iter__  s   € õ �D”KÑ Ô Ð r(   r´   c                ór   — | 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.
        Nc              3  ó>   K  — | ]}|                      ¦   «         V — Œd S r%   )r¹   r  s     r)   rò   z+SpecifierSet._get_ranges.<locals>.<genexpr>  s*   è è € Ð1VÐ1VÀQ°!·,²,±.´.Ð1VÐ1VÐ1VÐ1VÐ1VÐ1Vr(   )r˜   r   r  r^   s    r)   Ú_get_rangeszSpecifierSet._get_ranges  s<   € ð Œ<Ð#Ø”<Ðå1Ð1VÐ1VÈ$Ì+Ð1VÑ1VÔ1VÑVÔVˆŒØŒ|Ðr(   c                óø   — | j         }|�|S | j        s	d| _         dS |                      ¦   «          }|s|                      ¦   «         }|s*| j        du r!t          |                      ¦   «         ¦  «        }|| _         |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
        NF)r  r  r>  Ú_check_arbitrary_unsatisfiablerk   r   )r_   Úcachedr¸   s      r)   Úis_unsatisfiablezSpecifierSet.is_unsatisfiable  s—   € ð  Ô'ˆØÐØˆMàŒ{ð 	Ø%*ˆDÔ"Ø�5à×%Ò%Ñ'Ô'Ð'ˆàð 	;Ø×8Ò8Ñ:Ô:ˆFàð 	D˜$Ô*¨eÐ3Ð3Ý/°×0@Ò0@Ñ0BÔ0BÑCÔCˆFà!'ˆÔØˆr(   c                ó~  ‡‡— d„ | j         D ¦   «         }|sdS |d         j                             ¦   «         Št          ˆfd„|dd…         D ¦   «         ¦  «        rdS t	          |d         j        ¦  «        Š| j        du r‰�	‰j        rdS d„ | j         D ¦   «         }|sdS ‰€dS t          ˆfd	„|D ¦   «         ¦  «         S )
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.
        c                ó(   — g | ]}|j         d k    ¯|‘ŒS ©r£   ©r«   r  s     r)   r  z?SpecifierSet._check_arbitrary_unsatisfiable.<locals>.<listcomp>H  s$   € ÐCÐCÐC˜1¨q¬z¸UÒ/BÐ/B�QÐ/BÐ/BÐ/Br(   Fr   c              3  óR   •K  — | ]!}|j                              ¦   «         ‰k    V — Œ"d S r%   )r¬   rï   )rð   r  Úfirsts     €r)   rò   z>SpecifierSet._check_arbitrary_unsatisfiable.<locals>.<genexpr>N  s4   øè è € ÐAÐA¨aˆqŒy�ŠÑ Ô  EÒ)ÐAÐAÐAÐAÐAÐAr(   r
   NTc                ó(   — g | ]}|j         d k    ¯|‘ŒS rE  rF  r  s     r)   r  z?SpecifierSet._check_arbitrary_unsatisfiable.<locals>.<listcomp>^  s$   € ÐBÐBÐB˜!¨a¬j¸EÒ.AÐ.A�AÐ.AÐ.AÐ.Ar(   c              3  óB   •K  — | ]}|                      ‰¦  «        V — Œd S r%   râ   )rð   r  Ú	candidates     €r)   rò   z>SpecifierSet._check_arbitrary_unsatisfiable.<locals>.<genexpr>f  s/   øè è € Ð?Ð?°�q—z’z )Ñ,Ô,Ð?Ð?Ð?Ð?Ð?Ð?r(   )r  r¬   rï   r  r   rk   r»   r*  )r_   r¡   ÚstandardrK  rH  s      @@r)   r@  z+SpecifierSet._check_arbitrary_unsatisfiableA  s  øø€ ð DÐC ¤ÐCÑCÔCˆ	Øð 	Ø�5ð ˜!”Ô$×*Ò*Ñ,Ô,ˆÝÐAÐAÐAÐA°9¸Q¸R¸R´=ÐAÑAÔAÑAÔAð 	Ø�4õ # 9¨Q¤<Ô#7Ñ8Ô8ˆ	ð
 Ô Ð%Ð%ØÐ%ØÔ'ð &ð �4àBÐB˜tœ{ÐBÑBÔBˆØð 	Ø�5àÐà�4åÐ?Ð?Ð?Ð?°hÐ?Ñ?Ô?Ñ?Ô?Ð?Ð?r(   úranges.VersionRangec                ó8   — ddl m} |                     | ¦  «        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   rO  Ú_from_specifier_set)r_   rO  s     r)   Úto_rangezSpecifierSet.to_rangeh  s*   € ð 	)Ð(Ð(Ð(Ð(Ð(à×/Ò/°Ñ5Ô5Ð5r(   c                óˆ   — t          |t          ¦  «        st          d¦  «        ‚| j        s|j        rt	          d¦  «        ‚d S )Nzexpected a SpecifierSetz+set relations do not support === specifiers)r0   r!   rÅ   r  r4  rh   s     r)   Ú_check_relation_operandz$SpecifierSet._check_relation_operandw  sU   € Ý˜%¥Ñ.Ô.ð 	7ÝÐ5Ñ6Ô6Ð6ØÔð 	L %Ô"6ð 	LÝÐJÑKÔKÐKð	Lð 	Lr(   c                óž   — |                       |¦  «         |                      ¦   «                              |                     ¦   «         ¦  «        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
        )rS  rQ  Ú	is_subsetrh   s     r)   rU  zSpecifierSet.is_subset}  s>   € ð" 	×$Ò$ UÑ+Ô+Ð+Ø�}Š}‰Œ×(Ò(¨¯ªÑ)9Ô)9Ñ:Ô:Ð:r(   c                óž   — |                       |¦  «         |                      ¦   «                              |                     ¦   «         ¦  «        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
        )rS  rQ  Úis_supersetrh   s     r)   rW  zSpecifierSet.is_superset‘  s>   € ð 	×$Ò$ UÑ+Ô+Ð+Ø�}Š}‰Œ×*Ò*¨5¯>ª>Ñ+;Ô+;Ñ<Ô<Ð<r(   c                óž   — |                       |¦  «         |                      ¦   «                              |                     ¦   «         ¦  «        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
        )rS  rQ  Úis_disjointrh   s     r)   rY  zSpecifierSet.is_disjoint£  s>   € ð" 	×$Ò$ UÑ+Ô+Ð+Ø�}Š}‰Œ×*Ò*¨5¯>ª>Ñ+;Ô+;Ñ<Ô<Ð<r(   rp   ræ   c                ó,   — |                       |¦  «        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(   Ú	installedc                óô  — t          |¦  «        }|�|r	|j        rd}|�| j        rt          |t          ¦  «        s|}n|}|�†| j        s|j        €x| j        rq|j        r|du s|€| j        du rdS | j        }|€@| j        D ]}t          ||¦  «        }|€ n|s dS ŒdS |  
                    ¦   «         x}| _        t          ||¦  «        S t          t          |                      |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`.
        NTFrè   )r   r»   r  r0   r   rK   r  r—   r˜   rT   r>  r   r8   ré   ry   )	r_   rp   rk   r[  r¬   Ú
check_itemÚboundsr+   rê   s	            r)   rr   zSpecifierSet.containsÌ  sJ  € õP ! Ñ&Ô&ˆàÐ 9Ð°Ô1FÐØˆKð ˆ?˜tÔ2ˆ?½:ÀdÍGÑ;TÔ;Tˆ?ØˆJˆJà ˆJð ÐØÔ'ð  à”Ð%Ø”ð &ð Ô$ð Ø˜uÐ$Ð$ØÐ'¨DÔ,=ÀÐ,FÐ,Fà�uà”\ˆFØˆ~ð
 !œKð  ð  �DÝ'¨¨gÑ6Ô6�EØ�}Ø˜Ø ð %Ø$˜u˜uð%ð  ˜4à(,×(8Ò(8Ñ(:Ô(:Ð:�˜œå& v¨wÑ7Ô7Ð7å•D˜Ÿš j \¸{˜ÑKÔKÑLÔLÑMÔMÐMr(   .rs   rt   ru   rv   c                ó   — d S r%   r'   rx   s       r)   ry   zSpecifierSet.filter$  rz   r(   r{   r|   r}   c                ó   — d S r%   r'   rx   s       r)   ry   zSpecifierSet.filter,  r   r(   r€   r�   r‚   c                ó  ‡‡— |€| j         �| j         }| j        r]| j        r'| j        Šˆˆfd„|D ¦   «         }t          |‰|¦  «        S | 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.
        Nc              3  óV   •‡K  — | ]"Št          ˆˆfd „‰D ¦   «         ¦  «        ¯‰V — Œ#dS )c              3  ó`   •K  — | ](}|                      ‰€‰n
 ‰‰¦  «        d¬¦  «        V — Œ)d S )NTrè   râ   )rð   r  rp   ru   s     €€r)   rò   z0SpecifierSet.filter.<locals>.<genexpr>.<genexpr>z  sX   øè è € ð ð àð Ÿ
š
¨3¨; 4 4¸C¸CÀ¹I¼IÐSW˜
ÑXÔXðð ð ð ð ð r(   N)r*  )rð   rp   ru   r,  s    @€€r)   rò   z&SpecifierSet.filter.<locals>.<genexpr>w  ss   øøè è € ð ð àÝð ð ð ð ð à!&ðñ ô ñ ô ðØðð ð ð ð ð r(   )rk   r  r  ró   r˜   r>  r   )r_   rs   rk   ru   rô   r   r,  s      `  @r)   ry   zSpecifierSet.filter4  sÁ   øø€ ðx Ð 4Ô#3Ð#?ØÔ*ˆKàŒ;ð 	HØÔ"ð Làœ�ðð ð ð ð à (ðñ ô �õ 1°¸#¸{ÑKÔKÐKà”\ˆFØˆ~Ø×)Ò)Ñ+Ô+�Ý# F¨H°c¸;ÑGÔGÐGõ )¨°3¸ÑDÔDÐDr(   rõ   )r  r	  rk   rD   r"   rm   )r"   r  r‡   r÷   )r"   r  rø   r„   r…   )rf   r2  r"   r!   r†   )r"   r9  rö   )r"   r8   )r"   rM  )rf   r,   r"   rm   )rf   r!   r"   r8   )rp   ræ   r"   r8   r‹   )rp   ræ   rk   rD   r[  rD   r"   r8   rˆ   r‰   rŠ   rŒ   ) rV   rW   rX   rY   r�   r­   r  r�   rk   r’   rÀ   rÈ   rÔ   ra   re   r5  ri   r8  r;  r>  rB  r@  rQ  rS  rU  rW  rY  rä   rr   r“   r”   ry   r'   r(   r)   r!   r!   þ  sÜ  € € € € € ðð ð$€Ið 13Ø#'ð*(ð *(ð *(ð *(ð *(ðXð ð ð ð ðð ð ñ „Xðð& Ôð&ð &ð &ñ Ôð&ð0ð 0ð 0ð 0ð7Gð 7Gð 7Gð 7GðrBð Bð Bð Bð*Að Að Að Að-ð -ð -ð -ðð ð ð ð@Cð Cð Cð Cð4 ð  ð  ð  ð!ð !ð !ð !ð
ð 
ð 
ð 
ð!ð !ð !ð !ðF%@ð %@ð %@ð %@ðN6ð 6ð 6ð 6ðLð Lð Lð Lð;ð ;ð ;ð ;ð(=ð =ð =ð =ð$=ð =ð =ð =ð(#ð #ð #ð #ð0 $(Ø!%ð	VNð VNð VNð VNð VNðp „_ð $(Øð	+ð +ð +ð +ñ „_ð+ð „_ð $(Ø.1ð	ð ð ð ñ „_ðð $(Ø7;ð	SEð SEð SEð SEð SEð SEð SEr(   r!   rs   c              #  ó6  K  — g }g }d}| D ]�}t          |€|n
 ||¦  «        ¦  «        }|€2|r|V — n*|                     |¦  «         |                     |¦  «         ŒR|j        s|s
|E d{V —† d}|V — Œj|s|                     |¦  «         Œ‚|s
|E d{V —† dS dS )z?Filter per PEP 440: exclude prereleases unless no finals exist.FNT)r   Úappendr»   )rs   ru   Úall_nonfinalÚarbitrary_stringsÚfound_finalrp   rC   s          r)   r  r  Š  s  è è € ð !€LØ#%Ðà€KØð &ð &ˆÝ¨¨  ¸¸¸T¹¼ÑCÔCˆàˆ>ð ð *Ø�
�
�
�
à!×(Ò(¨Ñ.Ô.Ð.Ø×#Ò# DÑ)Ô)Ð)ØàÔ#ð 	àð #Ø,Ð,Ð,Ð,Ð,Ð,Ð,Ð,Ø"�ØˆJˆJˆJØð ð 	&Ø×Ò Ñ%Ô%Ð%øð ð  ØÐÐÐÐÐÐÐÐÐð ð  r(   )r"   r#   )r+   r,   r"   r-   )r5   r,   r"   r6   )rB   r    rC   r   r"   rD   )rô   r€   ru   r�   rk   rD   r"   r‚   )rs   r€   ru   r�   r"   r‚   )<rY   Ú
__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*   r4   r9   r:   r3   ræ   r;   Ú__ge__Ú__le__ri   Ú__ne__rA   rþ   rT   r4  r   ÚABCMetar   r    ró   r!   r  r'   r(   r)   ú<module>rs     s‰  ððð ð ð #Ð "Ð "Ð "Ð "Ð "à 
€
€
€
Ø 	€	€	€	Ø €€€ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð (Ð 'Ð 'Ð 'Ð 'Ð 'Ø Ð Ð Ð Ð Ð àð 
"Ø€J€J€JØ<Ð<Ð<Ð<Ð<Ð<Ð<Ð<Ð<Ð<à
Ô˜7Ò"Ð"Ø$Ð$Ð$Ð$Ð$Ð$Ð$à/Ð/Ð/Ð/Ð/Ð/àÐÐÐÐÐØ!Ð!Ð!Ð!Ð!Ð!ðð ð €ðð ð ð ðð ð ð ð0ð 0ð 0ð 0ð €GˆC�L„L€Ø˜ ˜Ô%€Ø�WÐ1¸ÐIÑIÔIÐ ð Œ.Ø
Œ.Ø
Œ.Ø
Œ.ð	Fð FÐ ð ð ð ñ ðð ð ð ð:	ð 	ð 	ð 	ð 	�zñ 	ô 	ð 	ðSð Sð Sð Sð S˜cœkð Sñ Sô Sð SðlIOð IOð IOð IOð IO�ñ IOô IOð IOðXð ð ð ð,I
Eð I
Eð I
Eð I
Eð I
E�=ñ I
Eô I
Eð I
EðX' ð ' ð ' ð ' ð ' ð ' r(   