HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/packaging/__pycache__/utils.cpython-38.pyc
U

��]��@sfddlmZmZmZddlZddlmZddlmZm	Z	erHddl
mZe�d�Z
dd	�Zd
d�ZdS)�)�absolute_import�division�print_functionN�)�MYPY_CHECK_RUNNING)�InvalidVersion�Version)�Unionz[-_.]+cCst�d|���S)N�-)�_canonicalize_regex�sub�lower)�name�r�1/usr/lib/python3/dist-packages/packaging/utils.py�canonicalize_namesrc
Cs�zt|�}Wntk
r$|YSXg}|jdkrF|�d�|j��|�t�ddd�dd�|jD����|j	dk	r�|�d�d	d�|j	D���|j
dk	r�|�d
�|j
��|jdk	r�|�d�|j��|jdk	r�|�d�|j��d�|�S)
z�
    This is very similar to Version.__str__, but has one subtle difference
    with the way it handles the release segment.
    rz{0}!z(\.0)+$��.css|]}t|�VqdS�N��str��.0�xrrr�	<genexpr>,sz'canonicalize_version.<locals>.<genexpr>Ncss|]}t|�VqdSrrrrrrr0sz.post{0}z.dev{0}z+{0})
rrZepoch�append�format�rer�join�releaseZpreZpostZdevZlocal)Z_version�version�partsrrr�canonicalize_versions"

&



r")Z
__future__rrrrZ_typingrr rr�typingr	�compilerrr"rrrr�<module>s