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.

Author orsenthil
Recipients l0nwlf, orsenthil, pitrou, sonderblade, ysj.ray
Date 2010-06-15.16:59:22
SpamBayes Score 0.0023210964
Marked as misclassified No
Message-id <1276621165.6.0.866724137728.issue1368368@psf.upfronthosting.co.za>
In-reply-to
Content
The reason the the password is prompted is because, on 401 authentication failure, there is a retry logic by default. When the authentication is retried, it is prompted for username:password using getpass. When using GUI modules it is desired to override the prompt_user_passwd for prompting via GUI.

The way to 'resolve' this issue it seems to me is have a switch retry=False in http_error_401 and http_error_407 methods, which will not prompt the user but instead will throw the Exception and the HTTP Error value. 

retry=True will prompt the user in the cmdline or in GUI (if it is overridden).

- This is adding an extra flag in the function, so I am not sure py2.7 is the right candidate. But the same functions are present in py3k trunk, we can patch it in there. 

I am setting the priority to low and attaching the patch too. I see the bug was reported way back in 2005 and it has not been a serious concern for anyone so far. My take is to patch it in py3k and close the issue.

- Also, anyone using urllib should just migrate to use urllib2 facilities. This piece of code is present for supporting the legacy apps only.

- And the most important of all, username:password@url.tld is deprecated, it should not be used at all.
History
Date User Action Args
2010-06-15 16:59:25orsenthilsetrecipients: + orsenthil, sonderblade, pitrou, l0nwlf, ysj.ray
2010-06-15 16:59:25orsenthilsetmessageid: <1276621165.6.0.866724137728.issue1368368@psf.upfronthosting.co.za>
2010-06-15 16:59:24orsenthillinkissue1368368 messages
2010-06-15 16:59:23orsenthilcreate