httplib SSLfile readline is broken for python2-.4 and 2.5

Bug #328622 reported by Bob Tanner
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Undecided
Vincent Ladeuil

Bug Description

$ bzr merge
Merging from remembered submit location https://host.real-time.com/project/
bzr: ERROR: exceptions.TypeError: readline() takes exactly 1 argument (2 given)

Traceback (most recent call last):
  File "/Users/tanner/projects/bzr.dev/bzrlib/commands.py", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/Users/tanner/projects/bzr.dev/bzrlib/commands.py", line 839, in run_bzr
    ret = run(*run_argv)
  File "/Users/tanner/projects/bzr.dev/bzrlib/commands.py", line 539, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Users/tanner/projects/bzr.dev/bzrlib/builtins.py", line 3173, in run
    location, revision, remember, possible_transports, pb)
  File "/Users/tanner/projects/bzr.dev/bzrlib/builtins.py", line 3257, in _get_merger_from_branch
    possible_transports)
  File "/Users/tanner/projects/bzr.dev/bzrlib/branch.py", line 147, in open_containing
    possible_transports)
  File "/Users/tanner/projects/bzr.dev/bzrlib/bzrdir.py", line 844, in open_containing
    return BzrDir.open_containing_from_transport(transport)
  File "/Users/tanner/projects/bzr.dev/bzrlib/bzrdir.py", line 865, in open_containing_from_transport
    result = BzrDir.open_from_transport(a_transport)
  File "/Users/tanner/projects/bzr.dev/bzrlib/bzrdir.py", line 819, in open_from_transport
    redirected)
  File "/Users/tanner/projects/bzr.dev/bzrlib/transport/__init__.py", line 1680, in do_catching_redirections
    return action(transport)
  File "/Users/tanner/projects/bzr.dev/bzrlib/bzrdir.py", line 806, in find_format
    transport, _server_formats=_server_formats)
  File "/Users/tanner/projects/bzr.dev/bzrlib/bzrdir.py", line 1652, in find_format
    return format.probe_transport(transport)
  File "/Users/tanner/projects/bzr.dev/bzrlib/bzrdir.py", line 2660, in probe_transport
    server_version = medium.protocol_version()
  File "/Users/tanner/projects/bzr.dev/bzrlib/smart/medium.py", line 593, in protocol_version
    client_protocol.query_version()
  File "/Users/tanner/projects/bzr.dev/bzrlib/smart/protocol.py", line 777, in query_version
    self.call('hello')
  File "/Users/tanner/projects/bzr.dev/bzrlib/smart/protocol.py", line 617, in call
    self._request.finished_writing()
  File "/Users/tanner/projects/bzr.dev/bzrlib/smart/medium.py", line 421, in finished_writing
    self._finished_writing()
  File "/Users/tanner/projects/bzr.dev/bzrlib/transport/http/__init__.py", line 639, in _finished_writing
    data = self._medium.send_http_smart_request(self._buffer)
  File "/Users/tanner/projects/bzr.dev/bzrlib/transport/http/__init__.py", line 616, in send_http_smart_request
    code, body_filelike = t._post(bytes)
  File "/Users/tanner/projects/bzr.dev/bzrlib/transport/http/_urllib.py", line 137, in _post
    accepted_errors=[200, 403]))
  File "/Users/tanner/projects/bzr.dev/bzrlib/transport/http/_urllib.py", line 79, in _perform
    response = self._opener.open(request)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib2.py", line 381, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib2.py", line 399, in _open
    '_open', req)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "/Users/tanner/projects/bzr.dev/bzrlib/transport/http/_urllib2_wrappers.py", line 694, in https_open
    return self.do_open(HTTPSConnection, request)
  File "/Users/tanner/projects/bzr.dev/bzrlib/transport/http/_urllib2_wrappers.py", line 596, in do_open
    response = connection.getresponse()
  File "/Users/tanner/projects/bzr.dev/bzrlib/transport/http/_urllib2_wrappers.py", line 228, in getresponse
    self._response = httplib.HTTPConnection.getresponse(self)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/httplib.py", line 928, in getresponse
    response.begin()
  File "/Users/tanner/projects/bzr.dev/bzrlib/transport/http/_urllib2_wrappers.py", line 148, in begin
    httplib.HTTPResponse.begin(self)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/httplib.py", line 385, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/httplib.py", line 343, in _read_status
    line = self.fp.readline()
  File "/Users/tanner/projects/bzr.dev/bzrlib/transport/http/_urllib2_wrappers.py", line 83, in readline
    s = self.filesock.readline(size)
TypeError: readline() takes exactly 1 argument (2 given)

bzr 1.12dev on python 2.5.4 (darwin)
arguments: ['/Users/tanner/bin/bzr', 'merge']
encoding: 'US-ASCII', fsenc: 'utf-8', lang: 'en_US.US-ASCII'
plugins:
  bzrtools /Users/tanner/.bazaar/plugins/bzrtools [1.12]
  cvsps /Users/tanner/.bazaar/plugins/cvsps [unknown]
  email /Users/tanner/.bazaar/plugins/email [unknown]
  launchpad /Users/tanner/projects/bzr.dev/bzrlib/plugins/launchpad [unknown]
  netrc_credential_store /Users/tanner/projects/bzr.dev/bzrlib/plugins/netrc_credential_store [unknown]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Revision history for this message
Bob Tanner (tanner) wrote :

Bazaar (bzr) 1.13dev resolves the above problem.

Bazaar (bzr) 1.13dev
  from bzr checkout /Users/tanner/projects/bzr.dev
    revision: 4005

Revision history for this message
John A Meinel (jameinel) wrote :

This was a bug in https handling for python <2.6. The fix should be in bzr.dev and in bzr 1.12. It doesn't have anything really to do with netrc, other than that was triggering the https bug.

Changed in bzr:
milestone: none → 1.12
status: New → Fix Released
Revision history for this message
Vincent Ladeuil (vila) wrote :

Wasn't there a movie about man born old and dead young ?

That bug kind of has such a reverse life:
- fixed,
- reported,
- assigned.

Go figure...

Sorry for the inconvenience tough :-/

Changed in bzr:
assignee: nobody → vila
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.