This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: orsenthil Nosy List: Dmitry.Jemerov, Jurjen, Kim Randell, chuchiperriman, greatape, jonozzz, kiilerix, olemartinorg, orsenthil, python-dev, r.david.murray, serhiy.storchaka, vstinner, zenyatta
Priority: normal Keywords: patch

Created on 2010-05-24 01:42 by jonozzz, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
urllib2-8797-fix-workaround.patch zenyatta, 2010-07-22 09:58 workaround for a side-effect of the fix for this issue
basic_auth.patch orsenthil, 2010-08-26 06:33
simpler_fix.patch greatape, 2011-01-20 22:31 Patch for 2.7.x: Removes complex retries fix and applies simple get_header fix review
issue8797_with_tests.diff orsenthil, 2014-08-15 13:23 review
Messages (34)
msg106342 - (view) Author: Ionut Turturica (jonozzz) Date: 2010-05-24 01:42
The URL I'm trying to open is using basicauth and the username/password is incorrect.

This works flawlessly in 2.6.4.

  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/home/jono/work/sites/test123/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/jono/work/sites/test123/urllib2.py", line 429, in error
    result = self._call_chain(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 855, in http_error_401
    url, req, headers)
  File "/home/jono/work/sites/test123/urllib2.py", line 833, in http_error_auth_reqed
    return self.retry_http_basic_auth(host, req, realm)
  File "/home/jono/work/sites/test123/urllib2.py", line 843, in retry_http_basic_auth
    return self.parent.open(req, timeout=req.timeout)
  File "/home/jono/work/sites/test123/urllib2.py", line 391, in open
    response = self._open(req, data)
  File "/home/jono/work/sites/test123/urllib2.py", line 409, in _open
    '_open', req)
  File "/home/jono/work/sites/test123/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/home/jono/work/sites/test123/urllib2.py", line 1169, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/home/jono/work/sites/test123/urllib2.py", line 1107, in do_open
    h = http_class(host, timeout=req.timeout) # will parse host:port
  File "/usr/lib64/python2.6/httplib.py", line 1104, in __init__
    HTTPConnection.__init__(self, host, port, strict, timeout)
  File "/usr/lib64/python2.6/httplib.py", line 660, in __init__
    self._set_hostport(host, port)
  File "/usr/lib64/python2.6/httplib.py", line 689, in _set_hostport
    if host and host[0] == '[' and host[-1] == ']':
