ó
    ÷Þ jØ+  ã                  ó  • S SK Jr  S SKrS SKJrJr  SSKJr  SSKJ	r	J
r
  / SQrSS jr " S	 S
\5      r " S S\5      r " S S\5      r " S S5      r " S S5      r      SS jr\R(                  " S5      rSS jr      SS jrg)é    )ÚannotationsN)ÚMappingÚSequenceé   )Ú_ErrorCollector)ÚInvalidRequirementÚRequirement)ÚCyclicDependencyGroupÚDependencyGroupIncludeÚDependencyGroupResolverÚDuplicateGroupNamesÚInvalidDependencyGroupObjectÚresolve_dependency_groupsc                 ó   • [         $ ©N)Ú__all__© ó    ÚU/var/www/html/gaurav/venv/lib/python3.13/site-packages/packaging/dependency_groups.pyÚ__dir__r      s   € Ü€Nr   c                  ó   • \ rS rSrSrSrg)r   é   zm
The same dependency groups were defined twice, with different non-normalized names.

.. versionadded:: 26.1
r   N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   r   r   r   r      s   † ôr   r   c                  ó:   ^ • \ rS rSrSrSU 4S jjrSS jrSrU =r$ )r
   é$   zE
The dependency group includes form a cycle.

.. versionadded:: 26.1
c                ó„   >• Xl         X l        X0l        X2:X  a  U S3nOU SU SU SU 3n[        TU ]  SU SU 35        g )Nz includes itselfz -> ú, z0Cyclic dependency group include while resolving z: )Úrequested_groupÚgroupÚinclude_groupÚsuperÚ__init__)Úselfr$   r%   r&   ÚreasonÚ	__class__s        €r   r(   ÚCyclicDependencyGroup.__init__+   sd   ø€ Ø.ÔØŒ
Ø*ÔàÓ!Ø�wÐ.Ð/‰Fà%� d¨5¨'°°E°7¸$¸}¸oÐNˆFÜ‰ÑØ>ØÐ˜r & ð+õ	
r   c                ó`   • U R                   U R                  U R                  U R                  44$ r   )r+   r$   r%   r&   ©r)   s    r   Ú
__reduce__Ú CyclicDependencyGroup.__reduce__:   s(   € Ø—‘ ×!5Ñ!5°t·z±zÀ4×CUÑCUÐ VÐWÐWr   )r%   r&   r$   )r$   Ústrr%   r1   r&   r1   ÚreturnÚNone)r2   z8tuple[type[CyclicDependencyGroup], tuple[str, str, str]])	r   r   r   r   r   r(   r/   r   Ú__classcell__)r+   s   @r   r
   r
   $   s   ø† ñ÷
÷Xò Xr   r
   c                  ó   • \ rS rSrSrSrg)r   éA   zq
A member of a dependency group was identified as a dict, but was not in a valid
format.

.. versionadded:: 26.1
r   Nr   r   r   r   r   r   A   s   † ôr   r   c                  ó0   • \ rS rSrSrSrSS jrSS jrSrg)	r   éO   zJ
A reference to another dependency group by name.

.. versionadded:: 26.1
©r&   c                ó   • Xl         g)zp
Initialize a DependencyGroupInclude.

:param include_group: The name of the group referred to by this include.
Nr9   )r)   r&   s     r   r(   ÚDependencyGroupInclude.__init__X   s
   € ð +Õr   c                óP   • U R                   R                   SU R                  < S3$ )NÚ(Ú))r+   r   r&   r.   s    r   Ú__repr__ÚDependencyGroupInclude.__repr__`   s'   € Ø—.‘.×)Ñ)Ð*¨!¨D×,>Ñ,>Ñ+AÀÐCÐCr   N)r&   r1   r2   r3   )r2   r1   )	r   r   r   r   r   Ú	__slots__r(   r?   r   r   r   r   r   r   O   s   † ñð #€Iô+÷Dr   r   c                  ón   • \ rS rSrSr    S
S jrSS jrSS jr        SS jr      SS jr	Sr
g	)r   éd   aX  
A resolver for Dependency Group data.

This class handles caching, name normalization, cycle detection, and other
parsing requirements. There are only two public methods for exploring the data:
``lookup()`` and ``resolve()``.

:param dependency_groups: A mapping, as provided via pyproject
    ``[dependency-groups]``.

