lp-registration is not compatible with python-2.7

Bug #605574 reported by Olivier Mattelaer
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

the problem is potentially linked to my instalation (with python2.7) I've install bzr from source and it compiles perfectly.
but then it fails to load a branch.

It's maybe smtg stupid, sorry in advance if it is,

Olivier

bzr: ERROR: exceptions.AttributeError: addinfourl instance has no attribute 'getheader'

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/bzrlib/commands.py", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/builtins.py", line 1194, in run
    from_location)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/bzrdir.py", line 956, in open_tree_or_branch
    bzrdir = klass.open(location)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/bzrdir.py", line 840, in open
    t = get_transport(base, possible_transports=possible_transports)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/lazy_import.py", line 125, in __call__
    return obj(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/transport/__init__.py", line 1559, in get_transport
    base = directories.dereference(base)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/directory_service.py", line 58, in dereference
    return service().look_up(name, url)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/plugins/launchpad/lp_directory.py", line 60, in look_up
    return self._resolve(url)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/plugins/launchpad/lp_directory.py", line 70, in _resolve
    result = resolve.submit(service)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/plugins/launchpad/lp_registration.py", line 275, in submit
    self._authenticated)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/plugins/launchpad/lp_registration.py", line 198, in send_request
    result = method(*method_params)
  File "/usr/local/lib/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/local/lib/python2.7/xmlrpclib.py", line 1570, in __request
    verbose=self.__verbose
  File "/usr/local/lib/python2.7/site-packages/bzrlib/plugins/launchpad/lp_registration.py", line 78, in request
    return self.parse_response(response)
  File "/usr/local/lib/python2.7/xmlrpclib.py", line 1449, in parse_response
    if response.getheader("Content-Encoding", "") == "gzip":
AttributeError: addinfourl instance has no attribute 'getheader'

bzr 2.1.2 on python 2.7.0 (Darwin-8.11.0-Power_Macintosh-powerpc-32bit)
arguments: ['/usr/local/bin/bzr', 'branch', 'lp:madgraph5']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
  launchpad /usr/local/lib/python2.7/site-packages/bzrlib/plugins/launchpad [2.1.2]
  netrc_credential_store /usr/local/lib/python2.7/site-packages/bzrlib/plugins/netrc_credential_store [2.1.2]
  news_merge /usr/local/lib/python2.7/site-packages/bzrlib/plugins/news_merge [2.1.2]

Tags: python-2.7
Revision history for this message
Vincent Ladeuil (vila) wrote :

Ouch, it's clearly a bug in bzr but we haven't tried supporting python-2.7 so far.
We'll gladly accept patches fixing bugs like this one as long as they don't break supporting python-2.4 -> python-2.6.

In the mean time you may prefer to use the system installed python (fixing the #! line in the bzr script should be enough for that).

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
tags: added: py27
Vincent Ladeuil (vila)
summary: - impossible to branch from web
+ lp-registration is not compatible with python-2.7
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Ok Thanks, I'll install python2.6 then.

Revision history for this message
Henrik Nordström (henriknordstrom) wrote :

This should be tagged python2.7 not py27

and also is a dup of bug #612096 XMLRPCTransport is incompatible with python 2.7.

Vincent Ladeuil (vila)
tags: added: python-2.7
removed: py27
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.