§
    ÇÁ³gŠœ  ã                  ól  — 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 ddlmZ ddlmZ eeef         Z e
de¬	¦  «        Zeeegef         Zd%d„Z G d„ de¦  «        Z G d„ dej        ¬¦  «        Z G d„ de¦  «        Z ej        d¦  «        Zd&d„Zd'd„Zd(d„Zd)d"„Z  G d#„ d$e¦  «        Z!dS )*zŠ
.. testsetup::

    from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier
    from packaging.version import Version
é    )ÚannotationsN)ÚCallableÚIterableÚIteratorÚTypeVarÚUnioné   )Úcanonicalize_version)ÚVersionÚUnparsedVersionVar)ÚboundÚversionÚUnparsedVersionÚreturnr   c                óN   — t          | t          ¦  «        st          | ¦  «        } | S ©N)Ú
isinstancer   )r   s    úR/var/www/html/mpstechhub/venv/lib/python3.11/site-packages/packaging/specifiers.pyÚ_coerce_versionr      s&   € Ý�g�wÑ'Ô'ð #Ý˜'Ñ"Ô"ˆØ€Nó    c                  ó   — e Zd ZdZdS )ÚInvalidSpecifiera  
    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       s   € € € € € ðð ð ð r   r   c                  ó  — e Z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dS )ÚBaseSpecifierr   Ústrc                ó   — dS )zŽ
        Returns the str representation of this Specifier-like object. This
        should be representative of the Specifier itself.
        Nr   ©Úselfs    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__4   r%   r   ÚotherÚobjectÚboolc                ó   — 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#   r)   s     r   Ú__eq__zBaseSpecifier.__eq__:   r%   r   úbool | Nonec                ó   — 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.prereleasesC   r%   r   ÚvalueÚNonec                ó   — dS )zQSetter for :attr:`prereleases`.

        :param value: The value to set.
        Nr   ©r#   r2   s     r   r1   zBaseSpecifier.prereleasesL   r%   r   NÚitemr1   c                ó   — dS )zR
        Determines if the given item is contained within this specifier.
        Nr   )r#   r6   r1   s      r   ÚcontainszBaseSpecifier.containsS   r%   r   ÚiterableúIterable[UnparsedVersionVar]úIterator[UnparsedVersionVar]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   )r#   r9   r1   s      r   ÚfilterzBaseSpecifier.filterY   r%   r   ©r   r    ©r   r&   ©r)   r*   r   r+   ©r   r/   ©r2   r+   r   r3   r   )r6   r    r1   r/   r   r+   ©r9   r:   r1   r/   r   r;   )r   r   r   ÚabcÚabstractmethodr$   r(   r.   Úpropertyr1   Úsetterr8   r=   r   r   r   r   r   ,   s%  € € € € € ØÔðð ð ñ Ôðð 	Ôðð ð ñ Ôðð
 	Ôðð ð ñ Ôðð ØÔðð ð ñ Ôñ „Xðð Ôðð ð ñ Ôðð 	Ôðð ð ð ñ Ôðð
 	ÔàQUðð ð ð ñ Ôðð ð r   r   )Ú	metaclassc            	      ó�  — e Zd ZdZdZdZ ej        dez   ez   dz   ej        ej	        z  ¦  «        Z
