Re: [Python-Dev] urllib exception compatibility

2007-09-28 Thread Adam Olsen
On 9/27/07, Greg Ewing [EMAIL PROTECTED] wrote: Gregory P. Smith wrote: Is IOError is the right name to use? OSError is raised for things that are not IO such as subprocess, dlopen, system. The trouble with either of these is that the class of errors we're talking about don't necessarily

Re: [Python-Dev] urllib exception compatibility

2007-09-28 Thread Stephen J. Turnbull
Greg Ewing writes: Gregory P. Smith wrote: Is IOError is the right name to use? OSError is raised for things that are not IO such as subprocess, dlopen, system. The trouble with either of these is that the class of errors we're talking about don't necessarily come directly from

Re: [Python-Dev] urllib exception compatibility

2007-09-28 Thread Guido van Rossum
On 9/28/07, Stephen J. Turnbull [EMAIL PROTECTED] wrote: Greg Ewing writes: Gregory P. Smith wrote: Is IOError is the right name to use? OSError is raised for things that are not IO such as subprocess, dlopen, system. The trouble with either of these is that the class of

Re: [Python-Dev] urllib exception compatibility

2007-09-28 Thread Brett Cannon
On 9/28/07, Guido van Rossum [EMAIL PROTECTED] wrote: On 9/28/07, Stephen J. Turnbull [EMAIL PROTECTED] wrote: Greg Ewing writes: Gregory P. Smith wrote: Is IOError is the right name to use? OSError is raised for things that are not IO such as subprocess, dlopen, system.

Re: [Python-Dev] urllib exception compatibility

2007-09-28 Thread Guido van Rossum
On 9/28/07, Brett Cannon [EMAIL PROTECTED] wrote: On 9/28/07, Guido van Rossum [EMAIL PROTECTED] wrote: On 9/28/07, Stephen J. Turnbull [EMAIL PROTECTED] wrote: Greg Ewing writes: Gregory P. Smith wrote: Is IOError is the right name to use? OSError is raised for things that

Re: [Python-Dev] urllib exception compatibility

2007-09-27 Thread Guido van Rossum
How about making IOError, OSError and EnvironmentError all aliases for the same thing? The distinction is really worthless historical baggage. On 9/26/07, Greg Ewing [EMAIL PROTECTED] wrote: Jim Jewett wrote: In particular, should socket.error, ftp.Error and httplib.HTTPException (used in

Re: [Python-Dev] urllib exception compatibility

2007-09-27 Thread Gregory P. Smith
On 9/27/07, Guido van Rossum [EMAIL PROTECTED] wrote: How about making IOError, OSError and EnvironmentError all aliases for the same thing? The distinction is really worthless historical baggage. +1 on that. ___ Python-Dev mailing list

Re: [Python-Dev] urllib exception compatibility

2007-09-27 Thread Brett Cannon
On 9/27/07, Guido van Rossum [EMAIL PROTECTED] wrote: How about making IOError, OSError and EnvironmentError all aliases for the same thing? The distinction is really worthless historical baggage. +1 from me. Should OSError and IOError become aliases to EnvironmentError? I assume

Re: [Python-Dev] urllib exception compatibility

2007-09-27 Thread Graham Horler
On 27 Sep 2007, 21:23:58, Brett Cannon wrote: Should OSError and IOError become aliases to EnvironmentError? I assume WindowsError and VMSError will just directly subclass which ever exception sticks around. And should we bother with a PendingDeprecationWarning for IOError or OSError? Or

Re: [Python-Dev] urllib exception compatibility

2007-09-27 Thread Guido van Rossum
I'd be happy to make them all IOError. 2to3 can clean this up. On 9/27/07, Graham Horler [EMAIL PROTECTED] wrote: On 27 Sep 2007, 21:23:58, Brett Cannon wrote: Should OSError and IOError become aliases to EnvironmentError? I assume WindowsError and VMSError will just directly subclass which

Re: [Python-Dev] urllib exception compatibility

2007-09-27 Thread BJörn Lindqvist
On 9/27/07, Guido van Rossum [EMAIL PROTECTED] wrote: How about making IOError, OSError and EnvironmentError all aliases for the same thing? The distinction is really worthless historical baggage. Wouldn't it also be nice to have some subclasses of IOError like FileNotFoundError,

Re: [Python-Dev] urllib exception compatibility

2007-09-27 Thread Guido van Rossum
I suspect that the use case for those errors is far less than you think. On 9/27/07, BJörn Lindqvist [EMAIL PROTECTED] wrote: On 9/27/07, Guido van Rossum [EMAIL PROTECTED] wrote: How about making IOError, OSError and EnvironmentError all aliases for the same thing? The distinction is really

Re: [Python-Dev] urllib exception compatibility

2007-09-27 Thread Greg Ewing
Guido van Rossum wrote: How about making IOError, OSError and EnvironmentError all aliases for the same thing? The distinction is really worthless historical baggage. To my mind, the distinction is that IOError and OSError have an attribute for the error code, and the code found there has a

Re: [Python-Dev] urllib exception compatibility

2007-09-27 Thread Gregory P. Smith
Is IOError is the right name to use? OSError is raised for things that are not IO such as subprocess, dlopen, system. Nobody likes typing out EnvironmentError and dislike the suggestion of EMError, should it just be OSError? errno values are after all OS specific. -gps On 9/27/07, Guido van

Re: [Python-Dev] urllib exception compatibility

2007-09-27 Thread Greg Ewing
Gregory P. Smith wrote: Is IOError is the right name to use? OSError is raised for things that are not IO such as subprocess, dlopen, system. The trouble with either of these is that the class of errors we're talking about don't necessarily come directly from the OS or I/O library. Often I

[Python-Dev] urllib exception compatibility

2007-09-26 Thread Jim Jewett
urllib goes to goes to some trouble to ensure that it raises IOError, even when the underlying exception comes from another module.[*] I'm wondering if it would make sense to just have those modules' exceptions inherit from IOError. In particular, should socket.error, ftp.Error and

Re: [Python-Dev] urllib exception compatibility

2007-09-26 Thread Guido van Rossum
Shouldn't these all inherit from EnvironmentError? Or should EnvironmentError and IOError be the same thing perhaps? --Guido On 9/26/07, Jim Jewett [EMAIL PROTECTED] wrote: urllib goes to goes to some trouble to ensure that it raises IOError, even when the underlying exception comes from

Re: [Python-Dev] urllib exception compatibility

2007-09-26 Thread Greg Ewing
Jim Jewett wrote: In particular, should socket.error, ftp.Error and httplib.HTTPException (used in Py3K) inherit from IOError? I'd say that if they incorporate a C library result code they should inherit from IOError, or if they incorporate a system call result code they should inherit from