Bug 627557

Summary: ConfigParser changes in Python 2.7 causing regressions
Product: [Fedora] Fedora Reporter: Dwayne Bailey <dwayne>
Component: pythonAssignee: Dave Malcolm <dmalcolm>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: a.badger, dmalcolm, ivazqueznet, james.antill, jonathansteffan
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-2.7-8.fc14.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-09-23 12:50:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 620817, 622061    

Description Dwayne Bailey 2010-08-26 12:03:07 UTC
Description of problem:
ConfigParser behaviour changed for 2.7.  It now allows key's with no value.  See bug http://bugs.python.org/issue7005 and it seems that this is off by default.

In Virtaal we have a new bug 622061 which is being caused by the above change.  We create and read the .ini file completely in code.  So on first run we create virtaal.ini which previously in 2.6 would have an entry:
plural = None

It now has an entry:
plural

When reading that entry we fail.  So the patch implemented in issue7005 has not solved the problem completely and is allowing valueless key's on writing even though the parser is not configured to allow those.

Steps to Reproduce:
1. yum install virtaal
2. virtaal
3. Ctrl-Q
4. virtaal
  
Actual results:
Virtaal crashes reading the .ini file it has just created.

Expected results:
Virtaal doesn't crash as ConfigParse doesn't change its behaviour.

Additional info:
My feeling is that this is an upstream regression and I've reported it there.  I maintain the virtaal package on Fedora, my first thoughts where to try fix virtaal.  But on investigation I feel that this is a Python regression which will show up across a number of packages.  I'd rather not mask this by fixing virtaal.

Comment 1 Dwayne Bailey 2010-09-03 08:09:04 UTC
A fix has been committed upstream:
http://bugs.python.org/issue7005#msg115417

Comment 2 Toshio Ernie Kuratomi 2010-09-16 16:24:12 UTC
The fix looks small and simple.  I'll ping dmalcolm about whether he's okay with me updating f14 with this fix.  From the bug, only python-2.7 needs it correct?  Python-3.1 and Python-3.2 (when released) will be unaffected and python-2.6 has the old behaviour?

Comment 3 Toshio Ernie Kuratomi 2010-09-16 16:29:17 UTC
dmalcolm has approved -- I'll pull in the patch and make a new build.  Due to the freeze for the beta release, it'll probably be a few weeks (after the beta) that the rebuild hits stable but it should show up in testing sooner.

Comment 4 Fedora Update System 2010-09-16 19:00:48 UTC
python-2.7-8.fc14.1 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/python-2.7-8.fc14.1

Comment 5 Toshio Ernie Kuratomi 2010-09-16 19:07:38 UTC
Please test hte update -- you can pull it straight out of koji for now (linked from the update request) or wait a day or two for it to be pushed to the f14 testing repository.

Comment 6 Fedora Update System 2010-09-17 04:05:38 UTC
python-2.7-8.fc14.1 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update python'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/python-2.7-8.fc14.1

Comment 7 Dwayne Bailey 2010-09-20 08:53:37 UTC
(In reply to comment #2)
> The fix looks small and simple.  I'll ping dmalcolm about whether he's okay
> with me updating f14 with this fix.  From the bug, only python-2.7 needs it
> correct?  Python-3.1 and Python-3.2 (when released) will be unaffected and
> python-2.6 has the old behaviour?

I'm only working on 2.x series.  From my reading 2.6 is unchanged, 2.7 needs the fix.

Comment 8 Fedora Update System 2010-09-23 12:50:13 UTC
python-2.7-8.fc14.1 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.