dddd	d
ddddœZd>d?d„Zed@d„¦   «         Zej        dAd„¦   «         ZedBd„¦   «         ZedBd„¦   «         ZdBd„ZdBd„ZedCd!„¦   «         ZdDd#„ZdEd&„ZdFd)„ZdGd,„ZdGd-„ZdGd.„ZdGd/„ZdGd0„ZdHd2„ZdHd3„ZdGd4„ZdId7„Z dJdKd9„Z!	 dJdLd=„Z"dS )MÚ	Specifiera?  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).
    z8
        (?P<operator>(~=|==|!=|<=|>=|<|>|===))
        aÈ  
        (?P<version>
            (?:
                # 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 .*
                    |
                    (?:                                  # 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
                    (?:\+[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.
                (?<!==|!=|~=)         # We have special cases for these
                                      # operators so we want to make sure they
                                      # don't match here.

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # 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
            )
        )
        z^\s*z\s*$Ú
compatibleÚequalÚ	not_equalÚless_than_equalÚgreater_than_equalÚ	less_thanÚgreater_thanÚ	arbitrary)ú~=ú==z!=ú<=ú>=ú<ú>ú===Ú NÚspecr    r1   r/   r   r3   c                ó  — | j                              |¦  «        }|st          d|›�¦  «        ‚|                     d¦  «                             ¦   «         |                     d¦  «                             ¦   «         f| _        || _        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: Úoperatorr   N)Ú_regexÚsearchr   ÚgroupÚstripÚ_specÚ_prereleases)r#   r[   r1   Úmatchs       r   Ú__init__zSpecifier.__init__Þ   sŠ   € ð ”×"Ò" 4Ñ(Ô(ˆØð 	CÝ"Ð#A¸Ð#AÐ#AÑBÔBÐBð �KŠK˜
Ñ#Ô#×)Ò)Ñ+Ô+Ø�KŠK˜	Ñ"Ô"×(Ò(Ñ*Ô*ð'
ˆŒ
ð (ˆÔÐÐr   r+   c                ó´   — | j         �| j         S | j        \  }}|dv r;|dk    r|                     d¦  «        r
|d d…         }t          |¦  «        j        rdS dS )N)rT   rV   rU   rS   rY   rX   rW   rT   ú.*éþÿÿÿTF)rc   rb   Úendswithr   Úis_prerelease)r#   r]   r   s      r   r1   zSpecifier.prereleasesø   s|   € ð ÔÐ(ØÔ$Ð$ð
 !œJÑˆ�'ØÐ@Ð@Ð@ð ˜4ÒÐ G×$4Ò$4°TÑ$:Ô$:ÐØ! # 2 #œ,�õ �wÑÔÔ-ð Ø�tàˆur   r2   c                ó   — || _         d S r   ©rc   r5   s     r   r1   zSpecifier.prereleases  ó   € à!ˆÔÐÐr   c                ó   — | j         d         S )z`The operator of this specifier.

        >>> Specifier("==1.2.3").operator
        '=='
        r   ©rb   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	   ro   r"   s    r   r   zSpecifier.version  rp   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=rZ   rW   ú(ú)>)rc   r1   Ú	__class__r   r    ©r#   Úpres     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{}{})Úformatrb   r"   s    r   r$   zSpecifier.__str__8  s   € ð ˆvŒ}˜dœjÐ)Ð)r   útuple[str, str]c                óv   — t          | j        d         | j        d         dk    ¬¦  «        }| j        d         |fS )Nr	   r   rS   ©Ústrip_trailing_zero)r
   rb   )r#   Úcanonical_versions     r   Ú_canonical_speczSpecifier._canonical_specB  sB   € å0ØŒJ�qŒMØ!%¤¨A¤°$Ò!6ð
ñ 
ô 
Ðð Œz˜!Œ}Ð/Ð/Ð/r   r&   c                ó*   — t          | j        ¦  «        S r   )Úhashr�   r"   s    r   r(   zSpecifier.__hash__J  s   € Ý�DÔ(Ñ)Ô)Ð)r   r)   r*   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
        )r   r    rv   r   ÚNotImplementedr�   r-   s     r   r.   zSpecifier.__eq__M  s†   € õ& �e�SÑ!Ô!ð 	"ð&ØŸš¥s¨5¡z¤zÑ2Ô2��øÝ#ð &ð &ð &Ý%Ð%Ð%Ð%ð&øøøå˜E 4¤>Ñ2Ô2ð 	"Ý!Ð!àÔ# uÔ'<Ò<Ð<s   —": ºAÁAÚopÚCallableOperatorc                óB   — t          | d| j        |         › �¦  «        }|S )NÚ	_compare_)ÚgetattrÚ
