%PDF- %PDF-
Mini Shell

Mini Shell

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

�

Cf�cg����dZddlZddlZddlZddlZddlZ	ddlZ	ddl	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZeeeeeeeeefZddlmZej4d�ZGd�de�ZGd�d	e�ZGd
�de�ZGd�d
e �Z!ejDdddizejF�Z$ejDd�Z%ejDd�Z&ejDd�Z'ejDd�Z(ejDd�Z)ejDdejF�Z*ejDdejF�Z+ejDdejF�Z,ejDdejF�Z-ejDdejF�Z.ejDd�Z/ejDd�Z0ejDd�Z1ejDdejF�Z2ejDdejF�Z3ejDd �Z4ejDd!�Z5ejDd"ejF�Z6ejDd#ejF�Z7ejDd$ejF�Z8ejDd%ejF�Z9ejDd&ejF�Z:ejDd'�Z;Gd(�d)e �Z<d*�Z=d,d+�Z>y#e$rY���wxYw#e$rY���wxYw)-a�
 Facilities for reading and writing Debian changelogs

The aim of this module is to provide programmatic access to Debian changelogs
to query and manipulate them. The format for the changelog is defined in
`deb-changelog(5)
<https://manpages.debian.org/stretch/dpkg-dev/deb-changelog.5.html>`_

Stability: The API is not marked as stable but hasn't changed incompatibly
since 2007. Potential users of these classes are asked to work with the
`python-debian` maintainers to improve, extend and stabilise this API.

Overview
========

Create a changelog object using the constuctor. Pass it the contents of the
file if there are some entries, or ``None`` to create an empty changelog::

    >>> import debian.changelog
    >>> ch = debian.changelog.Changelog()
    >>> maintainer, email = 'John Doe', 'joe@example.com'
    >>> timestamp = 1617222715
    >>> # You might want to use get_maintainer() a la:
    >>> # maintainer, email = debian.changelog.get_maintainer()
    >>> ch.new_block(
    ...     package='example',
    ...     version='0.1',
    ...     distributions='unstable',
    ...     urgency='low',
    ...     author="%s <%s>" % (maintainer, email),
    ...     # You can also omit timestamp, if you are fine with "now"
    ...     # We use a hard-coded timestamp for deterministic output
    ...     date=debian.changelog.format_date(timestamp=1617222715, localtime=False)
    ... )
    >>> ch.add_change('')
    >>> ch.add_change(' * Some change')
    >>> ch.add_change('')
    >>> print(ch, end='')
    example (0.1) unstable; urgency=low
    <BLANKLINE>
     * Some change
    <BLANKLINE>
     -- John Doe <joe@example.com>  Wed, 31 Mar 2021 20:31:55 -0000


If you have the full contents of a changelog, but are only interested in the
most recent versions you can pass the ``max_blocks`` keyword parameter to the
constuctor to limit the number of blocks of the changelog that will be parsed.
If you are only interested in the most recent version of the package then pass
``max_blocks=1``::

    >>> import gzip
    >>> from debian.changelog import Changelog
    >>> with gzip.open('/usr/share/doc/dpkg/changelog.Debian.gz') as fh:  # doctest: +SKIP
    ...     ch = Changelog(fh, max_blocks=1)
    >>> print('''
    ...     Package: %s
    ...     Version: %s
    ...     Urgency: %s''' % (ch.package, ch.version, ch.urgency))  # doctest: +SKIP
        Package: dpkg
        Version: 1.18.24
        Urgency: medium


See `/usr/share/doc/python-debian/examples/changelog/` or the
`git repository
<https://salsa.debian.org/python-debian-team/python-debian/tree/master/
examples/changelog>`_
for examples of usage.


The :class:`Changelog` class is the key class within this module.

