Bug#758027: python-debian: debian_support's list_releases() has outdated list of releases
Stuart Prescott
stuart at debian.org
Wed Aug 13 13:50:58 UTC 2014
Package: python-debian
Version: 0.1.21
Severity: normal
The list_releases() function in debian_support.py has a hard coded list of
releases. It's obviously a pain to keep this data up to date and it is a long
way out of date:
rels = ("potato", "woody", "sarge", "etch", "lenny", "sid")
http://sources.debian.net/src/python-debian/0.1.22/lib/debian/debian_support.py?hl=417#L413
* the list_releases() function appears to be deleted from the namespace
just after it is created -- it's then partly exposed through an "intern_release"
function. I don't know why it's important to delete the ability to get a list
of releases.
* The list_releases() function memoises the list of releases in the Release class
but since you can't actually call list_releases(), I don't know how that
initialisation was supposed to be done by any using code as it this step only
happen as a side-effect of calling intern_release().
* I can't work out what intern_release is actually supposed to be for -- there's
no documentation for it. It looks like it's for converting a release name
into a sortable quantity.
* There are no uses of the intern_release function in the archive other than in
test_debian_support.py.
So the options for list_releases() and intern_release()
a) just update the release list with squeeze, wheezy, jessie and jessie+1 when
we know that name
b) instead expose the appropriate method from the python-distro-info package
here (python-distro-info probably provides a more usable way of getting this
data in any case)
c) mark the function as deprecated with a reference over to python-distro-info
with the intention of getting rid of it some time during the jessie release
cycle. I wonder if the same should be done with the Release class in
debian_support too, but it's harder to search through the archive to see
whether it's actually used or not.
This bit of code looks like it was work-in-progress and never quite finished,
or perhaps it was scheduled for removal but never quite removed. An historical
perspective on the code and some suggestions on how to either make it more
useful/maintainable or how to go about removing it would be appreciated.
cheers
Stuart
More information about the pkg-python-debian-maint
mailing list