_operators)r#   r†   Úoperator_callables      r   Ú_get_operatorzSpecifier._get_operatorj  s/   € Ý.5ØÐ3˜dœo¨bÔ1Ð3Ð3ñ/
ô /
Ðð !Ð r   Úprospectiver   c           
     ó  — t          t          t          j        t          t          |¦  «        ¦  «        ¦  «        d d…         ¦  «        }|dz  } |                      d¦  «        ||¦  «        o |                      d¦  «        ||¦  «        S )Néÿÿÿÿrg   rV   rT   )Ú_version_joinÚlistÚ	itertoolsÚ	takewhileÚ_is_not_suffixÚ_version_splitr�   )r#   rŽ   r[   Úprefixs       r   Ú_compare_compatiblezSpecifier._compare_compatiblep  s“   € õ Ý•Ô$¥^µ^ÀDÑ5IÔ5IÑJÔJÑKÔKÈCÈRÈCÔPñ
ô 
ˆð
 	�$‰ˆà'ˆt×!Ò! $Ñ'Ô'¨°TÑ:Ô:ð 
Ð?W¸t×?QÒ?QÐRVÑ?WÔ?WØ˜ñ@
ô @
ð 	
r   c                ó†  — |                      d¦  «        r}t          |j        d¬¦  «        }t          |d d…         d¬¦  «        }t          |¦  «        }t          |¦  «        }t	          ||¦  «        \  }}|d t          |¦  «        …         }	|	|k    S t          |¦  «        }
|
j        st          |j        ¦  «        }||
k    S )Nrg   Fr~   rh   )ri   r
   Úpublicr–   Ú_pad_versionÚlenr   Úlocal)r#   rŽ   r[   Únormalized_prospectiveÚnormalized_specÚ