.. versionadded:: 26.1
c                ó„   • [        5       n[        X5      U l        0 U l        0 U l        0 U l        UR                  S5        g )Nz$[dependency-groups] data was invalid)r   Ú_normalize_group_namesÚdependency_groupsÚ_parsed_groupsÚ_include_graph_ancestorsÚ_resolve_cacheÚfinalize)r)   rF   Úerrorss      r   r(   Ú DependencyGroupResolver.__init__r   sH   € ô !Ó"ˆä!7Ð8IÓ!RˆÔð
 ð 	Ôð EGˆÔ%àBDˆÔà�‰Ð>Õ?r   c                ó¬   • [        U5      n[        5       R                  SU< S35       nU R                  X5      sSSS5        $ ! , (       d  f       g= f)zš
Lookup a group name, returning the parsed dependency data for that group.
This will not resolve includes.

:param group: the name of the group to lookup
ú[dependency-groups] data for ú was malformedN)Ú_normalize_namer   Úon_exitÚ_parse_group©r)   r%   rK   s      r   ÚlookupÚDependencyGroupResolver.lookup…   sL   € ô   Ó&ˆäÓ×&Ñ&Ø+¨E©9°NÐCô
àØ×$Ñ$ UÓ3÷
÷ 
÷ 
ús   ªAÁ
Ac                ó®   • [        U5      n[        5       R                  SU< S35       nU R                  XU5      sSSS5        $ ! , (       d  f       g= f)zg
Resolve a dependency group to a list of requirements.

:param group: the name of the group to resolve
rN   rO   N)rP   r   rQ   Ú_resolverS   s      r   ÚresolveÚDependencyGroupResolver.resolve“   sL   € ô   Ó&ˆäÓ×&Ñ&Ø+¨E©9°NÐCô
àØ—=‘= ¨vÓ6÷
÷ 
÷ 
ús   ªAÁ
Ac                óÒ  • XR                   ;   a  U R                   U   $ U R                  X5      n/ nU Hø  n[        U[        5      (       a  UR	                  U5        M+  [        U[
        5      (       a¬  [        UR                  5      nXpR                  R                  US5      ;   a'  UR                  [        X!UR                  5      5        M›  / U R                  R                  US5      QUP7U R                  U'   UR                  U R                  XrU5      5        Mì  [        SU 35      e   UR                  (       a  g[!        U5      U R                   U'   U R                   U   $ )a\  
This is a helper for cached resolution to strings. It preserves the name of the
group which the user initially requested in order to present a clearer error in
the event that a cycle is detected.

:param group: The normalized name of the group to resolve.
:param requested_group: The group which was used in the original, user-facing
    request.
r   z+Invalid dependency group item after parse: )rI   rR   Ú
isinstancer	   Úappendr   rP   r&   rH   ÚgetÚerrorr
   ÚextendrW   ÚNotImplementedErrorrK   Útuple)r)   r%   r$   rK   ÚparsedÚresolved_groupÚitemr&   s           r   rW   Ú DependencyGroupResolver._resolve    sU  € ð ×'Ñ'Ó'Ø×&Ñ& uÑ-Ð-à×"Ñ" 5Ó1ˆàˆãˆDÜ˜$¤×,Ñ,Ø×%Ñ% dÖ+Ü˜DÔ"8×9Ñ9Ü /°×0BÑ0BÓ C�ð !×$AÑ$A×$EÑ$EÀeÈRÓ$PÓPØ—L‘LÜ-Ø+°D×4FÑ4FóöðDØ×6Ñ6×:Ñ:¸5À"ÓEðDàñD�D×1Ñ1°-Ñ@ð #×)Ñ)ØŸ™ mÀfÓMöô *ØAÀ$ÀÐHóð ñ5 ðB �=�=Øä%*¨>Ó%:ˆ×Ñ˜EÑ"Ø×"Ñ" 5Ñ)Ð)r   c                óh  • XR                   ;   a  U R                   U   $ XR                  ;  a  UR                  [        SU S35      5        gU R                  U   n[	        U[
        5      (       a   UR                  [        SU< S35      5        g[	        U[        5      (       d   UR                  [        SU< S35      5        g/ nU GH  n[	        U[
        5      (       a:  UR                  [        5         UR                  [        U5      5        S S S 5        MS  [	        U[        5      (       a“  [        UR                  5       5      S:w  a   UR                  [        SU< 35      5        M¥  US	   n[	        U[
        5      (       d"  S
U< 3nUR                  [        U5      5        Má  UR                  [!        US95        Mû  UR                  [        SU< 35      5        GM     UR"                  (       a  g[        U5      U R                   U'   U R                   U   $ ! , (       d  f       GMg  = f)NzDependency group 'z' not foundr   zDependency group z' contained a string rather than a list.z is not a sequence type.)úinclude-groupzInvalid dependency group item: rg   z6Dependency group include-group value is not a string: r9   )rG   rF   r^   ÚLookupErrorr[   r1   Ú	TypeErrorr   Úcollectr   r\   r	   r   ra   Úkeysr   r   rK   )r)   r%   rK   Ú	raw_groupÚelementsrd   r&   Úmsgs           r   rR   Ú$DependencyGroupResolver._parse_groupÚ   sè  € ð ×'Ñ'Ó'Ø×&Ñ& uÑ-Ð-à×.Ñ.Ó.Ø�L‰LœÐ'9¸%¸ÀÐ%LÓMÔNØà×*Ñ*¨5Ñ1ˆ	Ü�i¤×%Ñ%Ø�L‰LÜØ'¨¡yÐ0WÐXóôð
 ä˜)¤X×.Ñ.Ø�L‰LÜÐ-¨e©YÐ6NÐOÓPôð à?AˆÜˆDÜ˜$¤×$Ñ$ð —^‘^Ô$6Õ7Ø—O‘O¤K°Ó$5Ô6÷ 8Ñ7ä˜D¤'×*Ñ*Ü˜Ÿ™›Ó%Ð);Ó;Ø—L‘LÜ4Ø=¸d¹XÐFóöð %)¨Ñ$9�MÜ% m´S×9Ñ9àTØ#™hð(ð ð Ÿ™¤Y¨s£^Ö4à Ÿ™Ü2ÀÑOöð —‘œYÐ)HÈÉÐ'QÓR×Sñ7 ð: �=�=Øä%*¨8£_ˆ×Ñ˜EÑ"Ø×"Ñ" 5Ñ)Ð)÷9 8×7ús   Ã8H!È!
H1	)rH   rG   rI   rF   N)rF   ú/Mapping[str, Sequence[str | Mapping[str, str]]]r2   r3   )r%   r1   r2   ú0tuple[Requirement | DependencyGroupInclude, ...])r%   r1   r2   útuple[Requirement, ...])r%   r1   r$   r1   rK   r   r2   rr   )r%   r1   rK   r   r2   rq   )r   r   r   r   r   r(   rT   rX   rW   rR   r   r   r   r   r   r   d   sn   † ñð@àJð@ð 
ô@ô&4ô7ð8*Øð8*Ø+.ð8*Ø8Gð8*à	 ô8*ðt<*Øð<*Ø"1ð<*à	9÷<*r   r   c               óD   ^• [        U 5      m[        U4S jU 5       5      $ )zÿ
Resolve a dependency group to a tuple of requirements, as strings.

:param dependency_groups: the parsed contents of the ``[dependency-groups]`` table
    from ``pyproject.toml``
:param groups: the name of the group(s) to resolve

.. versionadded:: 26.1
c              3  óh   >#   • U H(  nTR                  U5       H  n[        U5      v •  M     M*     g 7fr   )rX   r1   )Ú.0r%   ÚrÚresolvers      €r   Ú	<genexpr>Ú,resolve_dependency_groups.<locals>.<genexpr>+  s+   øé € ÐM¡V˜E°X×5EÑ5EÀeÖ5L°”�Q—�Ñ5L‘¢Vùs   ƒ/2)r   ra   )rF   Úgroupsrw   s     @r   r   r     s!   ø€ ô 'Ð'8Ó9€HÜÔM¡VÓMÓMÐMr   z[-_.]+c                óJ   • [         R                  SU 5      R                  5       $ )NÚ-)Ú_NORMALIZE_PATTERNÚsubÚlower)Únames    r   rP   rP   6  s   € Ü×!Ñ! # tÓ,×2Ñ2Ó4Ð4r   c                óT  • 0 n0 nU R                  5        H5  u  pE[        U5      nUR                  U/ 5      R                  U5        XSU'   M7     UR                  5        HF  u  px[	        U5      S:”  d  M  UR                  [        SU SSR                  U5       S35      5        MH     U$ )Nr   z"Duplicate dependency group names: z (r#   r>   )ÚitemsrP   Ú
setdefaultr\   Úlenr^   r   Újoin)	rF   rK   Úoriginal_namesÚnormalized_groupsÚ
group_nameÚvalueÚnormed_group_nameÚnormed_nameÚnamess	            r   rE   rE   :  s³   € ð ,.€NØFHÐà.×4Ñ4Ö6Ñˆ
Ü+¨JÓ7ÐØ×!Ñ!Ð"3°RÓ8×?Ñ?À
ÔKØ/4Ð+Ó,ñ 7ð
 -×2Ñ2Ö4ÑˆÜˆu‹:˜�>Ø�L‰LÜ#Ø8Ø"�m 2 d§i¡i°Ó&6Ð%7°qð:óöñ 5ð Ðr   )r2   z	list[str])rF   rp   rz   r1   r2   ztuple[str, ...])r€   r1   r2   r1   )rF   rp   rK   r   r2   z,dict[str, Sequence[str | Mapping[str, str]]])Ú
__future__r   ÚreÚcollections.abcr   r   rK   r   Úrequirementsr   r	   r   r   Ú
ValueErrorr   r
   r   r   r   r   Úcompiler}   rP   rE   r   r   r   Ú<module>r“      sµ   ðÝ "ã 	ß -å #ß 9ò€ôô˜*ô ôX˜Jô Xô: :ô ÷Dñ D÷*r*ñ r*ðtNØFðNØTWðNàôNð* —Z’Z 	Ó*Ð ô5ðØFðàðð 2õr   