Re: [Python-Dev] urllib exception compatibility

2007-09-27 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 nec

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

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 Ro

Re: [Python-Dev] New lines, carriage returns, and Windows

2007-09-27 Thread Greg Ewing
Dino Viehland wrote: >>Why don't you just use binary mode then? > > That just flips the problem to the other side. Seems to me that IronPython really needs two string types, "Python string" and ".NET string", with automatic conversion when crossing a boundary between Python code and .NET code. -

Re: [Python-Dev] Decimal news

2007-09-27 Thread Thomas Wouters
On 9/27/07, Eric Smith <[EMAIL PROTECTED]> wrote: > > Thomas Wouters wrote: > > > Unfortunately, that's not how it works :-) If you check something into > > the trunk, it will be merged into Py3k sooner or later. I may ask the > > original submitter for assistance if it's incredibly hard to figure

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] Decimal news

2007-09-27 Thread Eric Smith
Thomas Wouters wrote: > Unfortunately, that's not how it works :-) If you check something into > the trunk, it will be merged into Py3k sooner or later. I may ask the > original submitter for assistance if it's incredibly hard to figure out > the changes, but so far, I only had to do that with

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 i

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, IOPermiss

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

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?

[Python-Dev] building with -Wwrite-strings

2007-09-27 Thread Lisandro Dalcin
I'm trying to build Python (2.6) with GCC the option -Wwrite-strings. 1 - Is there any interest on this? 2 - What should I do for the very common (taken from int_new): static char *kwlist[] = {"x", "base", 0}; I was able to remove all the warning in Objects/*, except those related to (2). -

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 Windo

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 Pytho

Re: [Python-Dev] New lines, carriage returns, and Windows

2007-09-27 Thread Guido van Rossum
[moving to python-3000] The symmetry isn't as strong as you suggest, but I agree it would be a useful feature. Would you mind filing a Py3k feature request so we don't forget? A proposal for an API given the existing newlines=... parameter (described in detail in PEP 3116) would be even better.

Re: [Python-Dev] New lines, carriage returns, and Windows

2007-09-27 Thread Dino Viehland
> This I don't understand. Why don't you just use binary mode then? > At least for Python 2.x, the *only* difference between text and > binary mode is the treatment of line endings. That just flips the problem to the other side. Now if I have a Python library that I'm mixing w/ .NET code I need t

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