split_specÚsplit_prospectiveÚpadded_prospectiveÚ_Úshortened_prospectiveÚspec_versions              r   Ú_compare_equalzSpecifier._compare_equal„  sá   € à�=Š=˜ÑÔð $	/å%9ØÔ"¸ð&ñ &ô &Ð"õ 3°4¸¸¸´9ÐRWÐXÑXÔXˆOõ (¨Ñ8Ô8ˆJõ
 !/Ð/EÑ FÔ FÐõ %1Ð1BÀJÑ$OÔ$OÑ!Ð ð
 %7Ð7H½¸Z¹¼Ð7HÔ$IÐ!à(¨JÒ6Ð6õ # 4™=œ=ˆLð
  Ô%ð :Ý% kÔ&8Ñ9Ô9�à ,Ò.Ð.r   c                ó0   — |                       ||¦  «         S r   )r¦   ©r#   rŽ   r[   s      r   Ú_compare_not_equalzSpecifier._compare_not_equal¬  s   € Ø×&Ò& {°DÑ9Ô9Ð9Ð9r   c                óL   — t          |j        ¦  «        t          |¦  «        k    S r   ©r   rš   r¨   s      r   Ú_compare_less_than_equalz"Specifier._compare_less_than_equal¯  ó    € õ �{Ô)Ñ*Ô*­g°d©m¬mÒ;Ð;r   c                óL   — t          |j        ¦  «        t          |¦  «        k    S r   r«   r¨   s      r   Ú_compare_greater_than_equalz%Specifier._compare_greater_than_equalµ  r­   r   Úspec_strc                ó¨   — t          |¦  «        }||k     sdS |j        s3|j        r,t          |j        ¦  «        t          |j        ¦  «        k    rdS dS ©NFT)r   rj   Úbase_version©r#   rŽ   r°   r[   s       r   Ú_compare_less_thanzSpecifier._compare_less_than»  sg   € õ �xÑ Ô ˆð
 ˜TÒ!Ð!Ø�5ð Ô!ð 	 kÔ&?ð 	Ý�{Ô/Ñ0Ô0µG¸DÔ<MÑ4NÔ4NÒNÐNØ�uð
 ˆtr   c                ó  — t          |¦  «        }||k    sdS |j        s3|j        r,t          |j        ¦  «        t          |j        ¦  «        k    rdS |j        �,t          |j        ¦  «        t          |j        ¦  «        k    rdS dS r²   )r   Úis_postreleaser³   r�   r´   s       r   Ú_compare_greater_thanzSpecifier._compare_greater_thanÓ  s˜   € õ �xÑ Ô ˆð
 ˜TÒ!Ð!Ø�5ð Ô"ð 	 {Ô'Að 	Ý�{Ô/Ñ0Ô0µG¸DÔ<MÑ4NÔ4NÒNÐNØ�uð ÔÐ(Ý�{Ô/Ñ0Ô0µG¸DÔ<MÑ4NÔ4NÒNÐNØ�uð
 ˆtr   c                óŠ   — t          |¦  «                             ¦   «         t          |¦  «                             ¦   «         k    S r   )r    Úlowerr¨   s      r   Ú_compare_arbitraryzSpecifier._compare_arbitraryñ  s1   € Ý�;ÑÔ×%Ò%Ñ'Ô'­3¨t©9¬9¯?ª?Ñ+<Ô+<Ò<Ð<r   r6   ú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")
        False
        >>> "1.3.0a1" in Specifier(">=1.2.3", prereleases=True)
        True
        ©r8   ©r#   r6   s     r   Ú__contains__zSpecifier.__contains__ô  ó   € ð& �}Š}˜TÑ"Ô"Ð"r   r   c                óž   — |€| j         }t          |¦  «        }|j        r|sdS |                      | j        ¦  «        } ||| j        ¦  «        S )al  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:`Version` instance.
        :param prereleases:
            Whether or not to match prereleases with this Specifier. If set to
            ``None`` (the default), it uses :attr:`prereleases` to determine
            whether or not prereleases are allowed.

        >>> 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")
        False
        >>> Specifier(">=1.2.3", prereleases=True).contains("1.3.0a1")
        True
        >>> Specifier(">=1.2.3").contains("1.3.0a1", prereleases=True)
        True
        NF)r1   r   rj   r�   r]   r   )r#   r6   r1   Únormalized_itemrŒ   s        r   r8   zSpecifier.contains	  sg   € ð4 ÐØÔ*ˆKõ *¨$Ñ/Ô/ˆð
 Ô(ð 	°ð 	Ø�5ð /3×.@Ò.@ÀÄÑ.OÔ.OÐØ Ð  °$´,Ñ?Ô?Ð?r   r9   r:   r;   c              #  óà   K  — d}g }d|�|ndi}|D ]K}t          |¦  «        } | j        |fi |¤Žr,|j        r|s| j        s|                     |¦  «         ŒEd}|V — ŒL|s|r|D ]
}|V — ŒdS dS dS )aO  Filter items in the given iterable, that match the specifier.

        :param iterable:
            An iterable that can contain version strings and :class:`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 be intelligently decide whether to allow
            prereleases or not (based on the :attr:`prereleases` attribute, and
            whether the only versions matching are prereleases).

        This method is smarter than just ``filter(Specifier().contains, [...])``
        because it implements the rule from :pep:`440` that a prerelease item
        SHOULD be accepted if no other versions match the given specifier.

        >>> 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']
        Fr1   NT)r   r8   rj   r1   Úappend)r#   r9   r1   ÚyieldedÚfound_prereleasesÚkwr   Úparsed_versions           r   r=   zSpecifier.filter5  sô   è è € ð< ˆØÐà¨KÐ,C˜[˜[ÈÐNˆð  ð 	"ð 	"ˆGÝ,¨WÑ5Ô5ˆNàˆtŒ}˜^Ð2Ð2¨rÐ2Ð2ð "ð "Ô/ð "Øð"Ø#'Ô#3ð"ð &×,Ò,¨WÑ5Ô5Ð5Ð5ð #�GØ!�M�M�Møð
 ð 	Ð,ð 	Ø,ð ð �Ø����ð	ð 	ð 	ð 	ðð r   ©rZ   N)r[   r    r1   r/   r   r3   )r   r+   rB   r>   )r   r|   r?   r@   )r†   r    r   r‡   )rŽ   r   r[   r    r   r+   )rŽ   r   r°   r    r   r+   )r6   r¼   r   r+   r   )r6   r   r1   r/   r   r+   rC   )#r   r   r   r   Ú_operator_regex_strÚ_version_regex_strÚreÚcompileÚVERBOSEÚ
IGNORECASEr^   r‹   re   rF   r1   rG   r]   r   ry   r$   r�   r(   r.   r�   r˜   r¦   r©   r¬   r¯   rµ   r¸   r»   rÀ   r8   r=   r   r   r   rJ   rJ   c   s¤  € € € € € ðð ðÐð\Ðð| ˆRŒZØÐ%Ñ%Ð(:Ñ:¸WÑDØ
Œ
�R”]Ñ"ñô €Fð ØØØØ"ØØØð	ð 	€Jð(ð (ð (ð (ð (ð4 ðð ð ñ „Xðð. Ôð"ð "ð "ñ Ôð"ð ðð ð ñ „Xðð ðð ð ñ „XððBð Bð Bð Bð$*ð *ð *ð *ð ð0ð 0ð 0ñ „Xð0ð*ð *ð *ð *ð=ð =ð =ð =ð:!ð !ð !ð !ð
ð 
ð 
ð 
ð(&/ð &/ð &/ð &/ðP:ð :ð :ð :ð<ð <ð <ð <ð<ð <ð <ð <ðð ð ð ð0ð ð ð ð<=ð =ð =ð =ð#ð #ð #ð #ð**@ð *@ð *@ð *@ð *@ðZ RVð;ð ;ð ;ð ;ð ;ð ;ð ;r   rJ   z^([0-9]+)((?:a|b|c|rc)[0-9]+)$r    ú	list[str]c                óL  — g }|                       d¦  «        \  }}}|                     |pd¦  «         |                     d¦  «        D ][}t                               |¦  «        }|r(|                     |                     ¦   «         ¦  «         ŒF|                     |¦  «         Œ\|S )a  Split version into components.

    The split components are intended for version comparison. The logic does
    not attempt to retain the original version string, so joining the
    components back with :func:`_version_join` may not produce the original
    version string.
    ú!Ú0ú.)Ú
rpartitionrÅ   ÚsplitÚ_prefix_regexr_   ÚextendÚgroups)r   ÚresultÚepochr£   Úrestr6   rd   s          r   r–   r–   v  s£   € ð €Fà×'Ò'¨Ñ,Ô,�N€Eˆ1ˆdØ
‡M‚M�%�,˜3ÑÔÐà—
’
˜3‘”ð  ð  ˆÝ×$Ò$ TÑ*Ô*ˆØð 	 Ø�MŠM˜%Ÿ,š,™.œ.Ñ)Ô)Ð)Ð)à�MŠM˜$ÑÔÐÐØ€Mr   Ú
componentsc                ó>   — | ^}}|› dd                      |¦  «        › �S )zñJoin split version components into a version string.

    This function assumes the input came from :func:`_version_split`, where the
    first component must be the epoch (either empty or numeric), and all other
    components numeric.
    rÓ   rÕ   )Újoin)rÞ   rÜ   rÝ   s      r   r‘   r‘   Œ  s+   € ð €L€EˆDØÐ&Ð&�c—h’h˜t‘n”nÐ&Ð&Ð&r   Úsegmentr+   c                ó<   ‡ — t          ˆ fd„dD ¦   «         ¦  «         S )Nc              3  óB   •K  — | ]}‰                      |¦  «        V — Œd S r   )Ú
startswith)Ú.0r—   rá   s     €r   ú	<genexpr>z!_is_not_suffix.<locals>.<genexpr>˜  sB   øè è € ð ð Ø'-ˆ×Ò˜6Ñ"Ô"ðð ð ð ð ð r   )ÚdevÚaÚbÚrcÚpost)Úany)rá   s   `r   r•   r•   —  s@   ø€ Ýð ð ð ð Ø1Pðñ ô ñ ô ð ð r   ÚleftÚrightútuple[list[str], list[str]]c                ó–  — g g }}|                      t          t          j        d„ | ¦  «        ¦  «        ¦  «         |                      t          t          j        d„ |¦  «        ¦  «        ¦  «         |                      | t	          |d         ¦  «        d …         ¦  «         |                      |t	          |d         ¦  «        d …         ¦  «         |                     ddgt          dt	          |d         ¦  «        t	          |d         ¦  «        z
  ¦  «        z  ¦  «         |                     ddgt          dt	          |d         ¦  «        t	          |d         ¦  «        z
  ¦  «        z  ¦  «         t          t          j                             |¦  «        ¦  «        t          t          j                             |¦  «        ¦  «        fS )Nc                ó*   — |                       ¦   «         S r   ©Úisdigit©Úxs    r   ú<lambda>z_pad_version.<locals>.<lambda>¡  s   € ¸¿º¹¼€ r   c                ó*   — |                       ¦   «         S r   rò   rô   s    r   rö   z_pad_version.<locals>.<lambda>¢  s   € ¸!¿)º)¹+¼+€ r   r   r	   rÔ   )	rÅ   r’   r“   r”   rœ   ÚinsertÚmaxÚchainÚfrom_iterable)rí   rî   Ú
