[Pkg-graphite-maint] Bug#862084: graphite-web: Stupid version number testing as string

Stephane Bortzmeyer stephane at sources.org
Mon May 8 10:35:25 UTC 2017


Package: graphite-web
Version: 0.9.15+debian-2
Severity: important

Dear Maintainer,

/usr/share/graphite-web/graphite.wsgi contains a really stupid version
test:

if django.get_version() >= "1.7":

Testing a version number as a string DOES NOT WORK. Since Django 1.10,
this test yields false. The correct test uses numbers
(django.VERSION), not strings (django.get_version).

% python
>>> import django
>>> django.get_version()
'1.10.7'
>>> django.VERSION
(1, 10, 7, u'final', 0)

>>> django.get_version() >= "1.7"
False
>>> django.get_version() >= "1.1"
True
>>> django.get_version() >= "1.2"
False
>>> django.VERSION > (1, 7)
True

This is one of the reasons behind bug #840516


-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: armhf
 (armv7l)

Kernel: Linux 4.4.59-627f0117679bc72ef5e58881035f567a-4 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages graphite-web depends on:
ii  adduser                3.115
ii  libjs-prototype        1.7.1-3
ii  libjs-scriptaculous    1.9.0-2
ii  python-cairo           1.8.8-2.2
ii  python-django          1:1.10.7-1
ii  python-django-tagging  1:0.4.5-1
ii  python-pyparsing       2.1.10+dfsg1-1
ii  python-simplejson      3.10.0-1
ii  python-tz              2016.7-0.3
ii  python-whisper         0.9.15-1
pn  python:any             <none>

graphite-web recommends no packages.

Versions of packages graphite-web suggests:
ii  graphite-carbon      0.9.15-1
ii  libapache2-mod-wsgi  4.5.11-1
pn  python-ldap          <none>
pn  python-memcache      <none>
pn  python-mysqldb       <none>

-- Configuration Files:
/etc/graphite/local_settings.py changed [not included]

-- no debconf information



More information about the Pkg-graphite-maint mailing list