Re: [Python-Dev] PEP 3151 from the BDFOP

2011-08-29 Thread Nick Coghlan
On Tue, Aug 30, 2011 at 7:18 AM, Barry Warsaw wrote: > Okay, so here's what's still outstanding for me: > > * Should we eliminate FileSystemError? (probably "yes") I've also been persuaded that this isn't a generally meaningful categorisation, so +1 for dropping it. ConnectionError is worth keepi

Re: [Python-Dev] PEP 3151 from the BDFOP

2011-08-29 Thread Antoine Pitrou
On Mon, 29 Aug 2011 17:18:33 -0400 Barry Warsaw wrote: > On Aug 24, 2011, at 01:57 AM, Antoine Pitrou wrote: > > >> One guiding principle for me is that we should keep the abstraction as thin > >> as possible. In particular, I'm concerned about mapping multiple errnos > >> into a single Error.

Re: [Python-Dev] PEP 3151 from the BDFOP

2011-08-29 Thread Barry Warsaw
On Aug 24, 2011, at 01:57 AM, Antoine Pitrou wrote: >> One guiding principle for me is that we should keep the abstraction as thin >> as possible. In particular, I'm concerned about mapping multiple errnos >> into a single Error. For example both EPIPE and ESHUTDOWN mapping to >> BrokePipeError,

Re: [Python-Dev] PEP 3151 from the BDFOP

2011-08-29 Thread Barry Warsaw
On Aug 24, 2011, at 12:51 PM, Nick Coghlan wrote: >On Wed, Aug 24, 2011 at 9:57 AM, Antoine Pitrou wrote: >> Using IOError.__new__ is the easiest way to ensure that all code >> raising IO errors takes advantage of the errno mapping. Otherwise you >> may get APIs raising the proper subclasses, and

Re: [Python-Dev] PEP 3151 from the BDFOP

2011-08-23 Thread Nick Coghlan
On Wed, Aug 24, 2011 at 9:57 AM, Antoine Pitrou wrote: > I don't have any personal preference. Previous discussions seemed to > indicate people preferred IOError. But changing the implementation to > OSError would be simple. I agree OSError feels slightly more right, as > in more generic. IIRC, t

Re: [Python-Dev] PEP 3151 from the BDFOP

2011-08-23 Thread Antoine Pitrou
Hi, > One guiding principle for me is that we should keep the abstraction as thin as > possible. In particular, I'm concerned about mapping multiple errnos into a > single Error. For example both EPIPE and ESHUTDOWN mapping to BrokePipeError, > or EACESS or EPERM to PermissionError. I think we

[Python-Dev] PEP 3151 from the BDFOP

2011-08-23 Thread Barry Warsaw
I am sending this review as the BDFOP for PEP 3151. I've read the PEP and reviewed the python-dev discussion via Gmane. I have not reviewed the hg branch where Antoine has implemented it. I'm not quite ready to pronounce, but I do have some questions and comments. First off, thanks to Antoine fo