Re: [Python-Dev] [Python-checkins] cpython: Close #17828: better handling of codec errors

2013-11-19 Thread Nick Coghlan
On 19 November 2013 22:24, Walter Dörwald wrote: > On 15.11.13 00:02, Greg Ewing wrote: > >> Walter Dörwald wrote: >>> >>> Unfortunaty the frame from the decorator shows up in the traceback. >> >> >> Maybe the decorator could remove its own frame from >> the traceback? > > > True, this could be do

Re: [Python-Dev] [Python-checkins] cpython: Close #17828: better handling of codec errors

2013-11-19 Thread Walter Dörwald
On 15.11.13 00:02, Greg Ewing wrote: Walter Dörwald wrote: Unfortunaty the frame from the decorator shows up in the traceback. Maybe the decorator could remove its own frame from the traceback? True, this could be done via either an additional attribute on the frame, or a special value for

Re: [Python-Dev] [Python-checkins] cpython: Close #17828: better handling of codec errors

2013-11-15 Thread Nick Coghlan
On 15 November 2013 17:22, Stefan Behnel wrote: > > I can't see any bit of information being added by chaining the exceptions > in this specific case. > > Remember that each change to exception messages and/or exception chaining > will break someone's doctests somewhere, and it's really ugly to wo

Re: [Python-Dev] [Python-checkins] cpython: Close #17828: better handling of codec errors

2013-11-14 Thread Stefan Behnel
Nick Coghlan, 13.11.2013 17:25: > Note that the specific problem with just annotating the exception > rather than a specific frame is that you lose the stack context for > where the annotation occurred. The current chaining workaround doesn't > just change the exception message, it also breaks the

Re: [Python-Dev] [Python-checkins] cpython: Close #17828: better handling of codec errors

2013-11-14 Thread Greg Ewing
Walter Dörwald wrote: Unfortunaty the frame from the decorator shows up in the traceback. Maybe the decorator could remove its own frame from the traceback? -- Greg ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/lis

Re: [Python-Dev] [Python-checkins] cpython: Close #17828: better handling of codec errors

2013-11-14 Thread Walter Dörwald
On 14.11.13 14:22, Walter Dörwald wrote: On 13.11.13 17:25, Nick Coghlan wrote: >> [...] A more elegant (and comprehensive) solution as a PEP for 3.5 would certainly be a nice thing to have, but I think this is still much better than the 3.3 status quo. Thinking further about this, I like y

Re: [Python-Dev] [Python-checkins] cpython: Close #17828: better handling of codec errors

2013-11-14 Thread Walter Dörwald
On 13.11.13 17:25, Nick Coghlan wrote: On 14 November 2013 02:12, Nick Coghlan wrote: On 14 November 2013 00:30, Walter Dörwald wrote: On 13.11.13 14:51, nick.coghlan wrote: http://hg.python.org/cpython/rev/854a2cea31b9 changeset: 87084:854a2cea31b9 user:Nick Coghlan date:

Re: [Python-Dev] [Python-checkins] cpython: Close #17828: better handling of codec errors

2013-11-13 Thread Nick Coghlan
On 14 November 2013 02:12, Nick Coghlan wrote: > On 14 November 2013 00:30, Walter Dörwald wrote: >> On 13.11.13 14:51, nick.coghlan wrote: >> >>> http://hg.python.org/cpython/rev/854a2cea31b9 >>> changeset: 87084:854a2cea31b9 >>> user:Nick Coghlan >>> date:Wed Nov 13 23:49:21

Re: [Python-Dev] [Python-checkins] cpython: Close #17828: better handling of codec errors

2013-11-13 Thread Nick Coghlan
On 14 November 2013 00:30, Walter Dörwald wrote: > On 13.11.13 14:51, nick.coghlan wrote: > >> http://hg.python.org/cpython/rev/854a2cea31b9 >> changeset: 87084:854a2cea31b9 >> user:Nick Coghlan >> date:Wed Nov 13 23:49:21 2013 +1000 >> summary: >>Close #17828: better handli

Re: [Python-Dev] [Python-checkins] cpython: Close #17828: better handling of codec errors

2013-11-13 Thread Walter Dörwald
On 13.11.13 14:51, nick.coghlan wrote: http://hg.python.org/cpython/rev/854a2cea31b9 changeset: 87084:854a2cea31b9 user:Nick Coghlan date:Wed Nov 13 23:49:21 2013 +1000 summary: Close #17828: better handling of codec errors - output type errors now redirect users to the ty