%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/__pycache__/distro_info.cpython-312.pyc

�

�>e9���dZddlZddlZddlZddlZdedejfd�Zdefd�ZGd�de	�Z
Gd	�d
�Zdeeefdedejejfd
�ZGd�d�ZGd�de�ZGd�de�Zy)z>provides information about Ubuntu's and Debian's distributions�N�string�returnc��|jd�D�cgc]
}t|���}}t|�dk(r|\}}}tj|||�St|�dk(rQ|\}}|dk(rtj||d�Stj||dzd�tj
d�z
St
d��cc}w)z9Convert a date string in ISO 8601 into a datetime object.�-�����zDate not in ISO 8601 format.)�split�int�len�datetime�date�	timedelta�
ValueError)r�x�parts�year�month�days      �-/usr/lib/python3/dist-packages/distro_info.py�convert_daters���#�\�\�#�.�/��S��V�/�E�/�
�5�z�Q��"���u�c��}�}�T�5�#�.�.�
�5�z�Q���
��u��B�;��=�=��u�b�1�1��}�}�T�5�1�9�a�0�8�3E�3E�a�3H�H�H�
�3�
4�4��
0s�B=c��y)z4Get the data directory based on the module location.z/usr/share/distro-info�r�r�
_get_data_dirr%s��#rc�$��eZdZdZd�fd�Z�xZS)�DistroDataOutdatedzDistribution data outdated.c�$��t�|�d�y)Nz�Distribution data outdated. Please check for an update for distro-info-data. See /usr/share/doc/distro-info-data/README.Debian for details.��super�__init__��self�	__class__s �rr#zDistroDataOutdated.__init__-s���
���
M�	
r�rN)�__name__�
__module__�__qualname__�__doc__r#�
__classcell__�r&s@rrr*s���%�
�
rrc��eZdZdZ						ddedededejdejejdejejd	ejejd
ejejdejejdejejd
dfd�Z	dejd
e
fd�Zy)�
DistroReleasez"Represents a distributions releaseN�version�codename�series�created�release�eol�eol_esm�eol_lts�eol_elts�
eol_serverrc��||_||_||_||_||_||_||_|	|_||_|
|_	y�N)
r0r1r2r3r4r5r7r8r6r9)r%r0r1r2r3r4r5r6r7r8r9s           rr#zDistroRelease.__init__:sJ����� ��
���������������� ��
����$��rrc��||jk\xr@|jduxs0||jkxs|jduxr||jkS)z:Check whether this release is supported on the given date.N)r3r5r9)r%rs  r�is_supportedzDistroRelease.is_supportedSsV���t�|�|�#�
��H�H���
I��t�x�x��
I����t�+�G�����0G�	
r)NNNNNN)r(r)r*r+�strrr�typing�Optionalr#�boolr=rrrr/r/4s���,�37�.2�26�26�37�59�%��%��%��	%�
���%�������/�
%��_�_�X�]�]�
+�%�������/�%�������/�%��/�/�(�-�-�0�%��O�O�H�M�M�2�%�
�%�2
����
�4�
rr/�row�columnc�@�|j|�}|syt|�Sr;)�getr)rBrC�date_strings   r�	_get_daterG\s ���'�'�&�/�K�����$�$rc�J�eZdZdZdeddfd�Zedeefd��Zddedee	jeeffd	�Zd
e
jdeefd�Z		dded
e	j e
jd
e	j ede	jeedffd�Zdded
e	j ede	j efd�Z	dd
e	j e
jdede	jeeffd�Zdedede	jeeffd�Z	dd
e	j e
jdede	jeeffd�Z	dd
e	j e
jdedee	jeeffd�Zdedefd�Z	dd
e	j e
jdedee	jeeffd�Zy)�
DistroInfozzBase class for distribution information.
    Use DebianDistroInfo or UbuntuDistroInfo instead of using this directly.
    �distrorNc�V�||_tjjt	�|j�dz�}t
