[Python-Dev] urllib exception compatibility

Gregory P. Smith greg at krypto.org
Fri Sep 28 06:58:05 CEST 2007


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 Rossum <guido at python.org> wrote:
>
> I'd be happy to make them all IOError. 2to3 can clean this up.
>
> On 9/27/07, Graham Horler <graham.horler at gmail.com> 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
> > > ever exception sticks around.
> > >
> > > And should we bother with a PendingDeprecationWarning for IOError or
> > > OSError?  Or just have a Py3K warning for them and not worry about
> > > their removal in the 2.x series and just let 2to3 handle the
> > > transition?
> >
> > Am I missing something, as I thought Py2K was supposed to throw
> backwards
> > compatability to the wind in favor of doing the "Right Thing"?
> >
> > If so, can't we lose the proposed OSError and IOError aliases
> altogether,
> > and just keep EnvironmentError?
> >
> > Perhaps "EnvironmentError" is a bit long to type in all the places
> OSError
> > and IOError are used, I personally like the look of OSError and IOError
> better
> > in my code.  I vote for a shorter name for EnvironmentError, e.g.
> EMError.
> >
> > just my 2c, Graham
> >
> > >
> > > -Brett
> > > _______________________________________________
> > > Python-Dev mailing list
> > > Python-Dev at python.org
> > > http://mail.python.org/mailman/listinfo/python-dev
> > > Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/graham.horler%40gmail.com
> > _______________________________________________
> > Python-Dev mailing list
> > Python-Dev at python.org
> > http://mail.python.org/mailman/listinfo/python-dev
> > Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/guido%40python.org
> >
>
>
> --
> --Guido van Rossum (home page: http://www.python.org/~guido/)
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/greg%40krypto.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20070927/0061630e/attachment.htm 


More information about the Python-Dev mailing list