§
    k•jê'  ã                  ó  — d dl mZ d dlZd dlmZmZ ddlmZ ddlm	Z	 g d¢Z
d"d
„Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ d¦  «        Z G d„ d¦  «        Zd#d„Z ej        d¦  «        Zd$d„Zd%d!„ZdS )&é    )ÚannotationsN)ÚMappingÚSequenceé   )Ú_ErrorCollector)ÚRequirement)ÚCyclicDependencyGroupÚDependencyGroupIncludeÚDependencyGroupResolverÚDuplicateGroupNamesÚInvalidDependencyGroupObjectÚresolve_dependency_groupsÚreturnú	list[str]c                 ó   — t           S ©N)Ú__all__© ó    új/var/www/finuniver-perm.ru/html/portfolio/venv/lib/python3.11/site-packages/packaging/dependency_groups.pyÚ__dir__r      s   € Ý€Nr   c                  ó   — e Zd ZdZdS )r   z]
    The same dependency groups were defined twice, with different non-normalized names.
    N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r      s   € € € € € ðð ð ð r   r   c                  ó$   ‡ — e Zd ZdZd	ˆ fd„Zˆ xZS )
r	   z5
    The dependency group includes form a cycle.
    Úrequested_groupÚstrÚgroupÚinclude_groupr   ÚNonec                ó²   •— || _         || _        || _        ||k    r|› d�}n|› d|› d|› d|› �}t          ¦   «                              d|› d|› �¦  «         d S )Nz includes itselfz -> ú, z0Cyclic dependency group include while resolving z: )r   r!   r"   ÚsuperÚ__init__)Úselfr   r!   r"   ÚreasonÚ	__class__s        €r   r'   zCyclicDependencyGroup.__init__'   s�   ø€ Ø.ˆÔØˆŒ
Ø*ˆÔà˜EÒ!Ð!ØÐ/Ð/Ð/ˆFˆFà%ÐNÐN¨5ÐNÐN°EÐNÐN¸}ÐNÐNˆFÝ‰Œ×Òð+Øð+ð +Ø"(ð+ð +ñ	
ô 	
ð 	
ð 	
ð 	
r   )r   r    r!   r    r"   r    r   r#   )r   r   r   r   r'   Ú__classcell__)r*   s   @r   r	   r	   "   sG   ø€ € € € € ðð ð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
r   r	   c                  ó   — e Zd ZdZdS )r   ze
    A member of a dependency group was identified as a dict, but was not in a valid
    format.
    Nr   r   r   r   r   r   9   s   € € € € € ðð ð ð r   r   c                  ó"   — e Zd ZdZd	d„Zd
d„ZdS )r
   ©r"   r"   r    r   r#   c                ó   — || _         dS )zˆ
        Initialize a DependencyGroupInclude.

        :param include_group: The name of the group referred to by this include.
        Nr.   )r(   r"   s     r   r'   zDependencyGroupInclude.__init__H   s   € ð +ˆÔÐÐr   c                ó0   — | j         j        › d| j        ›d�S )Nú(ú))r*   r   r"   )r(   s    r   Ú__repr__zDependencyGroupInclude.__repr__P   s!   € Ø”.Ô)ÐCÐC¨DÔ,>ÐCÐCÐCÐCr   N)r"   r    r   r#   )r   r    )r   r   r   Ú	__slots__r'   r3   r   r   r   r
   r
   E   sG   € € € € € Ø"€Ið+ð +ð +ð +ðDð Dð Dð Dð Dð Dr   r
   c                  ó:   — e Zd ZdZdd„Zdd
„Zdd„Zdd„Zdd„ZdS )r   a\  
    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]``.
    Údependency_groupsú/Mapping[str, Sequence[str | Mapping[str, str]]]r   r#   c                ó    — t          ¦   «         }t          ||¦  «        | _        i | _        i | _        i | _        |                     d¦  «         d S )Nz$[dependency-groups] data was invalid)r   Ú_normalize_group_namesr6   Ú_parsed_groupsÚ_include_graph_ancestorsÚ_resolve_cacheÚfinalize)r(   r6   Úerrorss      r   r'   z DependencyGroupResolver.__init__`   s\   € õ !Ñ"Ô"ˆå!7Ð8IÈ6Ñ!RÔ!RˆÔð
 ð 	Ôð EGˆÔ%àBDˆÔà�ŠÐ>Ñ?Ô?Ð?Ð?Ð?r   r!   r    ú0tuple[Requirement | DependencyGroupInclude, ...]c                óÊ   — t          |¦  «        }t          ¦   «                              d|›d�¦  «        5 }|                      ||¦  «        cddd¦  «         S # 1 swxY w Y   dS )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!   r>   s      r   ÚlookupzDependencyGroupResolver.lookups   s°   € õ   Ñ&Ô&ˆåÑÔ×&Ò&ØC¨EÐCÐCÐCñ
