Ë
    ”U.jx&  ã                  óò  — d dl mZ d dlZd dlmZmZmZmZ ddlm	Z	m
Z
mZ ddlmZmZmZ g d¢Zdd„Zeed	   eeef   f   Z ed
e«      Z	  G d„ de«      Z G d„ de«      Z G d„ de«      Z ej4                  dej6                  ej8                  z  «      Z ej4                  dej8                  «      Z ej4                  dej8                  «      Zddœdd„Z d d„Z!ddœ	 	 	 	 	 d!d„Z"ddœ	 	 	 	 	 d"d„Z#d#d„Z$y)$é    )ÚannotationsN)ÚNewTypeÚTupleÚUnionÚcasté   )ÚTagÚUnsortedTagsErrorÚ	parse_tag)ÚInvalidVersionÚVersionÚ_TrimmedRelease)
ÚBuildTagÚInvalidNameÚInvalidSdistFilenameÚInvalidWheelFilenameÚNormalizedNameÚcanonicalize_nameÚcanonicalize_versionÚis_normalized_nameÚparse_sdist_filenameÚparse_wheel_filenamec                 ó   — t         S )N)Ú__all__© ó    ú]C:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\pip/_vendor/packaging/utils.pyÚ__dir__r      s   € Ü€Nr   r   r   c                  ó   — e Zd ZdZy)r   zW
    An invalid distribution name; users should refer to the packaging user guide.
    N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   '   ó   „ òr   r   c                  ó   — e Zd ZdZy)r   zM
    An invalid wheel filename was found, users should refer to PEP 427.
    Nr    r   r   r   r   r   -   r%   r   r   c                  ó   — e Zd ZdZy)r   z^
    An invalid sdist filename was found, users should refer to the packaging user guide.
    Nr    r   r   r   r   r   3   r%   r   r   z%[a-z0-9]|[a-z0-9][a-z0-9._-]*[a-z0-9]z+[a-z0-9]|[a-z0-9]([a-z0-9-](?!--))*[a-z0-9]z	(\d+)(.*)F)Úvalidatec               óú   — |r#t         j                  | «      st        d| ›�«      ‚| j                  «       j	                  dd«      j	                  dd«      }d|v r|j	                  dd«      }d|v rŒt        d|«      S )a]  
    This function takes a valid Python package or extra name, and returns the
    normalized form of it.

    The return type is typed as :class:`NormalizedName`. This allows type
    checkers to help require that a string has passed through this function
    before use.

    If **validate** is true, then the function will check if **name** is a valid
    distribution name before normalizing.

    :param str name: The name to normalize.
    :param bool validate: Check whether the name is a valid distribution name.
    :raises InvalidName: If **validate** is true and the name is not an
        acceptable distribution name.

    >>> from packaging.utils import canonicalize_name
    >>> canonicalize_name("Django")
    'django'
    >>> canonicalize_name("oslo.concurrency")
    'oslo-concurrency'
    >>> canonicalize_name("requests")
    'requests'
    zname is invalid: Ú_Ú-Ú.z--r   )Ú_validate_regexÚ	fullmatchr   ÚlowerÚreplacer   )Únamer(   Úvalues      r   r   r   B   s|   € ñ2 œ×1Ñ1°$Ô7ÜÐ-¨d¨XÐ6Ó7Ð7ð �J‰J‹L× Ñ   cÓ*×2Ñ2°3¸Ó<€Eà
�%‰-Ø—‘˜d CÓ(ˆð �%Š-äÐ  %Ó(Ð(r   c                ó0   — t         j                  | «      duS )a7  
    Check if a name is already normalized (i.e. :func:`canonicalize_name` would
    roundtrip to the same value).

    :param str name: The name to check.

    >>> from packaging.utils import is_normalized_name
    >>> is_normalized_name("requests")
    True
    >>> is_normalized_name("Django")
    False
    N)Ú_normalized_regexr.   )r1   s    r   r   r   g   s   € ô ×&Ñ& tÓ,°DÐ8Ð8r   T)Ústrip_trailing_zeroc               ó¦   — t        | t        «      r	 t        | «      } t        |rt	        | «      «      S | «      S # t        $ r t        | «      cY S w xY w)a  Return a canonical form of a version as a string.

    This function takes a string representing a package version (or a
    :class:`~packaging.version.Version` instance), and returns the
    normalized form of it. By default, it strips trailing zeros from
    the release segment.

    >>> from packaging.utils import canonicalize_version
    >>> canonicalize_version('1.0.1')
    '1.0.1'

    Per PEP 625, versions may have multiple canonical forms, differing
    only by trailing zeros.

    >>> canonicalize_version('1.0.0')
    '1'
    >>> canonicalize_version('1.0.0', strip_trailing_zero=False)
    '1.0.0'

    Invalid versions are returned unaltered.

    >>> canonicalize_version('foo bar baz')
    'foo bar baz'

    >>> canonicalize_version('1.4.0.0.0')
    '1.4'
    )Ú