RuntimeError: maximum recursion depth exceeded in cmp
msg106345 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-05-24 07:34
Is the behavior you posted observable on trunk?
msg106346 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-05-24 07:36
Okay, I see you have mentioned 2.6.5 in the Title.
I will try the following to reproduce this.
1) Try a Basis Auth which is working.
2) Pass an Invalid username/password and see the behavior.
msg106759 - (view) Author: chuchiperriman (chuchiperriman) Date: 2010-05-30 12:40
The same problem for me, it tries to authenticate infinite times if the user/password are incorrect
msg106834 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-06-01 13:09
This is fixed in r81636, r81637, r81638, r81637.
Just like the Digest Authentication, the urllib2 will try for 5 times before failing for any authentication failure ( It won't lead to recursion).

I had a thought that Basic Authentication need not be retried (no where in the RFC it mentions about it), but I found some references that clients do present the dialog a couple of times for retry on wrong authentication, so we are going for the same.

This is tested with actual resource setup. Closing this issue as this bug is fixed.
msg106877 - (view) Author: Ionut Turturica (jonozzz) Date: 2010-06-02 04:04
Why would you waste the time and resources to test 5 times for a known to be wrong credential ?!

This is not like in a browser where the user is presented with a dialog box 5 times and he/she can try different credentials.

I don't see the point...
msg106878 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-06-02 04:13
The point of retry is for auth failure, which can happen due to any reason. It is not just for a wrong password.

I was thinking just doing a single verification and failing, but did find some resources (not just browsers) which adopt this approach of retry.

BTW, Basic auth is gone now and Digest auth has some recommendations so I found its fine to do the same way as Digest auth does.
msg107015 - (view) Author: jurjen Bos (Jurjen) Date: 2010-06-04 07:50
I would like to point out that this is not going to work if someone visits more than 5 sites with the same authentication manager. This would have to be documentated, at least.
We could fix this by putting the retry counter in the HTTPPasswordMgr; it is not hard to put in an extra field in the password database with the retry counter. See also my remarks in issue8894
msg107033 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-06-04 11:55
+1 for putting retry control on the password manager.  Probably the default should be set to 1.  If I understand correctly, it is the password manager that would be prompting the user for a new password, if someone chose to implement such a password manager.
msg107043 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-06-04 12:51
Agree to single retry for Basic Auth. We are just dealing with BasicAuthentication here, so that's why we did not have in the HTTPPasswdManager. But, let me consider that viewpoint too.
msg107261 - (view) Author: Mads Kiilerich (kiilerix) * Date: 2010-06-07 09:55
FYI:
The regression was introduced in 2.6.5 with issue3819 .

This also causes problems with Mercurial pushing to google code - see http://mercurial.selenic.com/bts/issue2179 . 

IIRC google code redirects to an url which then in turn requests authentication. I'm not sure how that will work with a retry count of 1. The funny and inconsistent thing is that it apparently would work if they replied 403 instead of 401. "durin42" from google/mercurial knows the details.

(It seems suspicious to me that there are code paths where the retry counter is reset. Doesn't that mean that a remote server will be able to cause endless recursion? Shouldn't there be some kind of hard upper limit on the number of retries?)
msg111159 - (view) Author: (zenyatta) Date: 2010-07-22 09:58
I work in sidux and my Mercurial currently doesn't work. The python version already contains the fix for this issue (revision 81637) and it crashes Mercurial ("authorization failed") whenever a command involves more than 5 requests to the repository. I fixed it by resetting the retry counter upon successful authorization (see patch). Maybe this helps someone in a similar situation. The patch was made against trunk using "diff -u".
msg111161 - (view) Author: Mads Kiilerich (kiilerix) * Date: 2010-07-22 10:09
zenyatta: Which Mercurial version? We thought we had implemented a sufficiently ugly workaround in Mercurial. Please file an issue in http://mercurial.selenic.com/bts/ .
msg111172 - (view) Author: (zenyatta) Date: 2010-07-22 13:20
See http://mercurial.selenic.com/bts/issue2299
msg114922 - (view) Author: Dmitry Jemerov (Dmitry.Jemerov) Date: 2010-08-25 16:02
I've also run into this problem after upgrading to Python 2.6.6. My code, which uses the same HTTPBasicAuthHandler instance for many requests to the same server, worked correctly with Python 2.6.2 and broke with 2.6.6. It would be great if zenyatta's patch to fix the regression was included in 2.6.7.
Also, unfortunately NEWS.txt doesn't mention this change at all.
msg114956 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-08-26 06:31
I checked in a modified version of reset the retry count for respnse code !=401 in the following checkins:
r84323 (py3k)
r84324 (release21-maint)
r84325 (release31-maint)

Unfortunately, we wont be able to patch the 2.6.x release. You might want to use patch which is attached or fix it at mercurial end.

Another issue, Issue9639 was fixed to reset the retry on successful response.

I am going to close this issue, there was a minor discussion in the middle if 5 retries in worth it, but it looks like it is (msg107261).
msg114962 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-08-26 09:03
> r84324 (release21-maint)

That should be release27-maint. :)
msg114963 - (view) Author: Mads Kiilerich (kiilerix) * Date: 2010-08-26 09:54
Senthil, can you tell us why this fix is correct - and convince us that it is the Final Fix for this issue? Not because I don't trust you, but because this issue has a bad track record.

Some comments/questions to this patch:

Why do 401 require such special handling? Why not handle it like the other errors?

How do this work together with http://code.google.com/p/support/issues/detail?id=3985 ?

Detail: I'm surprised you don't use reset_retry_count() - that makes it a bit harder to grok the code. And the patch doesn't reduce the complexity of the code.

But ... I really don't understand ... .retried is a kind of error counter. Why do we reset it on errors? I would expect it to be reset on success ... or perhaps on anything but 401, 403 and 407. Or perhaps it should be reset whenever a new URL is requested.
msg115051 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-08-27 01:46
On Thu, Aug 26, 2010 at 3:24 PM, Mads Kiilerich <report@bugs.python.org> wrote:
> Mads Kiilerich <mads@kiilerich.com> added the comment:
>
> Senthil, can you tell us why this fix is correct - and convince us that it is the Final Fix for this issue?

