Files
cms-website/.deps_siteforge_v812/packaging/__pycache__/specifiers.cpython-312.pyc
T

489 lines
38 KiB
Plaintext
Raw Normal View History

Ë
êÅÙjwœãóN—dZddlmZddlZddlZddlZddlmZmZm Z m
Z
m Z ddl m
Z
ddlmZe eefZe
de¬ «ZeeegefZdd
„ZGd „d e«ZGd
„dej0¬«ZGd„de«Zej6d«Zdd„Zdd„Zdd„Zdd„Z Gd„de«Z!y)zŠ
.. testsetup::
from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier
from packaging.version import Version
é)Ú annotationsN)ÚCallableÚIterableÚIteratorÚTypeVarÚUnioné)Úcanonicalize_version)ÚVersionÚUnparsedVersionVar)Úboundcó<—t|t«s t|«}|S©N)Ú
isinstancer )Úversions úXC:\Users\30997\AppData\Local\Temp\pip-target-6g32zz5s\lib\python\packaging/specifiers.pyÚ_coerce_versionrs€Ü �gœwÔ 'ܘ'Ó"ˆØ €Nócó—eZdZdZy)Ú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__©rrrr s„òrrcó0—eZdZejd d„«Zejd
d„«Zejd d„«Zeejd d„««Z e jd
d„«Z ejddd„«Z ej d dd„«Z y)Ú
BaseSpecifiercó—y)zŽ
Returns the str representation of this Specifier-like object. This
should be representative of the Specifier itself.
Nr©Úselfs rÚ__str__zBaseSpecifier.__str__-ó�rcó—y)zF
Returns a hash value for this Specifier-like object.
Nrrs rÚ__hash__zBaseSpecifier.__hash__4r"rcó—y)z«
Returns a boolean representing whether or not the two Specifier-like
objects are equal.
:param other: The other object to check against.
Nr©r Úothers rÚ__eq__zBaseSpecifier.__eq__:r"rcó—y)zîWhether or not pre-releases as a whole are allowed.
This can be set to either ``True`` or ``False`` to explicitly enable or disable
prereleases or it can be set to ``None`` (the default) to use default semantics.
Nrrs rÚ prereleaseszBaseSpecifier.prereleasesCr"rcó—y)zQSetter for :attr:`prereleases`.
:param value: The value to set.
Nr©r Úvalues rr*zBaseSpecifier.prereleasesLr"rNcó—y)zR
Determines if the given item is contained within this specifier.
Nr)r Úitemr*s rÚcontainszBaseSpecifier.containsSr"rcó—y)z•
Takes an iterable of items and filters them so that only items which
are contained within this specifier are allowed in it.
Nr)r Úiterabler*s rÚfilterzBaseSpecifier.filterYr"r©ÚreturnÚstr©r5Úint©r'Úobjectr5Úbool©r5ú bool | None©r-r;r5ÚNoner)r/r6r*r=r5r;©r2zIterable[UnparsedVersionVar]r*r=r5zIterator[UnparsedVersionVar])
rrrÚabcÚabstractmethodr!r$r(Úpropertyr*Úsetterr0r3rrrrr,sÙ„Ø×Ñò óð ð  ×Ñò óð ð
 ×Ñò óð ðØ×Ñò óóð ð×Ñò óð ð  ×Ñó óð ð
 ×ÑàQUð Ø4ð ØCNð à %ò óñ rr)Ú metaclassc óœ—eZdZdZdZdZejdezezdzejejz«Z
