diff -u python-django-tagging-0.2.1+svn154/debian/changelog python-django-tagging-0.2.1+svn154/debian/changelog --- python-django-tagging-0.2.1+svn154/debian/changelog +++ python-django-tagging-0.2.1+svn154/debian/changelog @@ -1,3 +1,11 @@ +python-django-tagging (0.2.1+svn154-0ubuntu2.1) karmic; urgency=low + + * debian/patches/02_fix_calculate_tag_weight.patch: Fix error in + _calculate_tag_weight which in some cases may lead to font_size + attribute of most frequent used tag set to None. (LP: #367214) + + -- Krzysztof Klimonda Sun, 26 Apr 2009 23:39:17 +0200 + python-django-tagging (0.2.1+svn154-0ubuntu2) jaunty; urgency=low * Update the maintainer field since this is now a ubuntu updated package. only in patch2: unchanged: --- python-django-tagging-0.2.1+svn154.orig/debian/patches/02_fix_calculate_cloud.patch +++ python-django-tagging-0.2.1+svn154/debian/patches/02_fix_calculate_cloud.patch @@ -0,0 +1,15 @@ +Comment: When logarithmic distribution is used _calculate_tag_weight may +return weight greater than maximum threshold, and the most frequent tag +may have atribute font_size set to None. +--- django-tagging.old/tagging/utils.py (revision 132) ++++ django-tagging/tagging/utils.py (working copy) +@@ -230,7 +230,7 @@ + if distribution == LINEAR or max_weight == 1: + return weight + elif distribution == LOGARITHMIC: +- return math.log(weight) * max_weight / math.log(max_weight) ++ return min((max_weight, math.log(weight) * max_weight / math.log(max_weight))) + raise ValueError(_('Invalid distribution algorithm specified: %s.') % distribution) + + def calculate_cloud(tags, steps=4, distribution=LOGARITHMIC): +