isinstanceÚstrr   r   r   )Úversionr5   s     r   r   r   w   sU   € ô< �'œ3Ôð	 Ü˜gÓ&ˆGô Ñ+>Œ˜wÓ'ÓLÐLÀGÓLÐLøô ò 	 Ü�w“<Òð	 ús   ’9 ¹AÁA©Úvalidate_orderc               óä  — | j                  d«      st        d| ›�«      ‚| dd } | j                  d«      }|dvrt        d| ›�«      ‚| j                  d|dz
  «      }|d	   }d
|v s%t	        j
                  d|t        j                  «      €t        d| ›�«      ‚t        |«      }	 t        |d   «      }|dk(  rc|d   }t        j                  |«      }	|	€t        d|› d| ›�«      ‚t        dt        |	j                  d«      «      |	j                  d«      f«      }
nd}
|d   }	 t        ||¬«      }|||
|fS # t        $ r}t        d| ›�«      |‚d}~ww xY w# t        $ r t        d| ›�«      d‚w xY w)a  
    This function takes the filename of a wheel file, and parses it,
    returning a tuple of name, version, build number, and tags.

    The name part of the tuple is normalized and typed as
    :class:`NormalizedName`. The version portion is an instance of
    :class:`~packaging.version.Version`. The build number is ``()`` if
    there is no build number in the wheel filename, otherwise a
    two-item tuple of an integer for the leading digits and
    a string for the rest of the build number. The tags portion is a
    frozen set of :class:`~packaging.tags.Tag` instances (as the tag
    string format allows multiple tags to be combined into a single
    string).

    If **validate_order** is true, compressed tag set components are
    checked to be in sorted order as required by PEP 425.

    :param str filename: The name of the wheel file.
    :param bool validate_order: Check whether compressed tag set components
        are in sorted order.
    :raises InvalidWheelFilename: If the filename in question
        does not follow the :ref:`wheel specification
        <pypug:binary-distribution-format>`.

    >>> from packaging.utils import parse_wheel_filename
    >>> from packaging.tags import Tag
    >>> from packaging.version import Version
    >>> name, ver, build, tags = parse_wheel_filename("foo-1.0-py3-none-any.whl")
    >>> name
    'foo'
    >>> ver == Version('1.0')
    True
    >>> tags == {Tag("py3", "none", "any")}
    True
    >>> not build
    True

    .. versionadded:: 26.1
       The *validate_order* parameter.
    z.whlz3Invalid wheel filename (extension must be '.whl'): Néüÿÿÿr+   )é   é   z0Invalid wheel filename (wrong number of parts): é   r   Ú__z^[\w\d._]*$zInvalid project name: r   z*Invalid wheel filename (invalid version): r?   zInvalid build number: z in r   r   éÿÿÿÿr:   z\Invalid wheel filename (compressed tag set components must be in sorted order per PEP 425): )Úendswithr   ÚcountÚsplitÚreÚmatchÚUNICODEr   r   r   Ú_build_tag_regexr   ÚintÚgroupr   r
   )Úfilenamer;   ÚdashesÚpartsÚ	name_partr1   r9   ÚeÚ
