Bug#962623: ImportError: cannot import name 'parse_qs' from 'cgi' (/usr/lib/python3.8/cgi.py)

2021-08-22 Thread Kevin Otte
This bug caused the package to not be included in the bullseye release 
and is now blocking the upgrade of one of my machines. Can we please 
pull the latest upstream (now 1.1.8) in and get a backport for bullseye?




Bug#962623: ImportError: cannot import name 'parse_qs' from 'cgi' (/usr/lib/python3.8/cgi.py)

2020-08-31 Thread Hermann Lauer
This is a multi-part MIME message sent by reportbug.


--===0522418674==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: graphite-web
Followup-For: Bug #962623

Dear Maintainer,

please upgrade to 1.1.7 available upstream and replace 
debian/patches/settings_debian.patch
with the appended version.

This makes 1.1.7 working in testing(bullseye).

Thanks a lot,
 greetings
   Hermann

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing'), (40, 'unstable')
Architecture: armhf (armv7l)

Kernel: Linux 5.7.8 (SMP w/2 CPU threads)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages graphite-web depends on:
ii  adduser 3.118
ii  python3 3.8.2-3
ii  python3-cairo   1.16.2-4
ii  python3-cairocffi   0.9.0-4
ii  python3-django  2:2.2.15-2
ii  python3-django-tagging  1:0.4.5-3
ii  python3-pyparsing   2.4.7-1
ii  python3-simplejson  3.17.0-1
ii  python3-six 1.15.0-1
ii  python3-tz  2020.1-2
ii  python3-urllib3 1.25.9-1
ii  python3-whisper 1.1.4-2

graphite-web recommends no packages.

Versions of packages graphite-web suggests:
pn  graphite-carbon  
pn  libapache2-mod-wsgi-py3  
pn  python3-ldap 
pn  python3-memcache 
pn  python3-mysqldb  

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

-- no debconf information

--===0522418674==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="settings_debian.patch"

# HG changeset patch
# Parent  bc853f64d61b2a37516e59c5c8edff74c78feccd

diff --git a/webapp/graphite/settings.py b/webapp/graphite/settings.py
--- a/webapp/graphite/settings.py
+++ b/webapp/graphite/settings.py
@@ -20,6 +20,9 @@
 from warnings import warn
 from importlib import import_module
 
+# Debian add etc/graphite into path
+sys.path.append('/etc/graphite')
+
 from django import VERSION as DJANGO_VERSION
 try:
 from django.urls import reverse_lazy
@@ -221,7 +224,7 @@
 FLUSHRRDCACHED = ''
 
 ## Load our local_settings
-SETTINGS_MODULE = os.environ.get('GRAPHITE_SETTINGS_MODULE', 
'graphite.local_settings')
+SETTINGS_MODULE = os.environ.get('GRAPHITE_SETTINGS_MODULE', 'local_settings')
 try:
   globals().update(import_module(SETTINGS_MODULE).__dict__)
 except ImportError:

--===0522418674==--



Bug#962623: ImportError: cannot import name 'parse_qs' from 'cgi' (/usr/lib/python3.8/cgi.py)

2020-06-18 Thread Natalia Serrano

Hi,

I tried building a package off of the following:

- the upstream 1.1.6 source at 
https://github.com/graphite-project/graphite-web/archive/1.1.6.tar.gz

- the dsc for 1.1.4-5
- the debian.tar.xz for 1.1.4-5

The CVE patch should be dropped, and there are minor issues with 
settings_debian.patch. Otherwise, it installs cleanly and works.


FWIW,

--
Natalia



Bug#962623: ImportError: cannot import name 'parse_qs' from 'cgi' (/usr/lib/python3.8/cgi.py)

2020-06-10 Thread Natalia Serrano
Package: graphite-web
Version: 1.1.4-5
Severity: grave
Justification: renders package unusable

Hi,

When initially setting up graphite-web I ran the following (per
/usr/share/doc/graphite-carbon/README.Debian):

# su -s /bin/bash _graphite -c 'graphite-manage migrate --run-syncdb'
/usr/lib/python3/dist-packages/graphite/settings.py:334: UserWarning: 
SECRET_KEY is set to an unsafe default. This should be set in local_settings.py 
for better security
  warn('SECRET_KEY is set to an unsafe default. This should be set in 
local_settings.py for better security')
Traceback (most recent call last):
  (...52 lines of stack trace removed...)
  File "/usr/lib/python3/dist-packages/graphite/render/urls.py", line 16, in 

from . import views
  File "/usr/lib/python3/dist-packages/graphite/render/views.py", line 23, in 

from cgi import parse_qs
ImportError: cannot import name 'parse_qs' from 'cgi' 
(/usr/lib/python3.8/cgi.py)

This also happens when connecting to the dashboard via HTTP: I installed
libapache2-mod-wsgi-py3, configured the VirtualHost and when connecting I get a
500 on the browser and a similar stack trace on the error log. I didn't check
it all but the last 2 entries are same as above.

When looking into this I found what seems to be a dependency issue. The release
notes for graphite 1.1.6 [1] state "Python 3.8 and Django 2.x support". That
makes me speculate that graphite 1.1.4 doesn't support python 3.8, and is thus
broken on debian testing/sid.

I believe we'd need graphite-web 1.1.6 on debian.

[1] https://graphite.readthedocs.io/en/latest/releases/1_1_6.html


-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.6.0-2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages graphite-web depends on:
ii  adduser 3.118
ii  python3 3.8.2-3
ii  python3-cairo   1.16.2-3
ii  python3-cairocffi   0.9.0-4
ii  python3-django  2:2.2.13-1
ii  python3-django-tagging  1:0.4.5-3
ii  python3-pyparsing   2.4.7-1
ii  python3-simplejson  3.17.0-1
ii  python3-six 1.15.0-1
ii  python3-tz  2020.1-1
ii  python3-urllib3 1.25.9-1
ii  python3-whisper 1.1.4-2

graphite-web recommends no packages.

Versions of packages graphite-web suggests:
ii  graphite-carbon  1.1.4-2
ii  libapache2-mod-wsgi-py3  4.6.8-1+b1
pn  python3-ldap 
pn  python3-memcache 
pn  python3-mysqldb  

-- no debconf information