Changelog Classes
-----------------
�N)�Any�Dict�Iterable�Iterator�IO�List�Optional�Pattern�Union�Text�Tuple�TypeVar)�Versionzdebian.changelogc�,��eZdZdZdZ�fd�Zd�Z�xZS)�ChangelogParseErrorz0Indicates that the changelog could not be parsedTc�8��||_tt|��y�N)�_line�superr�__init__)�self�line�	__class__s  ��2/usr/lib/python3/dist-packages/debian/changelog.pyrzChangelogParseError.__init__�s�����
�
�!�4�1�3�c� �d|jzS)NzCould not parse changelog: )r�rs r�__str__zChangelogParseError.__str__�s��,�T�Z�Z�7�7r��__name__�
__module__�__qualname__�__doc__�
is_user_errorrr�
__classcell__�rs@rrr�s���:��M�4�
8rrc��eZdZdZy)�ChangelogCreateErrorz`Indicates that changelog could not be created, as all the information
    required was not givenN)r r!r"r#�rrr(r(�s��rr(c�,��eZdZdZdZ�fd�Zd�Z�xZS)�VersionErrorzBIndicates that the version does not conform to the required formatTc�8��||_tt|��yr)�_versionrr+r)r�versionrs  �rrzVersionError.__init__�s�����
�
�l�D�*�,rc� �d|jzS)NzCould not parse version: )r-rs rrzVersionError.__str__�s��*�T�]�]�:�:rrr&s@rr+r+�s���L��M�-�
;rr+c��eZdZdZ										dd�Zd�Zd�Zeeed��Zd�Z	d	�Z
d
�Zd�Zd�Z
ed
��Zed��Zdd�Zd�Zd�Zy)�ChangeBlocka!Holds all the information about one block from the changelog.

    See `deb-changelog(5)
    <https://manpages.debian.org/stretch/dpkg-dev/deb-changelog.5.html>`_
    for more details about the format of the changelog block and the
    necessary data.

    :param package: str, name of the package
    :param version: str or Version, version of the package
    :param distributions: str, distributions to which the package is
        released
    :param urgency: str, urgency of the upload
    :param urgency_comment: str, comment about the urgency setting
    :param changes: list of str, individual changelog entries for this
        block
    :param author: str, name and email address of the changelog author
    :param date: str, date of the changelog in RFC822 (`date -R`) format
    :param other_pairs: dict, key=value pairs from the header of the
        changelog, other than the urgency value that is specified
        separately
    :param encoding: specify the encoding to be used; note that Debian
        Policy mandates the use of UTF-8.
    Nc��d|_|j|�||_||_|xsd|_|xsd|_|xsg|_||_||_g|_	|	xsi|_