dddd d
d d d
dœZ d&d'd„Z e
d(d„«Zejd)d„«Ze
d*d„«Ze
d*d„«Zd*d„Zd*d„Ze
d+d„«Zd,d„Zd-d„Zd.d„Zd/d„Zd/d„Zd/d„Zd/d„Zd/d„Zd0d „Zd0d!„Zd/d"„Zd1d#„Z d2d3d$„Z! d2 d4d%„Z"y)5Ú 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!=ú<=ú>=Ú<Ú>ú===Ncóî—|jj|«}|std|›�«‚|jd«j «|jd«j «f|_||_y)aðInitialize a Specifier instance.
:param spec:
The string representation of a specifier which will be parsed and
normalized before use.
:param prereleases:
This tells the specifier if it should accept prerelease versions if
applicable or not. The default of ``None`` will autodetect it from the
given specifiers.
:raises InvalidSpecifier:
If the given specifier is invalid (i.e. bad syntax).
zInvalid specifier: ÚoperatorrN)Ú_regexÚsearchrÚgroupÚstripÚ_specÚ _prereleases)r Úspecr*Úmatchs rÚ__init__zSpecifier.__init__Þsm€ð— ‘ ×"Ñ" 4Ó(ˆÙÜ"Ð%8¸¸Ð#AÓBÐ Bð
�K‰K˜
Ó #× )Ñ )Ó +Ø �K‰K˜ Ó "× (Ñ (Ó *ð'
ˆŒ
ð (ˆÕrcó¼—|j� |jS|j\}}|dvr1|dk(r|jd«r|dd}t|«jryy)N)rQrSrRrPrVrUrTrQú.*éþÿÿÿTF)r^r]Úendswithr Ú
is_prerelease)r rXrs rr*zSpecifier.prereleasesøsm€ð × Ñ Ð (Ø×$Ñ$Ð $ð
!ŸJ™Jш�'Ø Ð@Ñ @ð˜4Ò G×$4Ñ$4°TÔ$:Ø! # 2˜,�ô�wÓ×-Ò-Øàrcó—||_yr©r^r,s rr*zSpecifier.prereleasesó
€à!ˆÕrcó —|jdS)z`The operator of this specifier.
>>> Specifier("==1.2.3").operator
'=='
r©r]rs rrXzSpecifier.operatoró€ð�z‰z˜!‰}Ðrcó —|jdS)zaThe version of this specifier.
>>> Specifier("==1.2.3").version
'1.2.3'
r rkrs rrzSpecifier.versionrlrcóŒ—|j�d|j›�nd}d|jj›dt |«›|›d�S)aTA representation of the Specifier that shows all internal state.
>>> Specifier('>=1.0.0')
<Specifier('>=1.0.0')>
>>> Specifier('>=1.0.0', prereleases=False)
<Specifier('>=1.0.0', prereleases=False)>
>>> Specifier('>=1.0.0', prereleases=True)
<Specifier('>=1.0.0', prereleases=True)>
ú, prereleases=ÚrTÚ(ú)>)r^r*Ú __class__rr6©r Úpres rÚ__repr__zSpecifier.__repr__&sU€ð× Ñ Ð,ð˜T×-Ñ-Ð0Ñ 1àð ð �4—>‘>×*Ñ*Ð+¨1¬S°«Y¨M¸#¸¸bÐAÐArcó4—dj|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]rs rr!zSpecifier.__str__8s€ðˆv�}‰}˜dŸj™jÐ)Ð)rcóx—t|jd|jddk7¬«}|jd|fS)Nr rrP©Ústrip_trailing_zero)r
r])r Úcanonical_versions rÚ_canonical_speczSpecifier._canonical_specBs>€ä0Ø �J‰J�q‰MØ!%§¡¨A¡°$Ñ!6ô
Ðð�z‰z˜!‰}Ð/Ð/Ð/rcó,—t|j«Sr)Úhashr}rs rr$zSpecifier.__hash__Js€Ü�D×(Ñ(Ó)Ð)rcóî—t|t«r |jt|««}nt||j«stS|j
|j
k(S#t$r tcYSwxYw)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
)rr6rsrÚNotImplementedr}r&s rr(zSpecifier.__eq__Msi€ô& �eœSÔ !ð
&ØŸ™¤s¨5£zÓ2‘ô˜E 4§>¡>Ô2Ü!Ð !à×#Ñ# u×'<Ñ'<Ñ<Ð<øô $ò
&Ü%Ò%ð
&ús’A"Á"A4Á3A4có>—t|d|j|›�«}|S)NÚ _compare_)ÚgetattrÚ
_operators)r ÚopÚoperator_callables rÚ
_get_operatorzSpecifier._get_operatorjs+€Ü.5Ø �I˜dŸo™o¨bÑ1Ð2Ð3ó/
Ðð!Ð rc
óà—tttjtt |«««dd«}|dz
}|j
d«||«xr|j
d«||«S)NéÿÿÿÿrcrSrQ)Ú
_version_joinÚlistÚ itertoolsÚ takewhileÚ_is_not_suffixÚ_version_splitrˆ)r Ú prospectiver_Úprefixs rÚ_compare_compatiblezSpecifier._compare_compatiblepsw€ôÜ ”×$Ñ$¤^´^ÀDÓ5IÓJÓ KÈCÈRÐ Pó
ˆð
�$‰ˆà'ˆt×!Ñ! $Ó'¨ °TÓ:ò
Ð?W¸t×?QÑ?QÐRVÓ?WØ ˜ó@
ð
rcóD—|jd«r_t|jd¬«}t|ddd¬«}t|«}t|«}t ||«\}}|dt |«} | |k(St
|«}
|
jst
|j«}||
k(S)NrcFrzrd)rer
Úpublicr�Ú _pad_versionÚlenr Úlocal) r r‘r_Únormalized_prospectiveÚnormalized_specÚ
split_specÚsplit_prospectiveÚpadded_prospectiveÚ_Úshortened_prospectiveÚ spec_versions rÚ_compare_equalzSpecifier._compare_equal„s¸€à �=‰=˜Ô ä%9Ø×"Ñ"¸ô&Ð "ô3°4¸¸°9ÐRWÔXˆOô(¨Ó8ˆJô
!/Ð/EÓ FÐ ô%1Ð1BÀJÓ$OÑ !Ð  ð
%7Ð7H¼¸Z»Ð$IÐ !à(¨JÑ6Ð 6ô# 4›=ˆLð
 ×%Ò%Ü% k×&8Ñ&8Ó9� à ,Ñ.Ð .rcó(—|j||« Sr)r¡©r r‘r_s rÚ_compare_not_equalzSpecifier._compare_not_equal¬s€Ø×&Ñ& {°DÓ9Ð9Ð9rcóD—t|j«t|«kSr©r r•r£s rÚ_compare_less_than_equalz"Specifier._compare_less_than_equal¯ó€ô�{×)Ñ)Ó*¬g°d«mÑ;Ð;rcóD—t|j«t|«k\Srr¦r£s rÚ_compare_greater_than_equalz%Specifier._compare_greater_than_equalµr¨rcó®—t|«}||ksy|js8|jr,t|j«t|j«k(ryy©NFT)r rfÚ base_version©r r‘Úspec_strr_s rÚ_compare_less_thanzSpecifier._compare_less_than»sT€ô�xÓ ˆð
˜TÒ!Øð ×!Ò! k×&?Ò&?Ü�{×/Ñ/Ó0´G¸D×<MÑ<MÓ4NÒNØð
rcó—t|«}||kDsy|js8|jr,t|j«t|j«k(ry|j�,t|j«t|j«k(ryyr¬)r Úis_postreleaser­r˜r®s rÚ_compare_greater_thanzSpecifier._compare_greater_thanÓsƒ€ô�xÓ ˆð
˜TÒ!Øð ×"Ò" {×'AÒ'AÜ�{×/Ñ/Ó0´G¸D×<MÑ<MÓ4NÒNØð × Ñ Ð (Ü�{×/Ñ/Ó0´G¸D×<MÑ<MÓ4NÒNØð
rcóh—t|«j«t|«j«k(Sr)r6Úlowerr£s rÚ_compare_arbitraryzSpecifier._compare_arbitraryñs&€Ü�;Ó×%Ñ%Ó'¬3¨t«9¯?©?Ó+<Ñ<Ð<rcó$—|j|«S)a;Return whether or not the item is contained in this specifier.
:param item: The item to check for.
This is used for the ``in`` operator and behaves the same as
:meth:`contains` with no ``prereleases`` argument passed.
>>> "1.2.3" in Specifier(">=1.2.3")
True
>>> Version("1.2.3") in Specifier(">=1.2.3")
True
>>> "1.0.0" in Specifier(">=1.2.3")
False
>>> "1.3.0a1" in Specifier(">=1.2.3")
False
>>> "1.3.0a1" in Specifier(">=1.2.3", prereleases=True)
True
©r0©r r/s rÚ __contains__zSpecifier.__contains__ôó€ð&�}‰}˜TÓ"Ð"rcó®—|€ |j}t|«}|jr|sy|j|j«}|||j
«S)alReturn 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
F)r*rrfrˆrXr)r r/r*Únormalized_itemr‡s rr0zSpecifier.contains sY€ð4 Ð Ø×*Ñ*ˆKô*¨$Ó/ˆð
× (Ò (±Øð/3×.@Ñ.@ÀÇÁÓ.OÐÙ  °$·,±,Ó?Ð?rc#óöK—d}g}d|�|ndi}|D]S}t|«}|j|fi|¤ŽsŒ"|jr |s|js|j |«ŒNd}|–—ŒU|s|r |D]}|–—Œyyy­w)aOFilter 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)rr0rfr*Úappend)r r2r*ÚyieldedÚfound_prereleasesÚkwrÚparsed_versions rr3zSpecifier.filter5s›èø€ð<ˆØÐà¨KÐ,C™[ÈÐ
Nˆó ˆGÜ,¨WÓ5ˆNàˆt�}‰}˜^Ñ2¨rÓ2ð"×/Ò/Ù 4×#3Ò#3à%×,Ñ,¨WÕ5ð#�GØ!“Mð ñ(Ñ,Û,�Ø“
ñ-ð-ˆwùs ‚0A9³AA9©rpN)r_r6r*r=r5r?)r5r;r>r4)r5ztuple[str, str]r7r9)r†r6r5ÚCallableOperator)r‘r r_r6r5r;)r‘r r¯r6r5r;)r/z
str | Versionr5r;r)r/ÚUnparsedVersionr*r=r5r;r@)#rrrrÚ_operator_regex_strÚ_version_regex_strÚreÚcompileÚVERBOSEÚ
IGNORECASErYr…rarCr*rDrXrrvr!r}r$r(rˆr“r¡r¤r§rªr°r³r¶rºr0r3rrrrGrGcsR„ñð Ðð\ Ðð|ˆR�Z‰ZØÐ%Ñ%Ð(:Ñ:¸WÑDØ
�
‰
�R—]‘]Ñ"ó€Fð ØØØØ"Ø
Ø
Øñ €Jô(ð4òóðð.×Ñò"óð"ðòóððòóðóBó$*ðò0óð0ó*ó=ó:!ó 
ó(&/óP:ó<ó <ó ó0ó<=ó#ô**@ðZRVð;Ø4ð;ØCNð;à %ô;rrGz^([0-9]+)((?:a|b|c|rc)[0-9]+)$có—g}|jd«\}}}|j|xsd«|jd«D]J}tj |«}|r |j |j
««Œ:|j|«ŒL|S)aSplit 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_regexrZÚextendÚgroups)rÚresultÚepochržÚrestr/r`s rr�r�vsy€ð€Fà×'Ñ'¨Ó,�N€Eˆ1ˆdØ
‡M�M�%’,˜3Ôà—
‘
˜3–ˆÜ×$Ñ$ TÓ*ˆÙ Ø �M‰M˜%Ÿ,™,›.Õ )à �M‰M˜$Õ ð  ð €Mrcó6—|^}}|›ddj|«›�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)Ú
componentsr×rØs rr‹r‹Œs'€ð€L€EˆD؈W�A�c—h‘h˜t“nÐ%Ð &Ð&rcó.‡—tˆfd„dD«« S)Nc3ó@•K—|]}‰j|«–—Œy­wr)Ú
startswith)Ú.0r’Úsegments €rÚ <genexpr>z!_is_not_suffix.<locals>.<genexpr>˜s!øèø€ðÙ1P vˆ×ј6×"Ñ1Pùsƒ)ÚdevÚaÚbÚrcÚpost)Úany)ràs`rr�r�—s"ø€ÜóÙ1Póóð ðrc óÒ—gg}}|jttjd„|«««|jttjd„|«««|j|t |d«d«|j|t |d«d«|j ddgt
dt |d«t |d«z
«z«|j ddgt
dt |d«t |d«z
«z«ttjj|««ttjj|««fS)Ncó"—|j«Sr©Úisdigit©Úxs rÚ<lambda>z_pad_version.<locals>.<lambda>¡s
€¸¿¹¼rcó"—|j«Srrêrìs rrîz_pad_version.<locals>.<lambda>¢s
€¸!¿)¹)¼+rrr rÏ) r¿rŒr�rŽr—ÚinsertÚmaxÚchainÚ
from_iterable)ÚleftÚrightÚ
left_splitÚ right_splits rr–r–�s5€Ø  "� €Jð×Ñ”dœ9×.Ñ.Ñ/DÀdÓKÓLÔMØ×Ñ”tœI×/Ñ/Ñ0EÀuÓMÓNÔOð×Ñ�dœ3˜z¨!™}Ó-Ð/Ð0Ô1Ø×Ñ�uœS ¨Q¡Ó0Ð2Ð3Ô4ð×Ñ�a˜#˜¤ Q¬¨K¸©NÓ(;¼cÀ*ÈQÁ-Ó>PÑ(PÓ!QÑQÔRØ×Ñ�q˜3˜%¤# a¬¨Z¸©]Ó);¼cÀ+ÈaÁ.Ó>QÑ)QÓ"RÑRÔSô
ŒY�_‰_×
*Ñ
*¨:Ó
6Ó7Ü ŒY�_‰_×
*Ñ
*¨;Ó
7Ó8ð ðrcóÒ—eZdZdZ d dd„Zedd„«Zejdd„«Zdd„Zdd„Z dd„Z
dd „Z dd
„Z dd „Z
dd „Zdd
„Z d dd„Z d dd„Zy)Ú 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.
Ncó"—t|t«rc|jd«D�cgc]#}|j«sŒ|j«‘Œ%}}t t t |««|_||_yt |«|_||_ycc}w)a´Initialize a SpecifierSet instance.
:param specifiers:
The string representation of a specifier or a comma-separated list of
specifiers which will be parsed and normalized before use.
May also be an iterable of ``Specifier`` instances, which will be used
as is.
:param prereleases:
This tells the SpecifierSet if it should accept prerelease versions if
applicable or not. The default of ``None`` will autodetect it from the
given specifiers.
:raises InvalidSpecifier:
If the given ``specifiers`` are not parseable than this exception will be
raised.
Ú,N) rr6rÒr\Ú frozensetÚmaprGÚ_specsr^)r Ú
specifiersr*ÚsÚsplit_specifierss rrazSpecifierSet.__init__¹s~€ô, �j¤#Ô &ð4>×3CÑ3CÀCÔ3HÓVÑ3H¨aÈAÏGÉGÍI §¡¥ Ð3HÐ ÐVô$¤C¬ Ð3CÓ$DÓEˆDŒKð(ˆÕô $ JÓ/ˆDŒKð(ˆÕùò Ws
¤B ºB có„—|j� |jS|jsytd„|jD««S)Nc3ó4K—|]}|j–—Œy­wr©r*©rßrs rráz+SpecifierSet.prereleases.<locals>.<genexpr>îsèø€Ð6©+ Q�1—=•=©+ùs‚)r^rþrçrs rr*zSpecifierSet.prereleasesßs?€ð × Ñ Ð (Ø×$Ñ$Ð $ð
�{Š{ØôÑ6¨$¯+ª+Ó6Ó6Ð6rcó—||_yrrhr,s rr*zSpecifierSet.prereleasesðrircó^—|j�d|j›�nd}dt|«›|›d�S)aA 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)>
rorpz<SpecifierSet(rr)r^r*r6rts rrvzSpecifierSet.__repr__ôsD€ð× Ñ Ð,ð˜T×-Ñ-Ð0Ñ 1àð ð  ¤ D£ ˜}¨S¨E°Ð4Ð4rcóX—djtd„|jD«««S)anA 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ûc3ó2K—|]}t|«–—Œy­wr)r6rs rráz'SpecifierSet.__str__.<locals>.<genexpr>sèø€Ð;©{¨!œs 1Ÿv©{ùs‚)rÚÚsortedrþrs rr!zSpecifierSet.__str__ s"€ð�x‰xœÑ;¨t¯{ª{Ó;Ó;Ó<Ð<rcó,—t|j«Sr)rrþrs rr$zSpecifierSet.__hash__s€Ü�D—K‘KÓ Ð rcóâ—t|t«r t|«}nt|t«stSt«}t |j
|j
z«|_|j €|j �|j |_|S|j �|j €|j |_|S|j |j k(r|j |_|Std«‚)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')>
zFCannot combine SpecifierSets with True and False prerelease overrides.)rr6rùr�rürþr^Ú
ValueError)r r'Ú specifiers rÚ__and__zSpecifierSet.__and__sã€ô �eœSÔ !Ü  Ó'‰EܘE¤<Ô0Ü!Ð !ä “Nˆ Ü$ T§[¡[°5·<±<Ñ%?Ó@ˆ Ôà × Ñ Ð $¨×);Ñ);Ð)GØ%*×%7Ñ%7ˆIÔ "ðÐð×
Ñ
Ð
*¨u×/AÑ/AÐ/IØ%)×%6Ñ%6ˆIÔ "ðÐð×
Ñ
 %×"4Ñ"4Ò
4Ø%)×%6Ñ%6ˆIÔ "ð Ðô ØXóð
rcó¶—t|ttf«rtt|««}nt|t«stS|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
)rr6rGrùr�rþr&s rr(zSpecifierSet.__eq__8sD€ô& �eœc¤9Ð-Ô .Ü ¤ U£Ó,‰EܘE¤<Ô0Ü!Ð !à�{‰{˜eŸl™lÑ*Ð*rcó,—t|j«S)z7Returns the number of specifiers in this specifier set.)r—rþrs rÚ__len__zSpecifierSet.__len__Rs€ä�4—;‘;ÓÐrcó,—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þrs rÚ__iter__zSpecifierSet.__iter__Vs€ô�D—K‘KÓ Ð rcó$—|j|«S)arReturn 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 rrºzSpecifierSet.__contains__`r»rcóú‡‡—t‰t«s t‰«Š‰€ |jЉs
‰jry|r!‰jrt‰j«Št ˆˆfd„|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)