left_splitÚright_splits       r   r›   r›   �  s‹  € Ø  "�€Jð ×Ò•d�9Ô.Ð/DÐ/DÀdÑKÔKÑLÔLÑMÔMÐMØ×Ò•t�IÔ/Ð0EÐ0EÀuÑMÔMÑNÔNÑOÔOÐOð ×Ò�d�3˜z¨!œ}Ñ-Ô-Ð/Ð/Ô0Ñ1Ô1Ð1Ø×Ò�u�S ¨Q¤Ñ0Ô0Ð2Ð2Ô3Ñ4Ô4Ð4ð ×Ò�a˜#˜¥ Q­¨K¸¬NÑ(;Ô(;½cÀ*ÈQÄ-Ñ>PÔ>PÑ(PÑ!QÔ!QÑQÑRÔRÐRØ×Ò�q˜3˜%¥# a­¨Z¸¬]Ñ);Ô);½cÀ+ÈaÄ.Ñ>QÔ>QÑ)QÑ"RÔ"RÑRÑSÔSÐSõ 	�YŒ_×*Ò*¨:Ñ6Ô6Ñ7Ô7Ý�YŒ_×*Ò*¨;Ñ7Ô7Ñ8Ô8ðð r   c                  ó´   — e Zd ZdZ	 	 d%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/d0d „Z	 d1d2d$„ZdS )3ÚSpecifierSetzÌ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.
    rZ   NÚ
