Roundup Tracker - Issues

Issue 2550994

classification
configparser backport to Python 2 breaks Roundup
Type: behavior Severity: normal
Components: Infrastructure Versions: devel
process
Status: fixed fixed
:
: : joseph_myers
Priority: normal :

Created on 2018-08-20 00:42 by joseph_myers, last changed 2018-08-20 00:51 by joseph_myers.

Messages
msg6214 Author: [hidden] (joseph_myers) Date: 2018-08-20 00:42
There is a backport of the Python 3 configparser module to Python 2:
https://pypi.org/project/configparser/

If you have this installed, it breaks running Roundup with Python 2
(example symptom: attempts to load static files with @@file URIs produce
a 404 error - I noticed this after an upgrade to Ubuntu 18.04, as on
Ubuntu 18.04 that backport is a dependency of the Python 2 version of
pylint; it also causes at least one test_cgi test failure).  The Roundup
code tries to import configparser and only imports ConfigParser if that
fails, which is normally the preferred way of handling such differences
between Python 2 and Python 3.  But this backport produces Python 2
unicode objects in cases where Roundup does not expect them (in the
example above: for the static files directory, where serve_static_file
checks for type str).

Note: this issue exists in 1.6.0 but not older releases (the
configparser handling was inserted by ESR's Python 3 fixes last year,
not those postdating the 1.6.0 release).

I'm testing a patch to use a version check for whether to use
configparser or ConfigParser and will commit that if it passes testing.
msg6215 Author: [hidden] (joseph_myers) Date: 2018-08-20 00:51
Fix committed.
History
Date User Action Args
2018-08-20 00:51:09joseph_myerssetstatus: new -> fixed
resolution: fixed
messages: + msg6215
2018-08-20 00:42:19joseph_myerscreate