Bug#901651: Python debian: deb822: add support for returning Version objects from iter_paragraphs
Stuart Prescott
stuart at debian.org
Sun Dec 30 06:39:56 GMT 2018
Control: tags -1 + patch
On Saturday, 16 June 2018 16:48:13 AEDT Paul Wise wrote:
> It would be a useful feature to have the iter_paragraphs method from
> the deb822 Sources and Packages classes support returning Version
> objects in the Version field. This would help with sorting versions.
>
> Since this would add overhead and might be incompatible with things
> like json.dumps, it might be best to either not enable it by default
> or declare it as a breaking API change in the docuentation.
I've had a go at implementing this in a backwards-compatible fashion by
exposing methods for get_version() and set_version(v) within the classes for
which that makes sense (Dsc, Changes, Packages, Sources).
https://salsa.debian.org/python-debian-team/python-debian/merge_requests/7
Comments or thoughts?
cheers
Stuart
--
Stuart Prescott http://www.nanonanonano.net/ stuart at nanonanonano.net
Debian Developer http://www.debian.org/ stuart at debian.org
GPG fingerprint 90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
More information about the pkg-python-debian-maint
mailing list