§
    ö{Âc†˜  ã            	       óØ  — d 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
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	ed
efd„Z G d„ de¦  «        Z G d„ dej        ¬¦  «        Z G d„ de¦  «        Z ej        d¦  «        Zd	ed
ee         fd„Zded
efd„Z dee         dee         d
eee         ee         f         fd„Z! G d„ de¦  «        Z"dS )zŠ
.. testsetup::

    from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier
    from packaging.version import Version
é    N)	ÚCallableÚIterableÚIteratorÚListÚOptionalÚSetÚTupleÚTypeVarÚUnioné   )Úcanonicalize_version)ÚVersionÚUnparsedVersionVar)ÚboundÚversionÚreturnc                 óN   — t          | t          ¦  «        st          | ¦  «        } | S ©N)Ú
isinstancer   )r   s    ú6/usr/lib/python3/dist-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efd„¦   «         Zej        defd„¦   «         Zej        de	de
fd„¦   «         Zeej        dee
         fd„¦   «         ¦   «         Zej        de
ddfd	„¦   «         Zej        dd
edee
         de
fd„¦   «         Zej        	 ddee         dee
         dee         fd„¦   «         ZdS )ÚBaseSpecifierr   c                 ó   — 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__5   ó   € € € r   c                 ó   — dS )zF
        Returns a hash value for this Specifier-like object.
        Nr   r#   s    r   Ú__hash__zBaseSpecifier.__hash__<   r&   r   Úotherc                 ó   — 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__B   r&   r   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.prereleasesK   r&   r   ÚvalueNc                 ó   — dS )zQSetter for :attr:`prereleases`.

        :param value: The value to set.
        Nr   ©r$   r/   s     r   r.   zBaseSpecifier.prereleasesT   r&   r   Úitemr.   c                 ó   — dS )zR
        Determines if the given item is contained within this specifier.
        Nr   )r$   r2   r.   s      r   ÚcontainszBaseSpecifier.contains[   r&   r   Úiterablec                 ó   — 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$   r5   r.   s      r   ÚfilterzBaseSpecifier.filtera   r&   r   r   )r   r   r   ÚabcÚabstractmethodÚstrr%   Úintr(   ÚobjectÚboolr,   Úpropertyr   r.   Úsetterr4   r   r   r   r7   r   r   r   r!   r!   4   s›  € € € € € ØÔð˜ð ð ð ñ Ôðð 	Ôð˜#ð ð ð ñ Ôðð
 	Ôð˜Fð  tð ð ð ñ Ôðð ØÔð˜X dœ^ð ð ð ñ Ôñ „Xðð Ôð ð ¨$ð ð ð ñ Ôðð 	Ôðð ˜Sð ¨x¸¬~ð Èð ð ð ñ Ôðð
 	ÔàTXðð Ø Ð!3Ô4ðØCKÈDÄ>ðà	Ð$Ô	%ðð ð ñ Ôðð ð 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d1dedee         ddfd„Zedefd„¦   «         Zej        deddfd„¦   «         Zedefd„¦   «         Zedefd„¦   «         Zdefd„Zdefd„Zedeeef         fd„¦   «         Zdefd„Zdedefd„Zd edefd!„Zd"ededefd#„Z d"ededefd$„Z!d"ededefd%„Z"d"ededefd&„Z#d"ededefd'„Z$d"ed(edefd)„Z%d"ed(edefd*„Z&d"ededefd+„Z'd,e(eef         defd-„Z)	 d2d,e*dee         defd.„Z+	 d2d/e,e-         dee         de.e-         fd0„Z/dS )3Ú	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.   r   c                 ó  — | j                              |¦  «        }|st          d|› 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$   rS   r.   Úmatchs       r   Ú__init__zSpecifier.__init__æ   s�   € ð ”×"Ò" 4Ñ(Ô(ˆØð 	CÝ"Ð#A¸$Ð#AÐ#AÐ#AÑBÔBÐBð �KŠK˜
Ñ#Ô#×)Ò)Ñ+Ô+Ø�KŠK˜	Ñ"Ô"×(Ò(Ñ*Ô*ð'
ˆŒ
ð (ˆÔÐÐr   c                 ó´   — | j         �| j         S | j        \  }}|dv r;|dk    r|                     d¦  «        r
|d d…         }t          |¦  «        j        rdS dS )N)rL   rN   rM   rK   rQ   rL   ú.*éþÿÿÿTF)r\   r[   Úendswithr   Úis_prerelease)r$   rV   r   s      r   r.   zSpecifier.prereleasesÿ   s|   € ð ÔÐ(ØÔ$Ð$ð
 !œJÑˆ�'ØÐ6Ð6Ð6ð ˜4ÒÐ G×$4Ò$4°TÑ$:Ô$:ÐØ! # 2 #œ,�õ �wÑÔÔ-ð Ø�tàˆur   r/   c                 ó   — || _         d S r   ©r\   r1   s     r   r.   zSpecifier.prereleases  ó   € à!ˆÔÐÐr   c                 ó   — | j         d         S )z`The operator of this specifier.

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

        >>> Specifier("==1.2.3").version
        '1.2.3'
        r   rh   r#   s    r   r   zSpecifier.version$  ri   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=rR   rO   ú(ú)>)r\   r.   Ú	__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{}{})Úformatr[   r#   s    r   r%   zSpecifier.__str__?  s   € ð ˆvŒ}˜dœjÐ)Ð)r   c                 óv   — t          | j        d         | j        d         dk    ¬¦  «        }| j        d         |fS )Nr   r   rK   ©Ústrip_trailing_zero)r   r[   )r$   Úcanonical_versions     r   Ú_canonical_speczSpecifier._canonical_specI  sB   € å0ØŒJ�qŒMØ!%¤¨A¤°$Ò!6ð
ñ 
ô 
Ðð Œz˜!Œ}Ð/Ð/Ð/r   c                 ó*   — t          | j        ¦  «        S r   )Úhashry   r#   s    r   r(   zSpecifier.__hash__Q  s   € Ý�DÔ(Ñ)Ô)Ð)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:   ro   r   ÚNotImplementedry   r+   s     r   r,   zSpecifier.__eq__T  s†   € õ& �e�SÑ!Ô!ð 	"ð&ØŸš¥s¨5¡z¤zÑ2Ô2��øÝ#ð &ð &ð &Ý%Ð%Ð%Ð%ð&øøøå˜E 4¤>Ñ2Ô2ð 	"Ý!Ð!àÔ# uÔ'<Ò<Ð<s   —": ºAÁAÚopc                 óB   — t          | d| j        |         › �¦  «        }|S )NÚ	_compare_)ÚgetattrÚ
_operators)r$   r~   Úoperator_callables      r   Ú_get_operatorzSpecifier._get_operatorq  s/   € Ý.5ØÐ3˜dœo¨bÔ1Ð3Ð3ñ/
ô /
Ðð !Ð r   Úprospectivec           
      ó&  — d                      t          t          j        t          t          |¦  «        ¦  «        ¦  «        d d…         ¦  «        }|dz  } |                      d¦  «        ||¦  «        o |                      d¦  «        ||¦  «        S )Nú.éÿÿÿÿr`   rN   rL   )ÚjoinÚlistÚ	itertoolsÚ	takewhileÚ_is_not_suffixÚ_version_splitr„   )r$   r…   rS   Úprefixs       r   Ú_compare_compatiblezSpecifier._compare_compatiblew  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        ¦  «        }t          |d d…         d¬¦  «        }t          |¦  «        }t          |¦  «        }t	          ||¦  «        \  }}|d t          |¦  «        …         }	|	|k    S t          |¦  «        }
|
j        st          |j        ¦  «        }||
k    S )Nr`   ra   Frv   )rb   r   ÚpublicrŽ   Ú_pad_versionÚlenr   Úlocal)r$   r…   rS   Únormalized_prospectiveÚnormalized_specÚ
split_specÚsplit_prospectiveÚpadded_prospectiveÚ_Úshortened_prospectiveÚspec_versions              r   Ú_compare_equalzSpecifier._compare_equalŒ  sÕ   € ð �=Š=˜ÑÔð "	/å%9¸+Ô:LÑ%MÔ%MÐ"å2°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…   rS   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   rc   Úbase_version©r$   r…   r¨   rS   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   r2   c                 ó,   — |                       |¦  «        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
        ©r4   ©r$   r2   s     r   Ú__contains__zSpecifier.__contains__ÿ  ó   € ð& �}Š}˜TÑ"Ô"Ð"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)r.   r   rc   r„   rV   r   )r$   r2   r.   Únormalized_itemrƒ   s        r   r4   zSpecifier.contains  sg   € ð8 ÐØÔ*ˆKõ *¨$Ñ/Ô/ˆð
 Ô(ð 	°ð 	Ø�5ð /3×.@Ò.@ÀÄÑ.OÔ.OÐØ Ð  °$´,Ñ?Ô?Ð?r   r5   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']
        Fr.   NT)r   r4   rc   r.   Úappend)r$   r5   r.   ÚyieldedÚfound_prereleasesÚkwr   Úparsed_versions           r   r7   zSpecifier.filterB  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   ©rR   Nr   )0r   r   r   r   Ú_operator_regex_strÚ_version_regex_strÚreÚcompileÚVERBOSEÚ