|
|_d|_d|_
y)N�unknown�F�  )�_raw_version�_set_version�package�
distributions�urgency�urgency_comment�_changes�author�date�	_trailing�other_pairs�	_encoding�_no_trailer�_trailer_separator)rr8r.r9r:r;�changesr=r>r@�encodings           rrzChangeBlock.__init__�s���!������'�"����*����+�)���.�4�"����
�2��
������	����&�,�"���!��� ���"&��rc�F�|j�yt|j�Sr)r6rrs r�_get_versionzChangeBlock._get_version�s"�����$���t�(�(�)�)rc�8�|�t|�|_yd|_yr)�strr6�rr.s  rr7zChangeBlock._set_version�s���� #�G��D�� $�D�rz/The package version that this block pertains to��docc���i}|jj�D]M\}}|dj�|ddj�z}tj|�}|�d|z}|||<�O|S)z: Obtain a dict from the block header (other than urgency) r�NzXS-%s)r@�items�upper�lower�xbcs_re�match)r�	norm_dict�key�value�ms     r�other_keys_normalisedz!ChangeBlock.other_keys_normalised�sx���	� �,�,�2�2�4�	#�L�S�%��a�&�,�,�.�3�q�r�7�=�=�?�2�C��
�
�c�"�A��y���m��"�I�c�N�	#��rc��|jS)z; Get the changelog entries for this block as a list of str )r<rs rrDzChangeBlock.changess���}�}�rc�:�|jj|�y)z, Add a sign-off (trailer) line to the block N)r?�append)rrs  r�add_trailing_linezChangeBlock.add_trailing_lines��	
�����d�#rc�>�|js	|g|_y|j}|j�d}t|�D]2\}}tj	|�}|��|j||�d}n|j�|s|j
|�||_y)z$ Append a change entry to the block FNT)r<�reverse�	enumerate�	blanklinerS�insertr[)r�changerD�added�i�ch_entryrWs       r�
add_changezChangeBlock.add_changes����}�}�#�H�D�M��m�m�G��O�O���E�(��1�
���8��O�O�H�-���9��N�N�1�f�-� �E��
�
�O�O������v�&�#�D�Mrc	��dj|j�}g}|j|�D]W}|jd�}t	jd|�D]+}|jt
|jd����-�Y|S)N� rz\d+)�joinr<�finditer�group�rer[�int)r�type_rerD�bugsrS�closes_list�bugmatchs       r�_get_bugs_closed_genericz$ChangeBlock._get_bugs_closed_generic's{���(�(�4�=�=�)�����%�%�g�.�	4�E��+�+�a�.�K��K�K���<�
4�����C����q� 1�2�3�
4�	4��rc�,�|jt�S)z+ List of (Debian) bugs closed by the block )rr�closesrs r�bugs_closedzChangeBlock.bugs_closed1s���,�,�V�4�4rc�,�|jt�S)z, List of Launchpad bugs closed by the block )rr�closeslprs r�lp_bugs_closedzChangeBlock.lp_bugs_closed7s���,�,�X�6�6rc�h�d}|j�td��||jdzz
}|j�td��|d|jzdzz
}|j�td��||jdzz
}|j�td	��|d
|jz|j
zz
}|jj�D]\}}|d|�d|��z
}�|d
z
}|j��td��|j�D]
}||d
zz
}�|jsl|dz
}|j�|d|jzz
}n
|std��|j�||j|jzz
}n
|std��|d
z
}|jD]
}||d
zz
}�|S)Nr4zPackage not specifiedrhzVersion not specified�(z) zDistribution not specifiedz; zUrgency not specifiedzurgency=z, �=�
zChanges not specifiedz --zAuthor not specifiedzDate not specified)r8r(r6r9r:r;r@rOrDrBr=r>rCr?)r�allow_missing_author�blockrUrVrbrs       r�_formatzChangeBlock._format=s������<�<��&�'>�?�?�
�����#�#�����$�&�'>�?�?�
��t�(�(�(�4�/�/�����%�&�'C�D�D�
��#�#�d�*�*���<�<��&�'>�?�?�
��d�l�l�*�T�-A�-A�A�A�� �,�,�2�2�4�	.�L�S�%��#�u�-�-�E�	.�
��
���<�<�>�!�&�'>�?�?��l�l�n�	#�F��V�d�]�"�E�	#�����U�N�E��{�{�&���t�{�{�*�*��)�*�+A�B�B��y�y�$���0�0�4�9�9�<�<��)�*�+?�@�@��T�M�E��N�N�	!�D��T�D�[� �E�	!��rc�"�|j�Sr�rrs rrzChangeBlock.__str__c����|�|�~�rc�J�t|�j|j�Sr�rI�encoderArs r�	__bytes__zChangeBlock.__bytes__g����4�y������/�/r)
NNNNNNNNN�utf-8�F)r r!r"r#rrGr7�propertyr.rXrDr\rfrrrurxrrr�r)rrr1r1�s����2��#��!%����!�!�'�8*�%���l�=��G�

��
$�
$�,��5��5�
�7��7�
$�L�0rr1z?^(\w%(name_chars)s*) \(([^\(\) \t]+)\)((\s+%(name_chars)s+)+)\;�
name_charsz[-+0-9a-z.]z^\s*$z	^\s\s+.*$z[^ -- (.*) <(.*)>(  ?)((\w+\,\s*)?\d{1,2}\s+\w+\s+\d{4}\s+\d{1,2}:\d\d:\d\d\s+[-+]\d{4}\s*)$z`^ --(?: (.*) <(.*)>(  ?)((\w+\,\s*)?\d{1,2}\s+\w+\s+\d{4}\s+\d{1,2}:\d\d:\d\d\s+[-+]\d{4}))?\s*$z^(.*)\s+<(.*)>$z^([-0-9a-z]+)=\s*(.*\S)$z^([-0-9a-z]+)((\s+.*)?)$z	^X[BCS]+-z^(;;\s*)?Local variables:z^vim:z^\$\w+:.*\$z^\# z	^/\*.*\*/z5closes:\s*(?:bug)?\#?\s?\d+(?:,\s*(?:bug)?\#?\s?\d+)*zlp:\s+\#\d+(?:,\s*\#\d+)*zW^(\w+\s+\w+\s+\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}\s+[\w\s]*\d{4})\s+(.*)\s+(<|\()(.*)(\)|>)z:^(\w+\s+\w+\s+\d{1,2},?\s*\d{4})\s+(.*)\s+(<|\()(.*)(\)|>)z&^(\w[-+0-9a-z.]*) \(([^\(\) \t]+)\)\;?z"^([\w.+-]+)(-| )(\S+) Debian (\S+)z#^Changes from version (.*) to (.*):z$^Changes for [\w.+-]+-[\w.+-]+:?\s*$z^Old Changelog:\s*$z^(?:\d+:)?\w[\w.+~-]*:?\s*$c���eZdZdZ					d.d�Zed��Z				d/d�Zd�Zd�Z	e
ee	d�	�Ze
d
�d�	�Ze
d�d
�	�Z
e
d�d�	�Ze
d�d�	�Ze
d�d�	�Zd�Zd�Ze
eed�	�Zd�Ze
d��Zd�Zd0d�Zd�Zd�Zd�Zd�Zd�Zd�Ze
d �ed!�	�Zd"�Ze
d#�ed$�	�Z d%�Z!d&�Z"e
d'�e"d(�	�Z#d)�Z$e
d*�e$d+�	�Z%										d1d,�Z&d-�Z'y)2�	ChangelogaL	Represents a debian/changelog file.

    To get the properly formatted changelog back out of the object
    merely call `str()` on it. The returned string should be a properly
    formatted changelog.

    :param file: str, list of str, or file-like.
        The contents of the changelog, either as a ``str``, ``unicode`` object,
        or an iterator of lines such as a filehandle, (each line is either a
        ``str`` or ``unicode``)
    :param max_blocks: int, optional (Default: ``None``, no limit)
        The maximum number of blocks to parse from the input.
    :param allow_empty_author: bool, optional (Default: `False`),
        Whether to allow an empty author in the trailer line of a change
        block.
    :param strict: bool, optional (Default: ``False``, use a warning)
        Whether to raise an exception if there are errors.
    :param encoding: str,
        If the input is a str or iterator of str, the encoding to use when
        interpreting the input.

    There are a number of errors that may be thrown by the module:

    - :class:`ChangelogParseError`:
      Indicates that the changelog could not be parsed, i.e. there is a line
      that does not conform to the requirements, or a line was found out of
      its normal position. May be thrown when using the method
      `parse_changelog`.
      The constructor will not throw this exception.
    - :class:`ChangelogCreateError`:
      Some information required to create the changelog was not available.
      This can be thrown when `str()` is used on the object, and will occur
      if a required value is `None`.
    - :class:`VersionError`:
      The string used to create a Version object cannot be parsed as it
      doesn't conform to the specification of a version number. Can be
      thrown when creating a Changelog object from an existing changelog,
      or instantiating a Version object directly to assign to the version
      attribute of a Changelog object.

    If you have a changelog that may have no author information yet as
    it is still a work in progress, i.e. the author line is just::

        --

    rather than::

        -- Author <author@debian.org>  Thu, 12 Dec 2006 12:23:34 +0000

    then you can pass ``allow_empty_author=True`` to the Changelog
    constructor. If you do this then the ``author`` and ``date``
    attributes may be ``None``.

    Nc�^�||_g|_g|_|�|j||||��yy)N)�
max_blocks�allow_empty_author�strict)rA�_blocks�initial_blank_lines�parse_changelog)r�filer�r�r�rEs      rrzChangelog.__init__�sC��"������#%�� ���� � ���#5��
!�
�rc�H�|rt|��tj|�yr)r�logger�warning)�messager�s  r�_parse_errorzChangelog._parse_error�s���%�g�.�.����w�rc��d}d}d}d}	d}
|xs|j}|�|jd|�yg|_g|_t	|��}g}|}
d}t|t�r|j|�}t|t�r3|j�s|jd|�y|j�}|D�]�}t|t�s|j|�}|jd	�}|
||fv�rAtj|�}tj|�}|���|�t|j�|k\ry|j!d
�|_|j!d�|_|j!d�j'�|_|j+d
d
�d
}i}i}|j+d�D�]#}|j�}t,j|�}|�|jd|z|��A|j!d
�}|j!d�}|j/�|vr#|jd|j/�z|�|||j/�<|j/�dk(rat0j|�}|�|jd|z|���|j!d
�|_|j!d�}|���||_��|||<��&||_|}
��2|�B|
|k(r|jj9|���V|jdj;|���vt<j|�}t>j|�}t@j|�}tBj|�}tDj|�}|�|�)|
|k7r$|jdj;|�|
}|
}
��|�|�|�A|
|k(r|jj9|�n|jdj;|���StFj|���tHj|��~tJj|��itLj|��TtNj|��?tPj|��*tRj|��tTj|��)|
|k7r$|jdj;|�|
}|
}
��$|jd|
�d|��|�|
|k(r|jj9|���^|jdj;|���~|
||	fv�rtVj|�} tXj|�}!tZj|�}"tj|�}| �|j9|�|	}
���|!��|!j!d�dk7r+|jd|z|�|!j!d�|_.|!j!d
��d|!j!d��d�|_/|!j!d�|_0||_1|jj9|�g}t	|��}|}
���|"�M|s|jd|z|����||_1|jj9|�g}t	|��}|}
���|�|j9|���
t@j|�}tBj|�}tDj|�}|�|�|�|j9|���b|jd|
�d|��|�|j9|����|
|
k(r8||k(r |jdj;|����|j9|����Jd|
z��|
||
fvs
|
|
k(rE||k7r?|jd|
z|�||_1d|_2|jj9|�yyy)ag Read and parse a changelog file

        If you create an Changelog object without specifying a changelog
        file, you can parse a changelog file with this method. If the
        changelog doesn't parse cleanly, a :class:`ChangelogParseError`
        exception is thrown. The constructor will parse the changelog on
        a best effort basis.
        z
first headingznext heading of EOFzstart of change datazmore change data or trailerzslurp to endNzEmpty changelog file.�rEr|rN���;�,z$Invalid key-value pair after ';': %szRepeated key-value: %sr:z!Badly formatted urgency value: %s���z"Unexpected line while looking for z: r5z Badly formatted trailer line: %sz <�>�zUnknown state: %szFound eof where expected %sT)3rAr�r�r�r1�
isinstance�bytes�decoderI�strip�
splitlines�rstrip�toplinerSr`�lenrkr8r6�lstripr9�split�keyvaluerQ�value_rer:r;r@r[r\�emacs_variables�
vim_variables�cvs_keyword�comments�
more_comments�old_format_re1�old_format_re2�old_format_re3�old_format_re4�old_format_re5�old_format_re6�old_format_re7�old_format_re8�changere�endline�endline_nodetailsrCr=r>r<rB)#rr�r�r�r�rE�
first_heading�next_heading_or_eof�start_of_change_data�more_changes_or_trailer�slurp_to_end�
current_blockrD�state�	old_stater�	top_match�blank_match�pairs�all_keysr@�pair�kv_matchrUrV�	val_match�comment�emacs_match�	vim_match�	cvs_match�comments_match�more_comments_match�change_match�	end_match�end_no_details_matchs#                                   rr�zChangelog.parse_changelog�si�� (�
�3��5��"?��%���-�t�~�~���<����5�v�>�����#%�� �#�X�6�
������	��d�E�"��;�;�x�(�D��d�C� ��:�:�<��!�!�"9�6�B���?�?�$�D��R	:�D��d�C�(��{�{�8�,���;�;�t�$�D���(;�<�<�#�M�M�$�/�	�'�o�o�d�3���(�"�.� #�D�L�L� 1�Z� ?��,5�O�O�A�,>�M�)�1:����1C�M�.�2;�/�/�!�2D�2K�2K�2M�M�/� �J�J�s�A�.�q�1�E�!�H�"$�K� %���C� 0�5��#�z�z�|��#+�>�>�$�#7��#�+� �-�-� F�� M� &�(�%�&�n�n�Q�/�� (���q� 1���9�9�;�(�2� �-�-�!%�'*�y�y�{�!3�4:�<�16������-��9�9�;�)�3�(0���u�(=�I�(�0� $� 1� 1�$G�$)�%*�+1�!3�9B����8J�
� 5�*3�/�/�!�*<��#*�#6�DK�M�$A�/4�K��,�75�81<�M�-�0�E� �,��
�-��0�0�7�7��=����R�(�:�:�4�@�"1�"7�"7��"=�K� -� 3� 3�D� 9�I� +� 1� 1�$� 7�I�%-�^�^�D�%9�N�*7�*=�*=�d�*C�'�$�0�I�4I� %�� 6����R�(�:�:�4�@�$)�	� ,�� �!�-��1K�2�>� �M�1� �4�4�;�;�D�A� �L�L��,�>�>�t�D� �'�-�-�d�3�?�*�0�0��6�B�*�0�0��6�B�*�0�0��6�B�*�0�0��6�B�*�0�0��6�B�*�0�0��6�B�*�0�0��6�B� %�� 6����R�(�:�:�4�@�$)�	� ,�� ��%�%���&�'-�/��
�-��0�0�7�7��=����R�(�:�:�4�@��/�1H�I�I�'�~�~�d�3��#�M�M�$�/�	�'8�'>�'>�t�'D�$�'�o�o�d�3���+��N�N�4�(�3�E��*� ���q�)�T�1��)�)�>��E�v�O�;D�?�?�1�;M�
�8�$�?�?�1�-�y���q�/A�,C�M�(�)2����);�M�&�-4�M�*��L�L�'�'�
�6� �G�$/��$B�M�/�E�)�5�-��)�)�>��E�v�O� �-4�M�*��L�L�'�'�
�6� �G�$/��$B�M�/�E� �,��N�N�4�(� +� 1� 1�$� 7�I�%-�^�^�D�%9�N�*7�*=�*=�d�*C�'�!�-��1K�2�>����t�,� ��%�%���&�'-�/��N�N�4�(��,�&�� 3�3��L�L��$�6�6�t�<��N�N�4�(�9�1�E�9�9�u�eR	:�h
�-�|�<�<��\�)�!�%8�8����-��5�v�
?�%,�M�"�(,�M�%��L�L���
�.�9�*rc�4�|jdjS)z,Return a Version object for the last versionr�r�r.rs r�get_versionzChangelog.get_version�����|�|�A��&�&�&rc�>�t|�|jd_y)zwSet the version of the last changelog block

        version can be a full version string, or a Version object
        rN)rr�r.rJs  r�set_versionzChangelog.set_version�s��#*�'�"2����Q��rzhVersion object for latest changelog block.
            (Property that can both get and set the version.)rKc�.�|jjSr)r.�full_versionrs r�<lambda>zChangelog.<lambda>�s��T�\�\�.�.�rz+The full version number of the last versionc�.�|jjSr)r.�epochrs rr�zChangelog.<lambda>�s��T�\�\�'�'�rzFThe epoch number of the last revision, or `None` if no epoch was used.c�.�|jjSr�r.�debian_revisionrs rr�zChangelog.<lambda>����T�\�\�1�1�rz:The debian part of the version number of the last version.c�.�|jjSrr�rs rr�zChangelog.<lambda>�r�rc�.�|jjSr)r.�upstream_versionrs rr�zChangelog.<lambda>�s��T�\�\�2�2�rz<The upstream part of the version number of the last version.c�4�|jdjS)z2Returns the name of the package in the last entry.r�r�r8rs r�get_packagezChangelog.get_package�r�rc�,�||jd_y)z0 set the name of the package in the last entry. rNr�)rr8s  r�set_packagezChangelog.set_package�s��#*����Q��rz'Name of the package in the last versionc��|jSr)�versionsrs r�get_versionszChangelog.get_versions�s���}�}�rc�T�|jD�cgc]}|j��c}Scc}w)zjReturns a list of :class:`debian.debian_support.Version` objects
        that are listed in the changelog.r��rr~s  rr�zChangelog.versions�s ��
,0�<�<�8�%��
�
�8�8��8��%c�T�|jD�cgc]}|j��c}Scc}wr)r�r6r�s  r�
_raw_versionszChangelog._raw_versionss ��04���=�u��"�"�=�=��=r�c���g}|jD]}|j|dz��|jD]#}|j|j|����%dj	|�S)Nr|)r}r4)r�r[r�rri)rr}�piecesrr~s     rrzChangelog._formatsg�����,�,�	'�D��M�M�$��+�&�	'��\�\�	T�E��M�M�%�-�-�=Q�-�R�S�	T��w�w�v��rc�"�|j�Srr�rs rrzChangelog.__str__
r�rc�J�t|�j|j�Srr�rs rr�zChangelog.__bytes__r�rc�,�t|j�Sr)�iterr�rs r�__iter__zChangelog.__iter__s���D�L�L�!�!rc��t|t�r|t|�St|t�r|}n|jj|�}|j|S)z� select a changelog entry by number, version string, or Version

        :param n: integer or str representing a version or Version object
        )r�rIrrmr��indexr�)r�n�idxs   r�__getitem__zChangelog.__getitem__sO���a������
�#�#��a����C��-�-�%�%�a�(�C��|�|�C� � rc�,�t|j�Sr)r�r�rs r�__len__zChangelog.__len__(s���4�<�<� � rc�,�||jd_y�Nr�r�r9)rr9s  r�set_distributionszChangelog.set_distributions,s��(5����Q��%rc�4�|jdjSrrrs rr�zChangelog.<lambda>1s��T�\�\�!�_�2�2�rzfA string indicating the distributions that the package will be uploaded to
in the most recent version.c�,�||jd_yr�r�r:)rr:s  r�set_urgencyzChangelog.set_urgency7s��")����Q��rc�4�|jdjSrrrs rr�zChangelog.<lambda><s��T�\�\�!�_�,�,�rzTA string indicating the urgency with which the most recent version will
be uploaded.c�@�|jdj|�y)a� and a new dot point to a changelog entry

        Adds a change entry to the most recent version. The change entry
        should conform to the required format of the changelog (i.e. start
        with two spaces). No line wrapping or anything will be performed,
        so it is advisable to do this yourself if it is a long entry. The
        change will be appended to the current changes, no support is
        provided for per-maintainer changes.
        rN)r�rf)rrbs  rrfzChangelog.add_changeBs��	