Hello Mads, this may not be be final fix. I just adopted what was
already done for Digest Auth for the Basic Auth, it could be an
interim solution that avoids recursion problem.

I agree with you respect to the other error codes, there is already
another bug open to handle this. The reset counter is reset on success
too, in another part of the code. I shall respond to the other
questions a bit later (1 week, I am kind of busy at the moment) and
lets go for the best fix as discussed.

Thanks,
Senthil
msg115060 - (view) Author: Mads Kiilerich (kiilerix) * Date: 2010-08-27 08:58
On 08/27/2010 03:47 AM, Senthil Kumaran wrote:
> I agree with you respect to the other error codes, there is already
> another bug open to handle this. The reset counter is reset on success
> too, in another part of the code.

FWIW: From Mercurial it is our experience that the reset counter only 
gets reset on errors, never on success.
msg115070 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-08-27 12:52
See also new issue 9698.
msg126657 - (view) Author: Sam Bull (greatape) * Date: 2011-01-20 22:31
I think there's a much simpler solution to this ticket than the retry logic that's currently in place.

The code originally avoided the infinite recursion by checking to see if the previous request had already submitted the auth credentials that would be used in the retry. If it had, it would return None. If it hadn't, it would add the auth credentials to the request header and the request again:

            if req.headers.get(self.auth_header, None) == auth:
                return None
            req.add_header(self.auth_header, auth)

Then, to fix #3819, it was changed. Instead of calling add_header, it called add_unredirected_header:

            if req.headers.get(self.auth_header, None) == auth:
                return None
            req.add_unredirected_header(self.auth_header, auth)

This caused the loop because the auth creds were going into unredirected_hdrs instead of the headers dict.

But I think the original logic is sound. The code just wasn't checking in all the headers. Luckily there's a get_header method that checks both for you. This one-line change should fix the issue:


            if req.get_header(self.auth_header, None) == auth:
                return None
            req.add_unredirected_header(self.auth_header, auth)

I think this fix is cleaner and makes more sense, but I'm worried I might be missing something. I don't fully understand the distinction between headers and unredirected headers. Maybe there's a reason why the code isn't checking in unredirected headers for the auth header.

I'm attaching a patch. I'm new to contributing to python so I apologize if the format is wrong.
msg128246 - (view) Author: Ole Martin Handeland (olemartinorg) Date: 2011-02-09 22:37
Thanks Sam! I can confirm that your patch is working well with basic auth. I have not tried other authentication methods, though. I'm not sure about the unredirected headers, but your fix looks like the cleanest.
msg225348 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2014-08-15 13:23
This bug has been open for a while and I had lost sight of it. Upon prompted recently, I dug bit 
into history and could think of a good solution.

A brief history.

1. The bug "maximum recursion depth exceeded" when doing Basic Authentication was introduced in 
5f9939af2f71 (issue3819). I verified it by doing "hg update 5f9939af2f71" and running basic 
authentication test against a server.

2. This was 'fixed' with giving an upper limit to retries and doing it similar to Digest 
Authentication as part of this ticket and it is case recent current tip 
(acb30ed7eceb when I ran the test).

However, this fix is not satisfactory for multiple reasons like fix is not satisfactory and not 
having concrete reasons for doing retries for Basic Auth and why 401 error should be considered 
special.  I agree with this, this fix was more like to avoid recursion 
and throw the correct HTTPError.

Also, it is important to note that, before a regression was introduced in r59118, the prior 
revision ( hg update 5f9939af2f71^  -which led me to c8ef906b11b8) had correct behavior, where 
HTTPError was thrown upon invalid user:pass immediately.  

So, going back to that behavior was the right thing to do.

Sam Bull's suggestion and patch looks right to me. It is correct to verify the un-redirected hdrs 
too when checking for auth and go with the behavior as it in c8ef906b11b8)

I have improved upon the patch for 3.5 and added tests which were not present too. I think, this
should go in all active versions of python as there is no api change or behavior behavior, but 
improvement in way HTTPError is thrown.
msg225388 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-08-16 08:49
New changeset e0510a3bdf8f by Senthil Kumaran in branch '2.7':
Fix Issue #8797: Raise HTTPError on failed Basic Authentication immediately. Initial patch by Sam Bull.
http://hg.python.org/cpython/rev/e0510a3bdf8f

