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'
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.
Created attachment 239433 [details] 0001-Fix-XML-parsing-for-Python-2.7.patch
This patch has been applied in git. Thanks for the fix. :-)
(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.
(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...
ah, www-client/pybugz-0.9.0_rc1 is in the tree. Missed that, I thought no comment was no action...