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 Erick.Jones
Recipients BreamoreBoy, Erick.Jones, Luci.Stanescu, kiilerix, orsenthil
Date 2015-02-12.16:42:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1423759339.06.0.481598200209.issue9698@psf.upfronthosting.co.za>
In-reply-to
Content
This ended up biting me also.  I had a list of URLs to fetch with authentication.  One of the URLs was bad (returning 401 even with authentication), and that was causing all of the subsequent URLs to fail as well since the reset count wasn't getting reset.

I also don't like that the retry count is stored in the handler -- that's mutable global state, which wreaks havoc if I use this with Eventlet coroutines for concurrent page fetches.  (If I just add the authentication headers myself, then urllib2 works just fine under Eventlet.)

Couldn't the retry count be stored in the request object itself?

And why do we even need a retry "count"?  If it fails without authentication, then try it with authentication.  If it fails again, just return to the application.  It makes no sense to retry four more times.
History
Date User Action Args
2015-02-12 16:42:19Erick.Jonessetrecipients: + Erick.Jones, orsenthil, kiilerix, BreamoreBoy, Luci.Stanescu
2015-02-12 16:42:19Erick.Jonessetmessageid: <1423759339.06.0.481598200209.issue9698@psf.upfronthosting.co.za>
2015-02-12 16:42:19Erick.Joneslinkissue9698 messages
2015-02-12 16:42:18Erick.Jonescreate