Red Hat Bugzilla – Bug 622552
Python 2.7 xmlrpclib breaks bzr due to API change
Last modified: 2011-01-03 20:20:26 EST
Description of problem:
[spot@pterodactyl master]$ bzr export -r 794 gwibber-794bzr.tar.gz lp:gwibber
bzr: ERROR: exceptions.AttributeError: addinfourl instance has no attribute 'getheader'
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 911, in exception_to_return_code
return the_callable(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1111, in run_bzr
ret = run(*run_argv)
File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 689, in run_argv_aliases
File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 704, in run
return self._operation.run_simple(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 135, in run_simple
self.cleanups, self.func, *args, **kwargs)
File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
result = func(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 2838, in run
b, subdir = Branch.open_containing(branch_or_subdir)
File "/usr/lib64/python2.7/site-packages/bzrlib/branch.py", line 189, in open_containing
File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 966, in open_containing
transport = get_transport(url, possible_transports)
File "/usr/lib64/python2.7/site-packages/bzrlib/lazy_import.py", line 125, in __call__
return obj(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/bzrlib/transport/__init__.py", line 1569, in get_transport
base = directories.dereference(base)
File "/usr/lib64/python2.7/site-packages/bzrlib/directory_service.py", line 58, in dereference
return service().look_up(name, url)
File "/usr/lib64/python2.7/site-packages/bzrlib/plugins/launchpad/lp_directory.py", line 59, in look_up
File "/usr/lib64/python2.7/site-packages/bzrlib/plugins/launchpad/lp_directory.py", line 69, in _resolve
result = resolve.submit(service)
File "/usr/lib64/python2.7/site-packages/bzrlib/plugins/launchpad/lp_registration.py", line 272, in submit
File "/usr/lib64/python2.7/site-packages/bzrlib/plugins/launchpad/lp_registration.py", line 195, in send_request
result = method(*method_params)
File "/usr/lib64/python2.7/xmlrpclib.py", line 1224, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python2.7/xmlrpclib.py", line 1570, in __request
File "/usr/lib64/python2.7/site-packages/bzrlib/plugins/launchpad/lp_registration.py", line 78, in request
File "/usr/lib64/python2.7/xmlrpclib.py", line 1449, in parse_response
if response.getheader("Content-Encoding", "") == "gzip":
AttributeError: addinfourl instance has no attribute 'getheader'
bzr 2.2b4 on python 2.7.0 (Linux-2.6.35-0.57.rc6.git1.fc14.x86_64-x86_64-with-fedora-14-Branched)
arguments: ['/usr/bin/bzr', 'export', '-r', '794', 'gwibber-794bzr.tar.gz', 'lp:gwibber']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
bash_completion /usr/lib64/python2.7/site-packages/bzrlib/plugins/bash_completion [2.2b4]
launchpad /usr/lib64/python2.7/site-packages/bzrlib/plugins/launchpad [2.2b4]
netrc_credential_store /usr/lib64/python2.7/site-packages/bzrlib/plugins/netrc_credential_store [2.2b4]
news_merge /usr/lib64/python2.7/site-packages/bzrlib/plugins/news_merge [2.2b4]
*** Bazaar has encountered an internal error. This probably indicates a
bug in Bazaar. You can help us fix it by filing a bug report at
including this traceback and a description of the problem.
It looks like this bug is already in the upstream tracker, here:
There is a patch in that ticket, and there has been since March. I generated a scratch build with the patch applied here:
With that scratch build installed, bzr starts working again.
This looks similar to bug 619276 and to bug 621298.
Does Koji still work with the scratch build?
Does python-bugzilla still work with the scratch build?
I know that koji still works, because I've successfully kicked off builds since installing the scratch python. Can't be sure about python-bugzilla, if there is a good way to test it, I'd be happy to do so.
There is also a upstream bzr bug report on this issue:
As discussed there we can work around the Python2.7 xmprpxlib transport API change by patching bzr.
The patch in the merge request was approved for merging to bzr trunk:
bzr-2.2.1-2.fc14 has been submitted as an update for Fedora 14.
bzr-2.2.1-2.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
I'm closing this as fixed. If someone thinks this is not fixed, please re-open.