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

2016-07-29 Thread R. David Murray

R. David Murray added the comment:

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).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-07-29 Thread Kim Randell

Kim Randell added the comment:

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?

--
nosy: +Kim Randell

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2014-08-20 Thread Senthil Kumaran

Senthil Kumaran added the comment:

This is fixed in all active versions (2.7.8+, 3.4.2? and 3.5). Thanks all!

--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2014-08-19 Thread Roundup Robot

Roundup Robot added the comment:

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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2014-08-16 Thread Roundup Robot

Roundup Robot added the comment:

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

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2014-08-16 Thread STINNER Victor

STINNER Victor added the comment:

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

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2014-08-16 Thread Roundup Robot

Roundup Robot added the comment:

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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2014-08-16 Thread Senthil Kumaran

Senthil Kumaran added the comment:

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2014-08-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

May be issue22165 patch fixes this test failure.

--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2014-08-16 Thread Senthil Kumaran

Senthil Kumaran added the comment:

@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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2014-08-15 Thread Senthil Kumaran

Senthil Kumaran added the comment:

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.

--
versions: +Python 3.4, Python 3.5 -Python 2.6
Added file: http://bugs.python.org/file36377/issue8797_with_tests.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2011-02-09 Thread Ole Martin Handeland

Ole Martin Handeland pythonb...@olemartin.org added the comment:

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.

--
nosy: +olemartinorg

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2011-02-02 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
resolution: fixed - 
stage: committed/rejected - patch review
status: closed - open
type: crash - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2011-01-20 Thread Sam Bull

Sam Bull s...@pocketuniverse.ca added the comment:

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.

--
nosy: +sambull
versions: +Python 2.7
Added file: http://bugs.python.org/file20471/simpler_fix.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-08-27 Thread Mads Kiilerich

Mads Kiilerich m...@kiilerich.com added the comment:

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-08-27 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

See also new issue 9698.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-08-26 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

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).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-08-26 Thread Senthil Kumaran

Changes by Senthil Kumaran orsent...@gmail.com:


--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed
Added file: http://bugs.python.org/file18648/basic_auth.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-08-26 Thread Senthil Kumaran
 r84324 (release21-maint)

That should be release27-maint. :)
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-08-26 Thread Mads Kiilerich

Mads Kiilerich m...@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 rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-08-26 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

On Thu, Aug 26, 2010 at 3:24 PM, Mads Kiilerich rep...@bugs.python.org wrote:
 Mads Kiilerich m...@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

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-08-25 Thread Dmitry Jemerov

Dmitry Jemerov intelliy...@gmail.com added the comment:

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.

--
nosy: +Dmitry.Jemerov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-08-21 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
resolution: fixed - 

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-07-30 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
stage: committed/rejected - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-07-22 Thread zenyatta

zenyatta j...@journey.sk added the comment:

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.

--
keywords: +patch
nosy: +zenyatta
Added file: http://bugs.python.org/file18121/urllib2-8797-fix-workaround.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-07-22 Thread Mads Kiilerich

Mads Kiilerich m...@kiilerich.com added the comment:

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/ .

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-07-22 Thread zenyatta

zenyatta j...@journey.sk added the comment:

See http://mercurial.selenic.com/bts/issue2299

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-06-07 Thread Mads Kiilerich

Mads Kiilerich m...@kiilerich.com added the comment:

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?)

--
nosy: +kiilerix

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-06-04 Thread jurjen Bos

jurjen Bos j.bos-inter...@xs4all.nl added the comment:

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

--
nosy: +Jurjen

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-06-04 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

+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.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-06-04 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

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.

--
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-06-01 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

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.

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-06-01 Thread Ionut Turturica

Ionut Turturica jono...@yahoo.com added the comment:

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...

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-06-01 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-05-30 Thread chuchiperriman

chuchiperriman chuchiperri...@gmail.com added the comment:

The same problem for me, it tries to authenticate infinite times if the 
user/password are incorrect

--
nosy: +chuchiperriman

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-05-24 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

Is the behavior you posted observable on trunk?

--
assignee:  - orsenthil
nosy: +orsenthil

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-05-24 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8797
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com