���Q��"�"�6�*rc�,�||jd_y)z+ set the author of the top changelog entry rN�r�r=)rr=s  r�
set_authorzChangelog.set_authorOs��"(����Q��rc�4�|jdjSrrrs rr�zChangelog.<lambda>Us��T�\�\�!�_�+�+�rzj        The author of the most recent change.
        This should be a properly formatted name/email pair.c�,�||jd_y)z� set the date of the top changelog entry

        :param date: str
            a properly formatted date string (`date -R` format; see Policy)
        rN�r�r>)rr>s  r�set_datezChangelog.set_date[s�� $����Q��rc�4�|jdjSrrrs rr�zChangelog.<lambda>es��T�\�\�!�_�)�)�rz�        The date associated with the current entry.
        Should be a properly formatted string with the date and timezone.
        See the :func:`format_date()` function.c��|
xs|j}
t|||||||||	|
�
}|jr|jd�|jj	d|�y)a� Add a new changelog block to the changelog

        Start a new :class:`ChangeBlock` entry representing a new version
        of the package. The arguments (all optional) are passed directly
        to the :class:`ChangeBlock` constructor; they specify the values
        that can be provided to the `set_*` methods of this class. If
        they are omitted the associated attributes *must* be assigned to
        before the changelog is formatted as a str or written to a file.
        r4rN)rAr1r�r\ra)rr8r.r9r:r;rDr=r>r@rEr~s            r�	new_blockzChangelog.new_blockls^��,�-�t�~�~���G�W�m�#�_�#�V�T�;��J���<�<��#�#�B�'������A�u�%rc�8�|jt|��y)z� Write the changelog entry to a filehandle

        Write the changelog out to the filehandle passed. The file argument
        must be an open file object.
        N)�writerI)r�
filehandles  r�write_to_open_filezChangelog.write_to_open_file�s��	����T��#r)NNFFr�)NFTNr�)
NNNNNNNNNN)(r r!r"r#r�staticmethodr�r�r�r�r�r.r�r��debian_versionr�r�r�r�r8r�r�r�rrr�r�rrrr9rr:rfrr=rr>rrr)rrr�r��s���5�r� �$)��!��"� �� �$(�+0�#�!%�H/�T'�
3���[�
A��G��.�9��L�
�'�
 �
�E�
�1�H��N��1�H��O� �2�J���
'�
*�
��[�5��G�
��9��9�>���0�
"�!�!�6��2�4E�
��M�*��,�k�
��G�+�(�
�+�Z�
@��F�$��)�8�
3��D��� $��"&����"��&�>$rr�c�.�tj}d|vrFtj|d�}|r,d|vr|j	d�|d<|j	d�|d<d|vsd|vrJd|vrFtj|d�}|r,d|vr|j	d�|d<|j	d�|d<d}d|vr|d}nQd|vr|d}nG	tjdd	tjtj��j�}d}d|vr	|d}||fSd|vr	|d}||fSd}tjjd
�r4t!d
d��5}|j#�j%�}ddd�|st'j(�}|r?	tjtj��j*}|sd}n|�d
|��}	|r|}||fS#tttf$rY��wxYw#1swY��xYw#ttf$rd}Y�AwxYw)a�Get the maintainer information in the same manner as dch.

    This function gets the information about the current user for
    the maintainer field using environment variables of gecos
    information as appropriate.

    It uses the same algorithm as dch to get the information, namely
    DEBEMAIL, DEBFULLNAME, EMAIL, NAME, /etc/mailname and gecos.

    :returns: a tuple of the full name, email pair as strings.
        Either of the pair may be None if that value couldn't
        be determined.
    �DEBEMAIL�DEBFULLNAMErNr��EMAILN�NAMEz,.*r4z