specifiersústr | Iterable[Specifier]r1   r/   r   r3   c                óô   — t          |t          ¦  «        rGd„ |                     d¦  «        D ¦   «         }t          t	          t
          |¦  «        ¦  «        | _        nt          |¦  «        | _        || _        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   )ra   ©rå   Úss     r   ú
<listcomp>z)SpecifierSet.__init__.<locals>.<listcomp>Ò  s-   € ÐVÐVÐV¨aÈAÏGÊGÉIÌIÐV §¢¡	¤	ÐVÐVÐVr   ú,N)r   r    r×   Ú	frozensetÚmaprJ   Ú_specsrc   )r#   r   r1   Úsplit_specifierss       r   re   zSpecifierSet.__init__¹  sz   € õ, �j¥#Ñ&Ô&ð 
	0ð  WÐV°:×3CÒ3CÀCÑ3HÔ3HÐVÑVÔVÐõ $¥C­	Ð3CÑ$DÔ$DÑEÔEˆDŒKˆKõ $ JÑ/Ô/ˆDŒKð (ˆÔÐÐr   c                ól   — | j         �| j         S | j        sd S t          d„ | j        D ¦   «         ¦  «        S )Nc              3  ó$   K  — | ]}|j         V — Œd S r   ©r1   r  s     r   ræ   z+SpecifierSet.prereleases.<locals>.<genexpr>î  s$   è è € Ð6Ð6 Q�1”=Ð6Ð6Ð6Ð6Ð6Ð6r   )rc   r
  rì   r"   s    r   r1   zSpecifierSet.prereleasesß  sH   € ð ÔÐ(ØÔ$Ð$ð
 Œ{ð 	Ø�4õ Ð6Ð6¨$¬+Ð6Ñ6Ô6Ñ6Ô6Ð6r   r2   r+   c                ó   — || _         d S r   rl   r5   s     r   r1   zSpecifierSet.prereleasesð  rm   r   r    c                óR   — | j         �
d| j        ›�nd}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)>
        Nrs   rZ   z<SpecifierSet(ru   )rc   r1   r    rw   s     r   ry   zSpecifierSet.__repr__ô  sF   € ð Ô Ð,ð 2˜TÔ-Ð1Ð1Ð1àð 	ð 5¥ D¡	¤	Ð4¨SÐ4Ð4Ð4Ð4r   c                ód   — d                      t          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  ó4   K  — | ]}t          |¦  «        V — Œd S r   )r    r  s     r   ræ   z'SpecifierSet.__str__.<locals>.<genexpr>  s(   è è € Ð;Ð;¨!�s 1™vœvÐ;Ð;Ð;Ð;Ð;Ð;r   )rà   Úsortedr
  r"   s    r   r$   zSpecifierSet.__str__	  s/   € ð �xŠx�Ð;Ð;¨t¬{Ð;Ñ;Ô;Ñ;Ô;Ñ<Ô<Ð<r   r&   c                ó*   — t          | j        ¦  «        S r   )rƒ   r
  r"   s    r   r(   zSpecifierSet.__hash__  s   € Ý�D”KÑ Ô Ð r   r)   úSpecifierSet | strc                óª  — t          |t          ¦  «        rt          |¦  «        }nt          |t          ¦  «        st          S t          ¦   «         }t	          | j        |j        z  ¦  «        |_        | j        €|j        �|j        |_        nG| j        �|j        €| j        |_        n,| j        |j        k    r| 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')>
        NzFCannot combine SpecifierSets with True and False prerelease overrides.)r   r    rÿ   r…   r  r
  rc   Ú
