Bug#913274: Emitting warnings from iter_paragraphs?

Stuart Prescott stuart at debian.org
Mon Dec 31 08:46:20 GMT 2018


Dear python-debian co-maintainers,

iter_paragraphs has a use_apt_pkg parameter which tries to use python-apt's 
apt_pkg.TagFile if possible. If apt_pkg is not available or the data source 
given to iter_paragraphs is incompatible with apt_pkg.TagFile, use_apt_pkg is 
silently ignored.

In the following patch, I make iter_paragraphs issue a warning if the 
requested parser is not going to be used. The aim is to make this explicit to 
try to help downstreams find bugs.

https://salsa.debian.org/python-debian-team/python-debian/merge_requests/8

I'm nervous about adding warnings and have python-debian become potentially 
noisy on stderr. I could imagine adding yet another parameter to 
iter_paragraphs to control the verbosity.

Comments and reviews most welcome. Like other recent work, I'd like this to 
land in buster which means uploading and testing within the next couple of 
weeks.

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