/etc/mailnamezUTF-8r��@)�os�environ�maintainerrerSrkrl�sub�pwd�getpwuid�getuid�pw_gecos�KeyError�AttributeError�	NameError�path�exists�open�readliner��socket�getfqdn�pw_name)�env�	match_obj�
maintainer�
email_address�addr�f�users       r�get_maintainerr>�s'��
�*�*�C��S�� �&�&�s�:��7�	���C�'�%.�_�_�Q�%7��M�"�'�o�o�a�0�C�
�O����
�S� 8��c�>�$�*�*�3�w�<�8�I�� ��+�)2����);�C�
�&�(���q�1��G���J������'�
�	�3����[�
�	������C�L�L�����,E�,N�,N�O�J��M��S���J��
�2
�
�&�&�1
�C���G��
�.
�
�&�&�+��
�7�7�>�>�/�*��o��8�
,�A��z�z�|�)�)�+��
,���>�>�#�D��	
2��|�|�B�I�I�K�0�8�8��
��D�&*�D�1�D�� �M��
�&�&��?�.�)�4�	��	��
,�
,��#�I�.�
���
�s1�AG�G4�1H�G1�0G1�4G=�H�Hc�B�tjj||�S)a� format a datestamp in the required format for the changelog

    :param timestamp: float, optional. The timestamp (seconds since epoch)
        for which the date string should be created. If not specified, the
        current time is used.
    :param localtime: bool, optional (default True). Use the local timezone
        in the date string.

    :returns: str, date stamp formatted according to the changelog
        specification (i.e. RFC822).
    )�email�utils�
formatdate)�	timestamp�	localtimes  r�format_daterE�s���;�;�!�!�)�Y�7�7r)NT)?r#�email.utilsr@�loggingr%rlr4r)�ImportError�typingrrrrrrr	r
rrr
rr��IterableDataSource�debian.debian_supportr�	getLoggerr��	Exceptionrr(r+�objectr1�compile�
IGNORECASEr�r`r�r�r�r'r�r�rRr�r�r�r�r�rtrwr�r�r�r�r�r�r�r�r�r>rEr)rr�<module>rQs$��J�D��	�	�
�	��
	�
�
�
�
��
��
�4��������		���*�
��	�	�-�	.��8�)�8��9��
;�9�;�x0�&�x0�v�"�*�*�!��]�#�$��M�M�	��

�B�J�J�x� �	��2�:�:�l�#��
�"�*�*�2�3���B�J�J�����r�z�z�,�-���2�:�:�1�2�=�=�A���2�:�:�1�2�=�=�A��
�"�*�*�[�"�-�-�
0���"�*�*�9�2�=�=�I����
�
�7�B�M�M�2�
��b�j�j��(���2�:�:�g�����
�
�<�(�
�	����<��M�M�
���2�:�:�2�B�M�M�B������2�3�������������-��M�M�������)��M�M�������)��M�M�������+��M�M�������2�B�M�M�B������:�;��s$��s$�lJ'�Z
8��m�	��	��6�	��	�s"�K'�/K3�'K0�/K0�3K<�;K<

Zerion Mini Shell 1.0