|d��5}tj|�}g|_	|D]�}t|d|d|dt|d�t|d�t|d	�t|d
�t|d�t|d�t|d
��
}|jj|���	ddd�tjj!�|_y#1swY�-xYw)Nz.csvzutf-8)�encodingr0r1r2r3r4r5zeol-esmzeol-ltszeol-eltsz
eol-server)�_distro�os�path�joinr�lower�open�csv�
DictReader�	_releasesr/rrG�appendrr�today�_date)r%rJ�filename�csvfile�
csv_readerrBr4s       rr#zDistroInfo.__init__hs������7�7�<�<�
������&�1H�I��
�(�W�
-�	/������0�J��D�N�!�

/��'��	�N��
�O���M� ��Y��0��c�9�-��c�5�)��c�9�-��c�9�-��c�:�.��c�<�0������%�%�g�.�

/�	/�"�]�]�(�(�*��
�#	/�	/�s
�B$D�D(c�T�|jD�cgc]}|j��c}Scc}w)z*List codenames of all known distributions.)rUr2)r%rs  r�allzDistroInfo.all~s ��#'�.�.�1�Q����1�1��1s�%r1�resultc�`�|jD�cgc]}|j||���c}Scc}w)zList all known distributions.)rU�_format)r%r^rs   r�get_allzDistroInfo.get_all�s%��15���@�A����V�Q�'�@�@��@s�+rc�`�|jD�cgc]}||jk\s�|��c}Scc}w)z?Return all distributions that were available on the given date.)rUr3)r%rrs   r�_availzDistroInfo._avail�s%���>�>�?�a�T�Q�Y�Y�->��?�?��?s�+�+r4�defaultc��|S)z3Map codename aliases to the codename they describe.r�r%r4rrds    rr1zDistroInfo.codename�s	���r�namec�x�|jD]*}||j|jfvs�|jcS|S)z!Map codename or series to version)rUr1r2r0)r%rgrdr4s    rr0zDistroInfo.version�s=���~�~�	'�G���(�(�'�.�.�9�9����&�	'��rc��|�|j}|j|�D�cgc]:}|j�*||jkr|j�||jkr|��<}}|s
t	��|j||d�Scc}w)�<Get latest development distribution based on the given date.����rXrcr4r5rr`�r%rr^r�distross     r�develzDistroInfo.devel�s����<��:�:�D��[�[��&�
���y�y� �T�A�I�I�%5�1�5�5�=�D�TU�TY�TY�M�
�
��
�
�$�&�&��|�|�F�G�B�K�0�0��
��?B�
format_stringc���|dk(r|S|dk(r|jS|dk(r/|jdz|jzdz|jzdzS|dk(r|jSt	d|zd	z��)
z"Format a given distribution entry.�objectr1�fullname� z "�"r4zQOnly codename, fullname, object, and release are allowed result values, but not 'z'.)r2rMr0r1r)r%rqr4s   rr`zDistroInfo._format�s����H�$��N��J�&��>�>�!��J�&��<�<�#�%����7�$�>��AQ�AQ�Q�TW�W�W��I�%��?�?�"��
'�)6�
7�9=�
>�
�	
rc��|�|j}|j|�D�cgc]:}|j�,||jk\r|j�||jkr|��<}}|s
t	��|j||d�Scc}w)z7Get latest stable distribution based on the given date.rkrlrms     r�stablezDistroInfo.stable�s����<��:�:�D��[�[��&�
���y�y�$�����):����
�QU�YZ�Y^�Y^�Q^�
�
��
�
�$�&�&��|�|�F�G�B�K�0�0��
rpc��t��)z@Get list of all supported distributions based on the given date.)�NotImplementedError)r%rr^s   r�	supportedzDistroInfo.supported�s
��"�#�#rc��||jvS)�%Check if the given codename is known.)r]�r%r1s  r�validzDistroInfo.valid�s���4�8�8�#�#rc���|�|j}|j|�}|j|�D�cgc]#}|j|vs�|j	||���%}}|Scc}w)zBGet list of all unsupported distributions based on the given date.)rXr{rcr2r`)r%rr^r{rrns      r�unsupportedzDistroInfo.unsupported�s^���<��:�:�D��N�N�4�(�	�48�K�K��4E�c�q����Yb�Ib�4�<�<���*�c��c����ds�A�A)r1�NNr;�Nr1)r(r)r*r+r>r#�property�listr]r?�Unionr/rarrrcr@r1r0ror`rxr{rArr�rrrrIrIcsL���+�s�+�t�+�,�2�T�#�Y�2��2�A�c�A�4����]�TW�EW�8X�3Y�A�@�8�=�=�@�T�-�-@�@�04�(,�	����o�o�h�m�m�,������%�	�

���m�S�$�.�	/���C��&�/�/�#�*>��&�/�/�Z]�J^��JT�
1��O�O�H�M�M�2�
1�CF�
1�	���m�S�(�	)�
1�
� �
�+8�
�	���m�S�(�	)�
�&JT�
1��O�O�H�M�M�2�
1�CF�
1�	���m�S�(�	)�
1� JT�$��O�O�H�M�M�2�$�CF�$�	
�f�l�l�=�#�-�.�	/�$�$�c�$�d�$�
JT���O�O�H�M�M�2��CF��	
�f�l�l�=�#�-�.�	/�rrIc�$��eZdZdZd�fd�Z		ddedejejdejedejeedffd�Z	ddejejd
edejeeffd�Z
	ddejejd
edejeeffd�Z	ddejejd
edeejeeffd
�Z	ddejejd
edeejeeffd�Z	ddejejd
edeejeeffd�Z	ddejejd
edejeeffd�Zd	edefd�Z�xZS)�DebianDistroInfoz1provides information about Debian's distributionsrNc�$��t�|�d�y)N�Debianr!r$s �rr#zDebianDistroInfo.__init__�����
����"rr4rrdc��|dk(r|j|�S|dk(r|j|�S|dk(r|j|�S|dk(r|j|�S|S)z3Map 'unstable', 'testing', etc. to their codenames.�unstable�testingrx�	oldstable)ror�rx�oldrfs    rr1zDebianDistroInfo.codename�sd���j� ��:�:�d�#�#��i���<�<��%�%��h���;�;�t�$�$��k�!��8�8�D�>�!��rr1r^c�*�|�|j}|j|�D�cgc]:}|j�*||jkr|j�||jkr|��<}}t	|�dkr
t��|j
||d�Scc}w)rjr���)rXrcr4r5rrr`rms     rrozDebianDistroInfo.devel�s����<��:�:�D��[�[��&�
���y�y� �T�A�I�I�%5�1�5�5�=�D�TU�TY�TY�M�
�
��
�
�w�<�!��$�&�&��|�|�F�G�B�K�0�0��
s�?Bc��|�|j}|j|�D�cgc]!}|j��||jk\s� |��#}}t|�dkr
t	��|j||d�Scc}w)z=Get old (stable) Debian distribution based on the given date.rr�)rXrcr4rrr`rms     rr�zDebianDistroInfo.oldsu���<��:�:�D�"�k�k�$�/�_��1�9�9�3H�T�UV�U^�U^�M^�1�_��_��w�<�!��$�&�&��|�|�F�G�B�K�0�0��`s�A7�A7�A7c��|�|j}|j|�D�cgc]0}|j�||jks�|j||���2}}|Scc}w)zOGet list of all supported Debian distributions based on the given
        date.)rXrcr5r`rms     rr{zDebianDistroInfo.supportedsc��
�<��:�:�D�-1�[�[��->�
�()�!�%�%�-�SW�[\�[`�[`�S`�D�L�L���#�
��
����
s� A�Ac���|�|j}|j|�D�cgc]J}|j�<||jkDr-|j�!||jkr|j	||���L}}|Scc}w)zSGet list of all LTS supported Debian distributions based on the given
        date.)rXrcr5r7r`rms     r�
lts_supportedzDebianDistroInfo.lts_supportedsz��
�<��:�:�D��[�[��&�
�����!�d�Q�U�U�l����&�4�1�9�9�+<�
�L�L���#�
��
����

��AA5c���|�|j}|j|�D�cgc]J}|j�<||jkDr-|j�!||jkr|j	||���L}}|Scc}w)z\Get list of all Extended LTS supported Debian distributions based on
        the given date.)rXrcr7r8r`rms     r�elts_supportedzDebianDistroInfo.elts_supported-s{��
�<��:�:�D��[�[��&�
���	�	�%�$����*:����'�D�A�J�J�,>�
�L�L���#�
��
����

r�c�B�|�|j}|j|�D�cgc]R}|j�|js6|j�,||jkr|j�||jkr|��T}}|s
t��|j
||d�Scc}w)z?Get latest testing Debian distribution based on the given date.rk)rXrcr4r0r5rr`rms     rr�zDebianDistroInfo.testing<s����<��:�:�D��[�[��&�
���	�	�!�a�i�i��	�	�%�$����*:����
�QU�YZ�Y^�Y^�Q^�
�
��
��$�&�&��|�|�F�G�B�K�0�0��
s�ABc�:�tj||�xs|dvS)r})r�r�rxr�)rIrr~s  rrzDebianDistroInfo.validLs)������h�/�
�8�@
�4
�	
rr'r�r�)r(r)r*r+r#r>r?r@rrr�r/r1ror�r�r{r�r�r�rArr,r-s@rr�r��s���;�#�04�(,�	����o�o�h�m�m�,������%�	�

���m�S�$�.�	/��$JT�
1��O�O�H�M�M�2�
1�CF�
1�	���m�S�(�	)�
1� JT�	1��O�O�H�M�M�2�	1�CF�	1�	���m�S�(�	)�	1�JT�
��O�O�H�M�M�2�
�CF�
�	
�f�l�l�=�#�-�.�	/�
�JT�
��O�O�H�M�M�2�
�CF�
�	
�f�l�l�=�#�-�.�	/�
� JT�
��O�O�H�M�M�2�
�CF�
�	
�f�l�l�=�#�-�.�	/�
� JT�1��O�O�H�M�M�2�1�CF�1�	���m�S�(�	)�1� 
�c�
�d�
rr�c
�l��eZdZdZd�fd�Z	ddejejde	dejee	ffd�Zde	de
fd�Z	ddejejde	deejee	ffd	�Z	ddejejde	deejee	ffd
�Z�xZS)
�UbuntuDistroInfoz1provides information about Ubuntu's distributionsrc�$��t�|�d�y)N�Ubuntur!r$s �rr#zUbuntuDistroInfo.__init__Yr�rr1rr^c�L�|�|j}|jD�cgc]\}|jjd�dk\r<|jr0|j
r$|j|cxkr|j
krnn|��^}}|s
t
��|j||d�Scc}w)zWGet latest long term support (LTS) Ubuntu distribution based on the
        given date.�LTSrrk)rXrUr0�findr4r5rr`rms     r�ltszUbuntuDistroInfo.lts\s���
�<��:�:�D��^�^�
���y�y�~�~�e�$��)�a�i�i�A�E�E�a�i�i�SW�F`�[\�[`�[`�F`�
�
��
�
�$�&�&��|�|�F�G�B�K�0�0��
s�A!B!c��|jD�cgc]}|j|k(s�|��}}|syd|djvScc}w)zIs codename an LTS release?Fr�r)rUr2r0)r%r1rrns    r�is_ltszUbuntuDistroInfo.is_ltslsE��"�n�n�E�����H�0D�1�E��E������
�*�*�*�*��Fs�>�>c���|�|j}|j|�D�cgc]J}|jr||jks|j�!||jkr|j	||���L}}|Scc}w)zOGet list of all supported Ubuntu distributions based on the given
        date.)rXrcr5r9r`rms     rr{zUbuntuDistroInfo.supportedssy��
�<��:�:�D��[�[��&�
�����$�!�%�%�-�Q�\�\�-E�$�RS�R^�R^�J^�
�L�L���#�
��
�
���
r�c��|�|j}|j|�D�cgc]/}|j�!||jkr|j||���1}}|Scc}w)zSGet list of all ESM supported Ubuntu distributions based on the
        given date.)rXrcr6r`rms     r�
supported_esmzUbuntuDistroInfo.supported_esm�sf��
�<��:�:�D��[�[��&�
���y�y�$�����):�
�L�L���#�
��
�
���
s�4Ar'r�)r(r)r*r+r#r?r@rrr>r�r/r�rAr�r�r{r�r,r-s@rr�r�Vs����;�#�JT�1��O�O�H�M�M�2�1�CF�1�	���m�S�(�	)�1� +�s�+�t�+�JT���O�O�H�M�M�2��CF��	
�f�l�l�=�#�-�.�	/��JT���O�O�H�M�M�2��CF��	
�f�l�l�=�#�-�.�	/�rr�)r+rSrrNr?r>rrr�	Exceptionrr/�dictr@rGrIr�r�rrr�<module>r�s���E�
��	�
�5��5����5�$�s�$�

��
�%
�%
�P%�4��S��>�%�3�%�6�?�?�8�=�=�3Q�%�{�{�|r
�z�r
�j7�z�7r

Zerion Mini Shell 1.0