ValueError)r#   r)   Ú	specifiers      r   Ú__and__zSpecifierSet.__and__  sÛ   € õ �e�SÑ!Ô!ð 	"Ý  Ñ'Ô'ˆEˆEÝ˜E¥<Ñ0Ô0ð 	"Ý!Ð!å ‘N”Nˆ	Ý$ T¤[°5´<Ñ%?Ñ@Ô@ˆ	ÔàÔÐ$¨Ô);Ð)GØ%*Ô%7ˆIÔ"Ð"ØÔÐ*¨uÔ/AÐ/IØ%)Ô%6ˆIÔ"Ð"ØÔ %Ô"4Ò4Ð4Ø%)Ô%6ˆIÔ"Ð"åðñô ð ð
 Ðr   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    rJ   rÿ   r…   r
  r-   s     r   r.   zSpecifierSet.__eq__9  sW   € õ& �e�c¥9Ð-Ñ.Ô.ð 	"Ý ¥ U¡¤Ñ,Ô,ˆEˆEÝ˜E¥<Ñ0Ô0ð 	"Ý!Ð!àŒ{˜eœlÒ*Ð*r   c                ó*   — t          | j        ¦  «        S )z7Returns the number of specifiers in this specifier set.)rœ   r
  r"   s    r   Ú__len__zSpecifierSet.__len__S  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')>]
        )Úiterr
  r"   s    r   Ú__iter__zSpecifierSet.__iter__W  s   € õ �D”KÑ Ô Ð r   r6   r   c                ó,   — |                       |¦  «        S )ar  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")
        False
        >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True)
        True
        r¾   r¿   s     r   rÀ   zSpecifierSet.__contains__a  rÁ   r   Ú	installedc                óò   ‡‡— t          ‰t          ¦  «        st          ‰¦  «        Š‰€| j        Š‰s	‰j        rdS |r‰j        rt          ‰j        ¦  «        Št          ˆˆfd„| j        D ¦   «         ¦  «        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:`Version` instance.
        :param prereleases:
            Whether or not to match prereleases with this SpecifierSet. If set to
            ``None`` (the default), it uses :attr:`prereleases` to determine
            whether or not prereleases are allowed.

        >>> 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")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True).contains("1.3.0a1")
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1", prereleases=True)
        True
        NFc              3  óF   •K  — | ]}|                      ‰‰¬ ¦  «        V — ŒdS )r  Nr¾   )rå   r  r6   r1   s     €€r   ræ   z(SpecifierSet.contains.<locals>.<genexpr>­  s3   øè è € ÐRÐRÀ�1—:’:˜d°�:Ñ<Ô<ÐRÐRÐRÐRÐRÐRr   )r   r   r1   rj   r³   Úallr
  )r#   r6   r1   r"  s    `` r   r8   zSpecifierSet.containsv  s˜   øø€ õ< ˜$¥Ñ(Ô(ð 	!Ý˜4‘=”=ˆDð
 ÐØÔ*ˆKð ð 	˜tÔ1ð 	Ø�5àð 	.˜Ô+ð 	.Ý˜4Ô,Ñ-Ô-ˆDõ ÐRÐRÐRÐRÐRÀdÄkÐRÑRÔRÑRÔRÐRr   r9   r:   r;   c                ó€  — |€| j         }| j        r=| j        D ]&}|                     |t          |¦  «        ¬¦  «        }Œ't	          |¦  «        S g }g }|D ]G}t          |¦  «        }|j        r|s|s|                     |¦  «         Œ2|                     |¦  «         ŒH|s|r|€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:`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 be intelligently decide whether to allow
            prereleases or not (based on the :attr:`prereleases` attribute, and
            whether the only versions matching are prereleases).

        This method is smarter than just ``filter(SpecifierSet(...).contains, [...])``
        because it implements the rule from :pep:`440` that a prerelease item
        SHOULD be accepted if no other versions match the given specifier.

        >>> 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"]))
        []
        >>> 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']

        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']
        Nr  )r1   r
  r=   r+   r  r   rj   rÅ   )r#   r9   r1   r[   ÚfilteredrÇ   r6   rÉ   s           r   r=   zSpecifierSet.filter¯  sþ   € ðX ÐØÔ*ˆKð
 Œ;ð 	"Øœð Pð P�ØŸ;š; x½TÀ+Ñ=NÔ=N˜;ÑOÔO��Ý˜‘>”>Ð!ð
 24ˆHØ:<Ðà ð 	*ð 	*�Ý!0°Ñ!6Ô!6�ð "Ô/ð *¸ð *Ø#ð 7Ø)×0Ò0°Ñ6Ô6Ð6øà—O’O DÑ)Ô)Ð)Ð)ð ð /Ð 1ð /°kÐ6IÝÐ-Ñ.Ô.Ð.å˜‘>”>Ð!r   rÊ   )r   r  r1   r/   r   r3   rA   rB   r>   r?   )r)   r  r   rÿ   r@   )r   r  )r6   r   r   r+   )NN)r6   r   r1   r/   r"  r/   r   r+   r   rC   )r   r   r   r   re   rF   r1   rG   ry   r$   r(   r  r.   r  r   rÀ   r8   r=   r   r   r   rÿ   rÿ   ²  ss  € € € € € ðð ð 13Ø#'ð$(ð $(ð $(ð $(ð $(ðL ð7ð 7ð 7ñ „Xð7ð  Ôð"ð "ð "ñ Ôð"ð5ð 5ð 5ð 5ð*=ð =ð =ð =ð!ð !ð !ð !ðð ð ð ð@+ð +ð +ð +ð4 ð  ð  ð  ð!ð !ð !ð !ð#ð #ð #ð #ð0 $(Ø!%ð	7Sð 7Sð 7Sð 7Sð 7Sðt RVðM"ð M"ð M"ð M"ð M"ð M"ð M"r   rÿ   )r   r   r   r   )r   r    r   rÑ   )rÞ   rÑ   r   r    )rá   r    r   r+   )rí   rÑ   rî   rÑ   r   rï   )"r   Ú
__future__r   rD   r“   rÍ   Útypingr   r   r   r   r   Úutilsr
   r   r   r    r   r   r+   r‡   r   r  r   ÚABCMetar   rJ   rÎ   rØ   r–   r‘   r•   r›   rÿ   r   r   r   ú<module>r,     s  ððð ð #Ð "Ð "Ð "Ð "Ð "à 
€
€
€
Ø Ð Ð Ð Ø 	€	€	€	Ø ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?à 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø Ð Ð Ð Ð Ð à˜ ˜Ô%€Ø�WÐ1¸ÐIÑIÔIÐ Ø˜W c˜N¨DÐ0Ô1Ð ðð ð ð ð	ð 	ð 	ð 	ð 	�zñ 	ô 	ð 	ð4ð 4ð 4ð 4ð 4˜cœkð 4ñ 4ô 4ð 4ðnMð Mð Mð Mð M�ñ Mô Mð Mð` �”
Ð<Ñ=Ô=€ðð ð ð ð,'ð 'ð 'ð 'ðð ð ð ðð ð ð ð*J"ð J"ð J"ð J"ð J"�=ñ J"ô J"ð J"ð J"ð J"r   