[focal] graphite-web not compatible with python3.8

Bug #1863697 reported by Trent Lloyd
96
This bug affects 19 people
Affects Status Importance Assigned to Milestone
graphite-web (Ubuntu)
Fix Released
High
Unassigned

Bug Description

graphite-web fails on focal with python3.8 (the default) due to the following error:

File "/usr/lib/python3/dist-packages/graphite/render/urls.py", line 16, in <module>
  from . import views
File "/usr/lib/python3/dist-packages/graphite/render/views.py", line 23, in <module>
  from cgi import parse_qs
ImportError: cannot import name 'parse_qs' from 'cgi' (/usr/lib/python3.8/cgi.py)

The following upstream PR fixes the issue by using six.moves for this, and also makes 1 other change for Python3.8:
https://github.com/graphite-project/graphite-web/commit/117b04df26d83c57d3d5f25fb7457572d3fe90bd

This PR is in the upstream release 1.1.6 however Debian sid/experimental and thus focal is stuck on 1.1.4

The reproduction setup is using apache2 with libapache2-mod-wsgi-py3 - there appears to be no easy way to request mod-wsgi load python3.7 instead so this seems critical.

Trent Lloyd (lathiat)
Changed in graphite-web (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Hontvári József Levente (hontvari) wrote :

After upgrading to focal, graphite no longer works.

Revision history for this message
Oleg (oleg-lzh) wrote :
Revision history for this message
Oleg (oleg-lzh) wrote :

i changed the line in file /usr/lib/python3/dist-packages/graphite/render/views.py:
from cgi import parse_qs
to:
from urllib.parse import parse_qs

and graphite-web worked

Revision history for this message
Kodiak Firesmith (kodiakf) wrote :

Perhaps this could be rebased on the working 1.16, and they could fix the broken manpage details all at once. (graphite-manage syncdb vs graphite-manage migrate...)

Revision history for this message
Efthymios (efthymiosc) wrote :

same problem, Oleg's solution editing views.py worked, thanks.

Revision history for this message
Malte Schmidt (maltris) wrote :

Affected, too. When can we expect the patch?

Revision history for this message
Wyllys Ingersoll (wyllys66) wrote :

Same here - why is this still not fixed?

Revision history for this message
Claudio Th. (kaskothy) wrote :

Bug still there.
When cann I expect a fix?

using workaround as discribed by Oleg (oleg-lzh) wrote on 2020-10-06:
https://bugs.launchpad.net/ubuntu/+source/graphite-web/+bug/1863697/comments/3

Clemens Drüe (druee)
summary: - not compatible with python3.8 on focal
+ [focal] graphite-web not compatible with python3.8
Revision history for this message
Malte Schmidt (maltris) wrote :

This is funny, two years, no fix, but switching to 22.04 will solve it anyway. Small single-line patch...

Revision history for this message
Clemens Drüe (druee) wrote : Re: [Bug 1863697] Re: [focal] graphite-web not compatible with python3.8

Not funny. Sad.

On 29.08.22 14:57, Malte Schmidt wrote:
> This is funny, two years, no fix, but switching to 22.04 will solve it
> anyway. Small single-line patch...
>

Revision history for this message
niol (alexandre-rossi) wrote :

Fixed in 1.1.8-1

Changed in graphite-web (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.