build_partÚbuild_matchÚbuildÚtag_strÚtagss                r   r   r   �   sÑ  € ðZ ×Ñ˜VÔ$Ü"ØAÀ(ÀÐNó
ð 	
ð ˜˜ˆ}€HØ�^‰^˜CÓ €FØ�VÑÜ"Ø>¸x¸lÐKó
ð 	
ð �N‰N˜3 ¨¡
Ó+€EØ�a‘€IàˆyÑœBŸH™H ^°YÄÇ
Á
ÓKÐSÜ"Ð%;¸H¸<Ð#HÓIÐIÜ˜YÓ'€DðÜ˜% ™(Ó#ˆð �‚{Ø˜1‘Xˆ
Ü&×,Ñ,¨ZÓ8ˆØÐÜ&Ø(¨¨°D¸¸ÐEóð ô �Z¤# k×&7Ñ&7¸Ó&:Ó";¸[×=NÑ=NÈqÓ=QÐ!RÓS‰àˆØ�B‰i€GðÜ˜°Ô@ˆð �'˜5 $Ð'Ð'øô/ ò Ü"Ø8¸¸ÐEó
àð	ûðûô$ ò Ü"ð*Ø*2¨ð7ó
ð ð	ðús$   Â%D6 Ä#E Ä6	EÄ?EÅEÅE/c                ób  — | j                  d«      r| dt        d«        }n/| j                  d«      r| dt        d«        }nt        d| ›�«      ‚|j                  d«      \  }}}|st        d| ›�«      ‚t	        |«      }	 t        |«      }||fS # t        $ r}t        d| ›�«      |‚d}~ww xY w)a‘  
    This function takes the filename of a sdist file (as specified
    in the `Source distribution format`_ documentation), and parses
    it, returning a tuple of the normalized name and version as
    represented by an instance of :class:`~packaging.version.Version`.

    :param str filename: The name of the sdist file.
    :raises InvalidSdistFilename: If the filename does not end
        with an sdist extension (``.zip`` or ``.tar.gz``), or if it does not
        contain a dash separating the name and the version of the distribution.

    >>> from packaging.utils import parse_sdist_filename
    >>> from packaging.version import Version
    >>> name, ver = parse_sdist_filename("foo-1.0.tar.gz")
    >>> name
    'foo'
    >>> ver == Version('1.0')
    True

    .. _Source distribution format: https://packaging.python.org/specifications/source-distribution-format/#source-distribution-file-name
    z.tar.gzNz.zipz@Invalid sdist filename (extension must be '.tar.gz' or '.zip'): r+   zInvalid sdist filename: z*Invalid sdist filename (invalid version): )rC   Úlenr   Ú
rpartitionr   r   r   )rL   Ú	file_stemrO   ÚsepÚversion_partr1   r9   rP   s           r   r   r   ù   sá   € ð, ×Ñ˜Ô#ØÐ.¤ I£˜Ð/‰	Ø	×	Ñ	˜6Ô	"Ø˜^¤ F£˜|Ð,‰	ä"ðØˆ|ðó
ð 	
ð $-×#7Ñ#7¸Ó#<Ñ €Iˆs�LÙÜ"Ð%=¸h¸\Ð#JÓKÐKä˜YÓ'€DðÜ˜,Ó'ˆð �'ˆ?Ðøô ò Ü"Ø8¸¸ÐEó
àð	ûðús   ÂB Â	B.ÂB)Â)B.)Úreturnz	list[str])r1   r8   r(   Úboolr\   r   )r1   r8   r\   r]   )r9   zVersion | strr5   r]   r\   r8   )rL   r8   r;   r]   r\   z8tuple[NormalizedName, Version, BuildTag, frozenset[Tag]])rL   r8   r\   ztuple[NormalizedName, Version])%Ú
__future__r   rF   Útypingr   r   r   r   rU   r	   r
   r   r9   r   r   r   r   r   rJ   r8   r   r   Ú
ValueErrorr   r   r   ÚcompileÚ
IGNORECASEÚASCIIr-   r4   rI   r   r   r   r   r   r   r   r   Ú<module>rd      s;  ðõ
 #ã 	ß .Ó .ç 3Ñ 3ß =Ñ =ò€óð ��r‘˜E # s (™OÐ+Ñ,€áÐ)¨3Ó/€ðô
�*ô ô˜:ô ô˜:ô ð �"—*‘*Ø,¨b¯m©m¸b¿h¹hÑ.Fó€ð �B—J‘JÐMÈrÏxÉxÓXÐ à�2—:‘:˜l¨B¯H©HÓ5Ð ð 6;õ ")óJ9ð" <@ñ#MØð#MØ48ð#Màó#MðR !ñY(ØðY(ð ðY(ð >ó	Y(ôx/r   