Bug#998715: python3-debian: Changelog creates an extra empty line at the bottom, upsetting lintian

Sandro Tosi morph at debian.org
Sun Nov 7 01:41:49 GMT 2021


Package: python3-debian
Version: 0.1.39
Severity: normal
X-Debbugs-Cc: morph at debian.org

Hello,
attached is a script to reproduce the issue; the script output is

```
/usr/bin/python3.9 /home/morph/.config/JetBrains/PyCharm2021.2/scratches/scratch_32.py
>>>
dummy (0.0.1) unstable; urgency=low

  * just another changelog entry

 -- A Developer <someone at debian.org>  Sun, 07 Nov 2021 01:35:40 +0000

<<<
```

notice the empty line before '<<<'.

That causes lintian to generate the tag `trailing-whitespace` for d/changelog.

Can you remove the extra empty line?

Thanks,
Sandro


-- System Information:
Debian Release: 11.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-8-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-debian depends on:
ii  python3          3.9.2-3
ii  python3-chardet  4.0.0-1
ii  python3-six      1.16.0-2

Versions of packages python3-debian recommends:
ii  python3-apt  2.2.1

Versions of packages python3-debian suggests:
ii  gpgv  2.2.27-2

-- no debconf information
-------------- next part --------------
from datetime import datetime
import sys

from debian.changelog import Changelog, Version, get_maintainer


changelog = Changelog()
changelog.new_block(package='dummy',
                    version=Version('0.0.1'),
                    distributions="unstable",
                    urgency='low',
                    author='A Developer <someone at debian.org>',
                    date=datetime.utcnow().strftime('%a, %d %b %Y %H:%M:%S +0000'))
changelog.add_change('')
changelog.add_change('  * just another changelog entry')
changelog.add_change('')

print('>>>')
changelog.write_to_open_file(sys.stdout)
print('<<<')


More information about the pkg-python-debian-maint mailing list