ô 
ð 	4àØ×$Ò$ U¨FÑ3Ô3ð	4ð 	4ð 	4ð 	4ñ 	4ô 	4ð 	4ð 	4ð 	4ð 	4ð 	4ð 	4øøøð 	4ð 	4ð 	4ð 	4ð 	4ð 	4s   µAÁAÁAútuple[Requirement, ...]c                óÌ   — t          |¦  «        }t          ¦   «                              d|›d�¦  «        5 }|                      |||¦  «        cddd¦  «         S # 1 swxY w Y   dS )z
        Resolve a dependency group to a list of requirements.

        :param group: the name of the group to resolve
        rA   rB   N)rC   r   rD   Ú_resolverF   s      r   ÚresolvezDependencyGroupResolver.resolve�   s°   € õ   Ñ&Ô&ˆåÑÔ×&Ò&ØC¨EÐCÐCÐCñ
ô 
ð 	7àØ—=’= ¨¨vÑ6Ô6ð	7ð 	7ð 	7ð 	7ñ 	7ô 	7ð 	7ð 	7ð 	7ð 	7ð 	7ð 	7øøøð 	7ð 	7ð 	7ð 	7ð 	7ð 	7s   µAÁAÁ Ar   r>   r   c                óÂ  — || j         v r| j         |         S |                      ||¦  «        }g }|D �]}t          |t          ¦  «        r|                     |¦  «         Œ.t          |t
          ¦  «        r®t          |j        ¦  «        }|| j         	                    |d¦  «        v r*| 
                    t          |||j        ¦  «        ¦  «         Œžg | j         	                    |d¦  «        ¢|‘R | j        |<   |                     |                      |||¦  «        ¦  «         Œñt          d|› �¦  «        ‚|j        rdS t!          |¦  «        | j         |<   | j         |         S )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: )r<   rE   Ú
isinstancer   Úappendr
   rC   r"   r;   ÚgetÚerrorr	   ÚextendrJ   ÚNotImplementedErrorr>   Útuple)r(   r!   r   r>   ÚparsedÚresolved_groupÚitemr"   s           r   rJ   z DependencyGroupResolver._resolveŽ   s§  € ð �DÔ'Ð'Ð'ØÔ& uÔ-Ð-à×"Ò" 5¨&Ñ1Ô1ˆàˆàð 	ñ 	ˆDÝ˜$¥Ñ,Ô,ð Ø×%Ò% dÑ+Ô+Ð+Ð+Ý˜DÕ"8Ñ9Ô9ð Ý /°Ô0BÑ CÔ C�ð ! DÔ$A×$EÒ$EÀeÈRÑ$PÔ$PÐPÐPØ—L’LÝ-Ø+¨U°DÔ4Fñô ñô ð ð ðDØÔ6×:Ò:¸5À"ÑEÔEðDàðDð D�DÔ1°-Ñ@ð #×)Ò)ØŸš m°_ÀfÑMÔMñô ð ð õ *ØHÀ$ÐHÐHñô ð ð Œ=ð 	Ø�2å%*¨>Ñ%:Ô%:ˆÔ˜EÑ"ØÔ" 5Ô)Ð)r   c                óÆ  — || j         v r| j         |         S || j        vr(|                     t          d|› d�¦  «        ¦  «         dS | j        |         }t	          |t
          ¦  «        r(|                     t          d|›d�¦  «        ¦  «         dS t	          |t          ¦  «        s(|                     t          d|›d�¦  «        ¦  «         dS g }|D ]ë}t	          |t
          ¦  «        r#|                     t          |¦  «        ¦  «         Œ:t	          |t          ¦  «        rwt          |                     ¦   «         ¦  «        dk    r&|                     t          d|›�¦  «        ¦  «         Œš|d	         }|                     t          |¬
