Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 328117 - www-client/pybugz-0.8.0 does not run with python-2.7
Summary: www-client/pybugz-0.8.0 does not run with python-2.7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: python-2.7
  Show dependency tree
 
Reported: 2010-07-13 15:33 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2010-12-09 19:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
0001-Fix-XML-parsing-for-Python-2.7.patch (0001-Fix-XML-parsing-for-Python-2.7.patch,2.21 KB, text/plain)
2010-07-19 19:48 UTC, Christopher Brannon (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-07-13 15:33:21 UTC
compiles fun, but does not run.

You will see an error like this:

%% bugz-2.7 get 328107
 * Using https://bugs.gentoo.org/ 
 * Getting bug 328107 ..
 * Already logged in.
Traceback (most recent call last):
  File "/usr/bin/bugz-2.7", line 95, in <module>
    main()
  File "/usr/bin/bugz-2.7", line 67, in main
    getattr(bugz, cmd)(*args, **cmd_kwds)
  File "/usr/lib/python2.7/site-packages/bugz/cli.py", line 295, in get
    result = Bugz.get(self, bugid)
  File "/usr/lib/python2.7/site-packages/bugz/bugzilla.py", line 445, in get
    etree = ElementTree.parse(fd, parser)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1176, in parse
    tree.parse(source, parser)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 653, in parse
    parser.feed(data)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1622, in feed
    except self._error, v:
AttributeError: 'ForcedEncodingXMLTreeBuilder' object has no attribute '_error'
Comment 1 Christopher Brannon (RETIRED) gentoo-dev 2010-07-19 19:05:08 UTC
Here's the problem.
ForcedEncodingXMLTreeBuilder is a subclass of XMLTreeBuilder.
The __init__ method doesn't initialize some members which were added
to the superclass in Python 2.7.
The superclass's __init__ method isn't called, because this subclass
needs to force the encoding when constructing the underlying parser.
The good news is that we don't need ForcedEncodingXMLTreeBuilder
in Python 2.7, since Python 2.7's XMLTreeBuilder will construct the
XML parser using the encoding that we supplied to the constructor.
I'll be attaching a patch shortly.

Comment 2 Christopher Brannon (RETIRED) gentoo-dev 2010-07-19 19:48:42 UTC
Created attachment 239433 [details]
0001-Fix-XML-parsing-for-Python-2.7.patch
Comment 3 William Hubbs gentoo-dev 2010-07-19 22:38:51 UTC
This patch has been applied in git.  Thanks for the fix. :-)
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-07 14:51:01 UTC
(In reply to comment #3)
> This patch has been applied in git.  Thanks for the fix. :-)
> 

Please release a new version. The only solution for ~arch users is the -9999 version which doesn't work for me, due to firewall rules out of my control.
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-09 19:19:39 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > This patch has been applied in git.  Thanks for the fix. :-)
> > 
> 
> Please release a new version. The only solution for ~arch users is the -9999
> version which doesn't work for me, due to firewall rules out of my control.
> 

re-opening for more exposure...
Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-09 19:23:29 UTC
ah, www-client/pybugz-0.9.0_rc1 is in the tree. Missed that, I thought no comment was no action...