#960278 python-debian: Don't loose whitespace information when editing Copyright.files

#960278#5
Date:
2020-05-11 13:36:14 UTC
From:
To:
Hey,

currently whitespace information is lost, when modifing Copyright.files
and entries will joined with a simple space. That is correct syntax, but
not the expected behavior for a developer. Especially that the
workaround needs to access the private data element
_RestrictedWrapper__data and that is bad Python practice to access
private class members. It would be nice to have a proper way edit and store
parts without losing the whitespace information.

Here is my workaround:

for paragraph in copyright.all_files_paragraphs():
    files = list()
    for f in paragraph._RestrictedWrapper__data['Files'].splitlines():
        if match(f.strip()):
            if files:
                files.append(f)
            else:
                files.append(f.strip())
    files_entry = "\n".join(files)
    paragraph._RestrictedWrapper__data['Files'] = files_entry

#960278#12
Date:
2022-11-20 01:06:19 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
python-debian, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 960278@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Stuart Prescott <stuart@debian.org> (supplier of updated python-debian package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 20 Nov 2022 11:30:33 +1100
Source: python-debian
Architecture: source
Version: 0.1.49
Distribution: unstable
Urgency: medium
Maintainer: Debian python-debian Maintainers <pkg-python-debian-maint@lists.alioth.debian.org>
Changed-By: Stuart Prescott <stuart@debian.org>
Closes: 960278 1011937
Changes:
 python-debian (0.1.49) unstable; urgency=medium
 .
   [ Debian Janitor ]
   * Update lintian override info to new format on line 1.
 .
   [ Niels Thykier ]
   * Fix whitespace handling of Copyright files (Closes: #960278)
 .
   [ Stuart Prescott ]
   * Make python-debian (more) portable (Closes: #1011937)
     - Tweak tests to be portable to other platforms
     - Adapt tests so that skipping optional tests can be prevented if needed
     - Add other platforms to CI to test portability
   * Switch tests to use more pytest features.
   * Updates for newer mypy and pylint.
   * Add Debian 14 'forky' to the list of known releases.
Checksums-Sha1:
 0a6fa138235dd42e2a616874500c2deb4cf1e7cb 2246 python-debian_0.1.49.dsc
 291d124debd33e8ee672ac1ef7e85423d374d670 191388 python-debian_0.1.49.tar.xz
 08290e9b99c0cb5bbdd72bdbefb8ffd5564e2d8c 7169 python-debian_0.1.49_amd64.buildinfo
Checksums-Sha256:
 3d57aa8485f59091bc58b903f3bda0753c6684dfd648b8c053193d0fe4214e1d 2246 python-debian_0.1.49.dsc
 7b3b293fc3de8c2648534fcf1cb9966a3ac9d1564957a07fbcaabbd6495cdc4b 191388 python-debian_0.1.49.tar.xz
 d5653e95686f0e3dac2f866bcaa370acd112c0e7b2966c310b4af450d7cf795e 7169 python-debian_0.1.49_amd64.buildinfo
Files:
 0b48799f29d378cc600a99c3ee8e2f07 2246 python optional python-debian_0.1.49.dsc
 8f14b47a7e77b54f3f2633bf1779209b 191388 python optional python-debian_0.1.49.tar.xz
 f1efed9d4fef0365041f6fce917cff1c 7169 python optional python-debian_0.1.49_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEkOLSwa0Uaht+u4kdu8F+uxOW8vcFAmN5dY4ACgkQu8F+uxOW
8vdeBg/9Hspe1W5re4Er3xTcURQzj5mtFHQUFP2ocZKhtoiHUhdPmh2jin9ZFe0+
cveAuEwwTGC9/V3eW+MViFe15mvHEunQkqI098s+RNeeARPz7Ido8vPgTJarSXYA
gffXSx3Bqj0zY6ON6njcjbnUHTDCS7q1W7RTbW03kKD4VPQvYa1qcf0nvINdjnFA
o+GDh+UvMqx5K8xlmox9G50dCX0LC66ICc1FlvnulgjwM1GPmvGdIeGb6s2do5ws
GL8Pol3oVlkR/WvZ/5TqGlBzcLHizyEgJRTRGwyJFRwTCmLRSObsXwH5MPSbXIhb
8fZqld2Ep8sDZLsC6BM0I88YGhb3zQjTgnpfJBsCabGvT9Es1MbuoVVdkuEDHUzS
wE92nX9zRxdhYvbB+urYPKVjShC0A83Qd1OL7ZxG+IuePaDZnvsDdKcg8JOzt8q3
TDggxQqod+OpMo62X80gPDwC07x5ryM4+lKl2Uk54ZVDepY699uIcDT6dNh7xaEN
kCx/ggiL174hYOUb+51Mnvjr+2i7WNaNCfclzZDwm2eOu44akj+B31qC0M9jOglX
hh0Z5MkOIikhjYFHrmmGFKn0wglbjjHm2VX1pZdjaPq9mG/zPeDa1iUlpL3kAjDr
cwuS1CGdZTiJpA0v0lwt5jLTmD0KBiGUYdpIN7ZibcpRFBqOJeU=
=Xn+5
-----END PGP SIGNATURE-----

#960278#17
Date:
2022-11-22 07:20:40 UTC
From:
To:
Control: reopen -1
Hi,

I do not see a fix to Copyright files in my name in the 0.1.49 release
(checking the git log).  I did a draft MR but it was never merged.

Therefore, I am reopening this.

Thanks,
~Niels