+
    ix&                       ^ RI Ht ^ RIt^ RIHtHtHtHt ^RIH	t	H
t
Ht ^RIHtHtHt . R!OtR
 R lt]]R",          ]]]3,          3,          t]! R	]4      t  ! R R]4      t ! R R]4      t ! R R]4      t]P4                  ! R]P6                  ]P8                  ,          4      t]P4                  ! R]P8                  4      t]P4                  ! R]P8                  4      tRR/R R llt R R lt!RR/R R llt"RR/R R llt#R R  lt$R# )#    )annotationsN)NewTypeTupleUnioncast)TagUnsortedTagsError	parse_tag)InvalidVersionVersion_TrimmedReleaseInvalidNameInvalidSdistFilenameInvalidWheelFilenameNormalizedNamec                   V ^8  d   QhRR/# )   returnz	list[str] )formats   "[/home/piyush/.cache/uv/builds-v0/.tmpPfdyTF/lib/python3.14/site-packages/packaging/utils.py__annotate__r      s           c                     \         # )N)__all__r   r   r   __dir__r      s    Nr   c                      ] tR t^'tRtRtR# )r   zO
An invalid distribution name; users should refer to the packaging user guide.
r   N__name__
__module____qualname____firstlineno____doc____static_attributes__r   r   r   r   r   '       r   c                      ] tR t^-tRtRtR# )r   zE
An invalid wheel filename was found, users should refer to PEP 427.
r   Nr   r   r   r   r   r   -   r%   r   c                      ] tR t^3tRtRtR# )r   zV
An invalid sdist filename was found, users should refer to the packaging user guide.
r   Nr   r   r   r   r   r   3   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+)(.*)validateFc               $    V ^8  d   QhRRRRRR/# )r   namestrr(   boolr   r   r   )r   s   "r   r   r   B   s!     ") ")C ")d ")~ ")r   c                  V'       d+   \         P                  V 4      '       g   \        RV : 24      hV P                  4       P	                  RR4      P	                  RR4      pRV9   d   VP	                  RR4      pK  \        RV4      # )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   )r*   r(   values   &$ r   canonicalize_namer6   B   sv    2 11$77-dX677 JJL  c*223<E
%-dC( %((r   c                    V ^8  d   QhRRRR/# )r   r*   r+   r   r,   r   )r   s   "r   r   r   g   s     9 9S 9T 9r   c                0    \         P                  V 4      RJ# )a  
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_regexr2   )r*   s   &r   is_normalized_namer:   g   s     &&t,D88r   strip_trailing_zeroTc               $    V ^8  d   QhRRRRRR/# )r   versionzVersion | strr;   r,   r   r+   r   )r   s   "r   r   r   w   s)     #M #M#M48#M#Mr   c                   \        V \        4      '       d    \        V 4      p \        V'       d   \	        V 4      4      # T 4      #   \         d    \        T 4      u # i ; i)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'
)
isinstancer+   r   r   r   )r=   r;   s   &$r   canonicalize_versionr@   w   sX    < '3	 g&G +>w'LLGLL  	 w<	 s   A AAvalidate_orderc               $    V ^8  d   QhRRRRRR/# )r   filenamer+   rA   r,   r   z8tuple[NormalizedName, Version, BuildTag, frozenset[Tag]]r   )r   s   "r   r   r      s-     Y( Y(Y( Y( >	Y(r   c               @   V P                  R4      '       g   \        RV : 24      hV RR p V P                  R4      pVR9  d   \        RV : 24      hV P                  RV^,
          4      pV^ ,          pRV9   g)   \        P
                  ! RV\        P                  4      f   \        RV : 24      h\        V4      p \        V^,          4      pT^8X  dk   T^,          p\        P                  T4      p	T	f   \        R
T RT : 24      h\        R\        T	P                  ^4      4      T	P                  ^4      34      p
MRp
TR,          p \        YR7      pYVY3#   \         d   p\        R	T : 24      ThRp?ii ; i  \         d    \        RT : 24      Rhi ; i)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'): Nr/   z0Invalid wheel filename (wrong number of parts): __z^[\w\d._]*$zInvalid project name: z*Invalid wheel filename (invalid version): zInvalid build number: z in BuildTag)rA   z\Invalid wheel filename (compressed tag set components must be in sorted order per PEP 425): )      r   )endswithr   countsplitrematchUNICODEr6   r   r   _build_tag_regexr   intgroupr
   r	   )rC   rA   dashesparts	name_partr*   r=   e
build_partbuild_matchbuildtag_strtagss   &$           r   parse_wheel_filenamer]      s   Z V$$"A(N
 	
 }H^^C FV">xlK
 	
 NN3
+EaIyBHH^Y

KS"%;H<#HIIY'D%(# {1X
&,,Z8&(DE  Z#k&7&7&:";[=N=Nq=Q!RSBiG@ 5''/  "8E
	$  "**27
 	s$   ?E F E>)E99E>Fc                    V ^8  d   QhRRRR/# )r   rC   r+   r   ztuple[NormalizedName, Version]r   )r   s   "r   r   r      s     / /3 /+I /r   c                   V P                  R4      '       d   V R\        R4      )  pM6V P                  R4      '       d   V R\        R4      )  pM\        RV : 24      hVP                  R4      w  r#pV'       g   \        RV : 24      h\	        V4      p \        V4      pWV3#   \         d   p\        RT : 24      ThRp?ii ; i)aM  
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): )rK   lenr   
rpartitionr6   r   r   )rC   	file_stemrV   sepversion_partr*   r=   rW   s   &       r   parse_sdist_filenamere      s    , ##.I/				6	"	"^F|,	"|
 	
 $-#7#7#< IL"%=h\#JKKY'D,' ?  "8E
	s   B# #C.B>>C)
rF   r   r   r   r   r6   r@   r:   re   r]   r   )%
__future__r   rN   typingr   r   r   r   r\   r   r	   r
   r=   r   r   r   r   r   rR   r+   rF   r   
ValueErrorr   r   r   compile
IGNORECASEASCIIr1   r9   rQ   r6   r:   r@   r]   re   r   r   r   <module>rl      s  
 # 	 . . 3 3 = = rE#s(O+,)3/
* : :  **,bmmbhh.F JJMrxxX ::lBHH5 ")U ")J9 #M;?#MLY( !Y(x/r   