New changeset 3435c5865cfc by Senthil Kumaran in branch '3.4':
Fix Issue #8797: Raise HTTPError on failed Basic Authentication immediately. Initial patch by Sam Bull.
http://hg.python.org/cpython/rev/3435c5865cfc

New changeset 7cb90d70ce19 by Senthil Kumaran in branch 'default':
merge from 3.4
http://hg.python.org/cpython/rev/7cb90d70ce19
msg225394 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-08-16 12:27
test_urllib2_localnet now fails since the changeset 3435c5865cfc. Example:
http://buildbot.python.org/all/builders/x86%20RHEL%206%203.x/builds/4410/steps/test/logs/stdio
http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/10518/steps/test/logs/stdio

test_basic_auth_success (test.test_urllib2_localnet.BasicAuthTests) ... ----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 51031)
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/socketserver.py", line 321, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/socketserver.py", line 347, in process_request
    self.finish_request(request, client_address)
  File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/test/test_urllib2_localnet.py", line 289, in http_server_with_basic_auth_handler
    return BasicAuthHandler(*args, **kwargs)
  File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/test/test_urllib2_localnet.py", line 212, in __init__
    http.server.SimpleHTTPRequestHandler.__init__(self, *args, **kwargs)
  File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/socketserver.py", line 685, in __init__
    self.handle()
  File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/http/server.py", line 398, in handle
    self.handle_one_request()
  File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/http/server.py", line 386, in handle_one_request
    method()
  File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/test/test_urllib2_localnet.py", line 235, in do_GET
    http.server.SimpleHTTPRequestHandler.do_GET(self)
  File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/http/server.py", line 677, in do_GET
    f = self.send_head()
  File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/http/server.py", line 716, in send_head
    return self.list_directory(path)
  File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/http/server.py", line 772, in list_directory
    % (urllib.parse.quote(linkname), html.escape(displayname)))
  File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/urllib/parse.py", line 688, in quote
    string = string.encode(encoding, errors)
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcff' in position 16: surrogates not allowed
----------------------------------------
ERROR
msg225403 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-08-16 17:25
New changeset 5336a01542e2 by Senthil Kumaran in branch '2.7':
backout changeset e0510a3bdf8f - due to buildbot failures. Ref: Issue #8797
http://hg.python.org/cpython/rev/5336a01542e2

New changeset d51e739004bc by Senthil Kumaran in branch '3.4':
backout changeset 3435c5865cfc due to buildbot failures. Ref #8797
http://hg.python.org/cpython/rev/d51e739004bc

New changeset 3d45155b7b9b by Senthil Kumaran in branch 'default':
merge 3.4; backout changeset 3435c5865cfc due to buildbot failures. Ref #8797
http://hg.python.org/cpython/rev/3d45155b7b9b
msg225404 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2014-08-16 17:26
I have backed out my changes. The buildbot failures were new as I could not reproduce them in my local test on Mac. I will run the buildbot suite on branch and fix it before committing.
msg225405 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-08-16 17:37
May be issue22165 patch fixes this test failure.
msg225406 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2014-08-16 17:47
@Serhiy, yeah, I think the patch attached to issue22165 will fix one of the buildbot failures. For this issue. there was another one with Broken PIPE which may need a different fix.
msg225549 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-08-20 02:26
New changeset c1edc4e43eb1 by Senthil Kumaran in branch '2.7':
Fix Issue #8797: Raise HTTPError on failed Basic Authentication immediately. Initial patch by Sam Bull.
http://hg.python.org/cpython/rev/c1edc4e43eb1

New changeset 30e8a8f22a2a by Senthil Kumaran in branch '3.4':
Fix Issue #8797: Raise HTTPError on failed Basic Authentication immediately. Initial patch by Sam Bull.
http://hg.python.org/cpython/rev/30e8a8f22a2a

