Bug#849058: python-debian: Use ‘distro-info’ data for Debian versions

Stuart Prescott stuart at debian.org
Sun Jan 15 03:52:07 UTC 2017


Hi Ben,

> Rather than duplicating the code names hard-coded in this package
> source and having that get out of date every time Debian releases, I
> have implemented a change so that the existing ‘distro-info’ data is
> read to determine valid Debian code names.
> 
> My suggested implementation for this is at
> <URL:https://git.fosscommunity.in/bignose/debian_python-debian/tree/wip/feature/releases-from-data>,
> the ‘wip/feature/releases-from-data’ branch.

I've never liked python-debian embedding such information. However, …

Strong NAK for adding python-distro-info as a runtime-dependency in Debian. 
python-debian is installed as part of the 'standard task' and so additional 
dependencies are not really welcome. (The standard task needs to be getting 
smaller not bigger!)

Also a strong NAK for having possibly different results depending on whether 
the code is run on Debian or in some other environment, i.e. whether it is 
using an (old internal) releases.csv or (updated) /usr/share/distro-
info/debian.csv. I don't think python-debian 1.30's list_releases should 
ever change its output. (The function is undocumented, we don't know what 
semantics it is supposed to have, we don't know how/if this function is 
used. We must be very careful with it. A starting point could be some 
documentation for it!)

I could almost cope with just the build-time generation of the private copy 
from /usr/share/distro-info/debian.csv except that would mean that a rebuild 
of python-debian could change the output of that function. I'd be happy if 
the releases.csv regeneration were a maintainer-only (not build-time) call 
to update the internal information. That can be a single cp or sed command 
from d/rules (with the setup.py generation for instance) rather than more 
significant work.

distro-info-data also misses bullseye which would currently be included in 
the 1.30 release.

The use of pkg_resources in the final commit of this series to locate the 
releases.csv file also implies dependencies on python{,3}-pkg-resources. 
These are already transitively included due to python{,3}-chardet but 
obviously still need to be listed here.

Separately to your other commits, c114ae4 (fixing ._name__) looks like it is 
worth independently cherrypicking out of the collection. Well spotted. It 
also indicates that the test suite coverage of that bit of code needs 
improving (there is currently almost none of that class). It would be good 
to have tests accompany fixes like that -- even a smoke test would have 
caught that bug.

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