Re: [Python-Dev] Adding NetworkIOError for bug 1706815

2007-07-04 Thread Gregory P. Smith
On Wed, Jul 04, 2007 at 11:03:42AM +0200, Guido van Rossum wrote: > Why not simply inherit socket.error from EnvironmentError? True, that would be simpler; is it enough? If we avoid adding the new exception, I really think it should inherit from IOError, not EnviromnentError because sockets are I

[Python-Dev] Tracker item: 735515 - urllib to cache 301 redirections?

2007-07-04 Thread O.R.Senthil Kumaran
Hi, One of the tracker items: 735515 mentions that urllib should cache 301 and 302 redirections. urllib / urllib2 should cache the results of 301 (permanent) redirections. This shouldn't break anything, since it's just an internal optimisation from one point of view -- but it's also what the RFC (

[Python-Dev] PEP 366 - Relative imports from main modules

2007-07-04 Thread Nick Coghlan
A c.l.p discussion referenced from Python-URL just brought this topic back to my attention, and with the relatively low traffic on the development lists in the last few days, it seemed like a good time to repost this PEP (it vanished beneath the Unicode identifier discussion last time). Cheers

Re: [Python-Dev] Adding NetworkIOError for bug 1706815

2007-07-04 Thread Jean-Paul Calderone
On Tue, 3 Jul 2007 23:58:44 -0700, "Gregory P. Smith" <[EMAIL PROTECTED]> wrote: >In response to bug 1706815 and seeing messy code to catch errors in >network apps I've implemented most of the ideas in the bug and added a >NetworkIOError exception (child of IOError). With this, socket.error >would

Re: [Python-Dev] Adding NetworkIOError for bug 1706815

2007-07-04 Thread Guido van Rossum
Why not simply inherit socket.error from EnvironmentError? On 7/4/07, Gregory P. Smith <[EMAIL PROTECTED]> wrote: > In response to bug 1706815 and seeing messy code to catch errors in > network apps I've implemented most of the ideas in the bug and added a > NetworkIOError exception (child of IOEr

[Python-Dev] Adding NetworkIOError for bug 1706815

2007-07-04 Thread Gregory P. Smith
In response to bug 1706815 and seeing messy code to catch errors in network apps I've implemented most of the ideas in the bug and added a NetworkIOError exception (child of IOError). With this, socket.error would now inherit from NetworkIOError instead of being its own thing (the old one didn't e