¦  «        ¦  «         ŒÆ|                     t          d|›�¦  «        ¦  «         Œìt          |¦  «        | j         |<   | j         |         S )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: rX   r.   )r:   r6   rP   ÚLookupErrorrM   r    Ú	TypeErrorr   rN   r   r   rS   Úkeysr   r
   )r(   r!   r>   Ú	raw_groupÚelementsrV   r"   s          r   rE   z$DependencyGroupResolver._parse_groupÈ   s  € ð �DÔ'Ð'Ð'ØÔ& uÔ-Ð-à˜Ô.Ð.Ð.Ø�LŠL�Ð%L¸%Ð%LÐ%LÐ%LÑMÔMÑNÔNÐNØ�2àÔ*¨5Ô1ˆ	Ý�i¥Ñ%Ô%ð 	Ø�LŠLÝØX¨ÐXÐXÐXñô ñô ð ð
 �2å˜)¥XÑ.Ô.ð 	Ø�LŠLÝÐO¨eÐOÐOÐOÑPÔPñô ð ð �2à?AˆØð 	Tð 	TˆDÝ˜$¥Ñ$Ô$ð Tð —’¥¨DÑ 1Ô 1Ñ2Ô2Ð2Ð2Ý˜D¥'Ñ*Ô*ð TÝ˜Ÿš™œÑ%Ô%Ð);Ò;Ð;Ø—L’LÝ4ØF¸dÐFÐFñô ñô ð ð ð %)¨Ô$9�MØ—O’OÕ$:ÈÐ$WÑ$WÔ$WÑXÔXÐXÐXà—’�YÐ'QÈÐ'QÐ'QÑRÔRÑSÔSÐSÐSå%*¨8¡_¤_ˆÔ˜EÑ"ØÔ" 5Ô)Ð)r   N)r6   r7   r   r#   )r!   r    r   r?   )r!   r    r   rH   )r!   r    r   r    r>   r   r   rH   )r!   r    r>   r   r   r?   )	r   r   r   r   r'   rG   rK   rJ   rE   r   r   r   r   r   T   s‡   € € € € € ð	ð 	ð@ð @ð @ð @ð&4ð 4ð 4ð 4ð7ð 7ð 7ð 7ð8*ð 8*ð 8*ð 8*ðt/*ð /*ð /*ð /*ð /*ð /*r   r   r6   r7   Úgroupsr    útuple[str, ...]c               óX   ‡— t          | ¦  «        Št          ˆfd„|D ¦   «         ¦  «        S )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
    c              3  óf   •K  — | ]+}‰                      |¦  «        D ]}t          |¦  «        V — ŒŒ,d S r   )rK   r    )Ú.0r!   ÚrÚresolvers      €r   ú	<genexpr>z,resolve_dependency_groups.<locals>.<genexpr>
  sD   øè è € ÐMÐM˜E°X×5EÒ5EÀeÑ5LÔ5LÐMÐM°•�Q‘”ÐMÐMÐMÐMÐMÐMÐMr   )r   rS   )r6   r^   rd   s     @r   r   r   ÿ   s6   ø€ õ 'Ð'8Ñ9Ô9€HÝÐMÐMÐMÐM VÐMÑMÔMÑMÔMÐMr   z[-_.]+Únamec                ó\   — t                                d| ¦  «                             ¦   «         S )Nú-)Ú_NORMALIZE_PATTERNÚsubÚlower)rf   s    r   rC   rC     s$   € Ý×!Ò! # tÑ,Ô,×2Ò2Ñ4Ô4Ð4r   r>   r   ú,dict[str, Sequence[str | Mapping[str, str]]]c                óŽ  — i }i }|                       ¦   «         D ]B\  }}t          |¦  «        }|                     |g ¦  «                             |¦  «         |||<   ŒC|                      ¦   «         D ]T\  }}t	          |¦  «        dk    r<|                     t          d|› dd                     |¦  «        › d�¦  «        ¦  «         ŒU|S )Nr   z"Duplicate dependency group names: z (r%   r2   )ÚitemsrC   Ú
setdefaultrN   ÚlenrP   r   Újoin)	r6   r>   Úoriginal_namesÚnormalized_groupsÚ
group_nameÚvalueÚnormed_group_nameÚnormed_nameÚnamess	            r   r9   r9     sü   € ð ,.€NØFHÐà.×4Ò4Ñ6Ô6ð 5ð 5Ñˆ
�EÝ+¨JÑ7Ô7ÐØ×!Ò!Ð"3°RÑ8Ô8×?Ò?À
ÑKÔKÐKØ/4ÐÐ+Ñ,Ð,à,×2Ò2Ñ4Ô4ð ð Ñˆ�UÝˆu‰:Œ:˜Š>ˆ>Ø�LŠLÝ#ð:Ø"ð:ð :Ø&*§i¢i°Ñ&6Ô&6ð:ð :ð :ñô ñô ð øð Ðr   )r   r   )r6   r7   r^   r    r   r_   )rf   r    r   r    )r6   r7   r>   r   r   rl   )Ú
__future__r   ÚreÚcollections.abcr   r   r>   r   Úrequirementsr   r   r   Ú
ValueErrorr   r	   r   r
   r   r   Úcompileri   rC   r9   r   r   r   ú<module>r      s¾  ðØ "Ð "Ð "Ð "Ð "Ð "à 	€	€	€	Ø -Ð -Ð -Ð -Ð -Ð -Ð -Ð -à #Ð #Ð #Ð #Ð #Ð #Ø %Ð %Ð %Ð %Ð %Ð %ðð ð €ðð ð ð ðð ð ð ð ˜*ñ ô ð ð
ð 
ð 
ð 
ð 
˜Jñ 
ô 
ð 
ð.ð ð ð ð  :ñ ô ð ðDð Dð Dð Dð Dñ Dô Dð Dðc*ð c*ð c*ð c*ð c*ñ c*ô c*ð c*ðVNð Nð Nð Nð&  �R”Z 	Ñ*Ô*Ð ð5ð 5ð 5ð 5ðð ð ð ð ð r   