New changeset 10d0a692b1b6 by Senthil Kumaran in branch 'default':
merge from 3.4
http://hg.python.org/cpython/rev/10d0a692b1b6
msg225563 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2014-08-20 10:14
This is fixed in all active versions (2.7.8+, 3.4.2? and 3.5). Thanks all!
msg271620 - (view) Author: Kim Randell (Kim Randell) Date: 2016-07-29 13:18
I don't have an example case, but from reading the code it looks as though the AbstractDigestAuthHandler has exactly the same faults as the old version of AbstractBasicAuthHandler (i.e. using req.headers.get instead of req.get_header, and corresponding retry workarounds). Should it be updated to match?
msg271629 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-07-29 14:27
Kim: if you can prove it is broken, please open a new issue, this one is closed (you can reference it by just typing # followed by the issue number, and the tracker will automatically make a link).
History
Date User Action Args
2022-04-11 14:57:01adminsetgithub: 53043
2016-07-29 14:27:07r.david.murraysetmessages: + msg271629
2016-07-29 13:18:21Kim Randellsetnosy: + Kim Randell
messages: + msg271620
2014-08-20 10:14:39orsenthilsetstatus: open -> closed
resolution: fixed
messages: + msg225563

stage: patch review -> resolved
2014-08-20 02:26:22python-devsetmessages: + msg225549
2014-08-16 17:47:39orsenthilsetmessages: + msg225406
2014-08-16 17:37:34serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg225405
2014-08-16 17:26:56orsenthilsetmessages: + msg225404
2014-08-16 17:25:04python-devsetmessages: + msg225403
2014-08-16 12:27:50vstinnersetnosy: + vstinner
messages: + msg225394
2014-08-16 08:49:38python-devsetnosy: + python-dev
messages: + msg225388
2014-08-15 13:23:59orsenthilsetfiles: + issue8797_with_tests.diff

messages: + msg225348
versions: + Python 3.4, Python 3.5, - Python 2.6
2011-02-09 22:37:25olemartinorgsetnosy: + olemartinorg
messages: + msg128246
2011-02-02 19:25:47pitrousetstatus: closed -> open
nosy: orsenthil, kiilerix, jonozzz, r.david.murray, Dmitry.Jemerov, chuchiperriman, Jurjen, zenyatta, greatape
type: crash -> behavior
resolution: fixed -> (no value)
stage: resolved -> patch review
2011-01-20 22:31:34greatapesetfiles: + simpler_fix.patch
versions: + Python 2.7
nosy: + greatape

messages: + msg126657
2010-08-27 12:52:09r.david.murraysetmessages: + msg115070
2010-08-27 08:58:29kiilerixsetmessages: + msg115060
2010-08-27 01:47:01orsenthilsetmessages: + msg115051
2010-08-26 09:54:33kiilerixsetmessages: + msg114963
2010-08-26 09:03:51orsenthilsetmessages: + msg114962
2010-08-26 06:33:10orsenthilsetstatus: open -> closed
files: + basic_auth.patch
resolution: fixed
stage: patch review -> resolved
2010-08-26 06:31:59orsenthilsetmessages: + msg114956
2010-08-25 16:02:31Dmitry.Jemerovsetnosy: + Dmitry.Jemerov
messages: + msg114922
2010-08-21 23:18:38eric.araujosetresolution: fixed -> (no value)
2010-07-30 11:35:15pitrousetstage: resolved -> patch review
2010-07-22 13:20:26zenyattasetmessages: + msg111172
2010-07-22 10:09:31kiilerixsetmessages: + msg111161
2010-07-22 09:58:30zenyattasetfiles: + urllib2-8797-fix-workaround.patch

nosy: + zenyatta
messages: + msg111159

keywords: + patch
2010-06-07 09:55:43kiilerixsetnosy: + kiilerix
messages: + msg107261
2010-06-04 12:51:08orsenthilsetstatus: closed -> open

messages: + msg107043
2010-06-04 11:55:13r.david.murraysetnosy: + r.david.murray
messages: + msg107033
2010-06-04 07:50:22Jurjensetnosy: + Jurjen
messages: + msg107015
2010-06-02 04:13:33orsenthilsetmessages: + msg106878
2010-06-02 04:04:58jonozzzsetmessages: + msg106877
2010-06-01 13:09:26orsenthilsetstatus: open -> closed
resolution: fixed
messages: + msg106834

stage: resolved
2010-05-30 12:40:07chuchiperrimansetnosy: + chuchiperriman
messages: + msg106759
2010-05-24 07:36:51orsenthilsetmessages: + msg106346
2010-05-24 07:34:40orsenthilsetassignee: orsenthil

messages: + msg106345
nosy: + orsenthil
2010-05-24 01:42:11jonozzzcreate