[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp

Mads Kiilerich report at bugs.python.org
Thu Aug 26 11:54:35 CEST 2010


Mads Kiilerich <mads at 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? 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.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8797>
_______________________________________


More information about the Python-bugs-list mailing list