IGNORECASErW   r‚   r:   r   r=   r^   r>   r.   r?   rV   r   rr   r%   r	   ry   r;   r(   r<   r,   ÚCallableOperatorr„   r   r�   rž   r¡   r¤   r§   r­   r°   r³   r   r·   ÚUnparsedVersionr4   r   r   r   r7   r   r   r   rB   rB   k   s/  € € € € € ðð ðÐð\Ðð| ˆRŒZØÐ%Ñ%Ð(:Ñ:¸WÑDØ
Œ
�R”]Ñ"ñô €Fð ØØØØ"ØØØð	ð 	€Jð(ð (˜Sð (°H¸T´Nð (Èdð (ð (ð (ð (ð2 ð˜Tð ð ð ñ „Xðð. Ôð" ð "¨$ð "ð "ð "ñ Ôð"ð ð˜#ð ð ð ñ „Xðð ð˜ð ð ð ñ „XððB˜#ð Bð Bð Bð Bð$*˜ð *ð *ð *ð *ð ð0  s¨C x¤ð 0ð 0ð 0ñ „Xð0ð*˜#ð *ð *ð *ð *ð=˜Fð = tð =ð =ð =ð =ð:! ð !Ð(8ð !ð !ð !ð !ð
¨wð 
¸cð 
Àdð 
ð 
ð 
ð 
ð*%/¨'ð %/¸ð %/Àð %/ð %/ð %/ð %/ðN:¨gð :¸Sð :ÀTð :ð :ð :ð :ð<°Gð <À3ð <È4ð <ð <ð <ð <ð<°wð <Àcð <Èdð <ð <ð <ð <ð¨gð Àð Èð ð ð ð ð2°ð ÀCð ÈDð ð ð ð ð>=¨gð =¸Sð =ÀTð =ð =ð =ð =ð#  s¨G |Ô!4ð #¸ð #ð #ð #ð #ð, DHð,@ð ,@Ø#ð,@Ø2:¸4´.ð,@à	ð,@ð ,@ð ,@ð ,@ð^ UYð;ð ;Ø Ð!3Ô4ð;ØCKÈDÄ>ð;à	Ð$Ô	%ð;ð ;ð ;ð ;ð ;ð ;r   rB   z^([0-9]+)((?:a|b|c|rc)[0-9]+)$c                 óì   — g }|                       d¦  «        D ][}t                               |¦  «        }|r(|                     |                     ¦   «         ¦  «         ŒF|                     |¦  «         Œ\|S )Nr‡   )ÚsplitÚ_prefix_regexrX   ÚextendÚgroupsr¼   )r   Úresultr2   r]   s       r   rŽ   rŽ   ƒ  st   € Ø€FØ—’˜cÑ"Ô"ð  ð  ˆÝ×$Ò$ TÑ*Ô*ˆØð 	 Ø�MŠM˜%Ÿ,š,™.œ.Ñ)Ô)Ð)Ð)à�MŠM˜$ÑÔÐÐØ€Mr   Úsegmentc                 ó<   ‡ — 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Úrightc                 óR  — 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   Ú0)r¼   rŠ   r‹   rŒ   r”   ÚinsertÚmaxÚchain)rÜ   rÝ   Ú
left_splitÚright_splits       r   r“   r“   ”  sr  € Ø  "�€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´_ÀkÐ5RÑ0SÔ0SÐTÐTr   c            	       ó‚  — e Zd ZdZ	 ddedee         ddfd„Zedee         fd„¦   «         Z	e	j
        d	eddfd
„¦   «         Z	defd„Zdefd„Zdefd„Zded ef         dd fd„Zdedefd„Zdefd„Zdee         fd„Zdedefd„Z	 	 ddedee         dee         defd„Z	 ddee         dee         dee         fd„ZdS )Ú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.
    rR   NÚ
specifiersr.   r   c                 óä   — d„ |                      d¦  «        D ¦   «         }t          ¦   «         }|D ]$}|                     t          |¦  «        ¦  «         Œ%t	          |¦  «        | _        || _        dS )aN  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.
        :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   )rZ   ©rÔ   Úss     r   ú
<listcomp>z)SpecifierSet.__init__.<locals>.<listcomp>Á  s-   € ÐRÐRÐR¨!ÈÏÊÉ	Ì	ÐR˜AŸGšG™IœIÐRÐRÐRr   ú,N)rË   ÚsetÚaddrB   Ú	frozensetÚ_specsr\   )r$   rî   r.   Úsplit_specifiersÚparsedÚ	specifiers         r   r^   zSpecifierSet.__init__­  s   € ð( SÐR¨z×/?Ò/?ÀÑ/DÔ/DÐRÑRÔRÐõ "%¡¤ˆØ)ð 	-ð 	-ˆIØ�JŠJ•y Ñ+Ô+Ñ,Ô,Ð,Ð,õ   Ñ'Ô'ˆŒð (ˆÔÐÐr   c                 ól   — | j         �| j         S | j        sd S t          d„ | j        D ¦   «         ¦  «        S )Nc              3   ó$   K  — | ]}|j         V — Œd S r   ©r.   rñ   s     r   rÕ   z+SpecifierSet.prereleases.<locals>.<genexpr>ß  s$   è è € Ð6Ð6 Q�1”=Ð6Ð6Ð6Ð6Ð6Ð6r   )r\   rø   rÛ   r#   s    r   r.   zSpecifierSet.prereleasesÐ  sH   € ð ÔÐ(ØÔ$Ð$ð
 Œ{ð 	Ø�4õ Ð6Ð6¨$¬+Ð6Ñ6Ô6Ñ6Ô6Ð6r   r/   c                 ó   — || _         d S r   re   r1   s     r   r.   zSpecifierSet.prereleasesá  rf   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)>
        Nrl   rR   z<SpecifierSet(rn   )r\   r.   r:   rp   s     r   rr   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   c                 ó*   — t          | j        ¦  «        S r   )r{   rø   r#   s    r   r(   zSpecifierSet.__hash__  s   € Ý�D”KÑ Ô Ð r   r)   c                 óª  — 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ø   r\   Ú
ValueError)r$   r)   rû   s      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   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:   rB   rí   r}   rø   r+   s     r   r,   zSpecifierSet.__eq__*  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__D  s   € å�4”;ÑÔÐr   c                 ó*   — t          | j        ¦  «        S )zð
        Returns an iterator over all the underlying :class:`Specifier` instances
        in this specifier set.

        >>> sorted(SpecifierSet(">=1.0.0,!=1.0.1"), key=str)
        [<Specifier('!=1.0.1')>, <Specifier('>=1.0.0')>]
        )Úiterrø   r#   s    r   Ú__iter__zSpecifierSet.__iter__H  s   € õ �D”KÑ Ô Ð r   r2   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__R  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ò   r2   r.   s     €€r   rÕ   z(SpecifierSet.contains.<locals>.<genexpr>ž  s3   øè è € ÐRÐRÀ�1—:’:˜d°�:Ñ<Ô<ÐRÐRÐRÐRÐRÐRr   )r   r   r.   rc   r«   Úallrø   )r$   r2   r.   r  s    `` r   r4   zSpecifierSet.containsg  s˜   øø€ õ< ˜$¥Ñ(Ô(ð 	!Ý˜4‘=”=ˆDð
 ÐØÔ*ˆKð ð 	˜tÔ1ð 	Ø�5àð 	.˜Ô+ð 	.Ý˜4Ô,Ñ-Ô-ˆDõ ÐRÐRÐRÐRÐRÀdÄkÐRÑRÔRÑRÔRÐRr   r5   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þ   )r.   rø   r7   r=   r  r   rc   r¼   )r$   r5   r.   rS   Úfilteredr¾   r2   rÀ   s           r   r7   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Á   )NNr   )r   r   r   r   r:   r   r=   r^   r>   r.   r?   rr   r%   r;   r(   r   r  r<   r,   r
  r   rB   r  rÉ   r·   r4   r   r   r7   r   r   r   rí   rí   ¦  s`  € € € € € ðð ð CGð!(ð !(Øð!(Ø19¸$´ð!(à	ð!(ð !(ð !(ð !(ðF ð7˜X dœ^ð 7ð 7ð 7ñ „Xð7ð  Ôð" ð "¨$ð "ð "ð "ñ Ôð"ð5˜#ð 5ð 5ð 5ð 5ð*=˜ð =ð =ð =ð =ð!˜#ð !ð !ð !ð !ð˜U >°3Ð#6Ô7ð ¸Nð ð ð ð ð@+˜Fð + tð +ð +ð +ð +ð4 ˜ð  ð  ð  ð  ð!˜( 9Ô-ð !ð !ð !ð !ð# ð #°Tð #ð #ð #ð #ð0 '+Ø$(ð	7Sð 7Sàð7Sð ˜d”^ð7Sð ˜D”>ð	7Sð
 
ð7Sð 7Sð 7Sð 7Sðt UYðM"ð M"Ø Ð!3Ô4ðM"ØCKÈDÄ>ðM"à	Ð$Ô	%ðM"ð M"ð M"ð M"ð M"ð M"r   rí   )#r   r8   r‹   rÄ   Útypingr   r   r   r   r   r   r	   r
   r   Úutilsr   r   r   r:   rÉ   r   r=   rÈ   r   r  r   ÚABCMetar!   rB   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Rð Rð Rð Rð R�ñ Rô Rð Rðj �”
Ð<Ñ=Ô=€ð˜Cð  D¨¤Ið ð ð ð ð˜Cð  Dð ð ð ð ðU�t˜C”yð U¨¨c¬ð U°u¸TÀ#¼YÈÈSÌ	Ð=QÔ7Rð Uð Uð Uð Uð$G"ð G"ð G"ð G"ð G"�=ñ G"ô G"ð G"ð G"ð G"r   