Re: [Python-Dev] Reference cycles in Exception.__traceback__

2014-03-06 Thread Nick Coghlan
On 6 Mar 2014 23:44, "Antoine Pitrou" wrote: > > Le 05/03/2014 23:53, Nick Coghlan a écrit : >> >> >> __traceback__ wouldn't change [...] > > > Uh, really? If you want to suppress all reference cycles, you *have* to remove __traceback__. > > The problem is to make computation of the traceback summ

Re: [Python-Dev] Reference cycles in Exception.__traceback__

2014-03-06 Thread Victor Stinner
Hi, 2014-03-06 16:19 GMT+01:00 Victor Stinner : > By the way, here is my test script to try to create a lightweight > traceback object without references to locals: > https://bitbucket.org/haypo/misc/src/tip/python/suppress_locals.py > > It works if there is no chained exception. I updated my pro

Re: [Python-Dev] Alternative forms [was: PEP 463: Exception-catching expressions]

2014-03-06 Thread Chris Angelico
On Fri, Mar 7, 2014 at 7:29 AM, Jim J. Jewett wrote: > > The PEP currently says: > >> Alternative Proposals >> = > >> Discussion on python-ideas brought up the following syntax suggestions:: > >>value = expr except default if Exception [as e] > > This one was rejected becau

Re: [Python-Dev] Reference cycles in Exception.__traceback__

2014-03-06 Thread Greg Ewing
Antoine Pitrou wrote: We might allow the creation of traceback objects, but without any custom frame objects it is unclear how useful that would be. When I was implementing Pyrex, I would have found it very useful to be able to create Traceback objects without Frames, but only if the Traceback

Re: [Python-Dev] Reference cycles in Exception.__traceback__

2014-03-06 Thread Guido van Rossum
It's all very old C code that's deeply intertwined with interpreter internals. Who knows what kind of assumptions are made by some of the C code consuming frames and tracebacks... On Thu, Mar 6, 2014 at 12:38 PM, Xavier Morel wrote: > On 2014-03-06, at 19:32 , Guido van Rossum wrote: > > But in

Re: [Python-Dev] Reference cycles in Exception.__traceback__

2014-03-06 Thread Xavier Morel
On 2014-03-06, at 19:32 , Guido van Rossum wrote: > But inspect is in the stdlib. Surely changing inspect.py is less > controversial than amending the semantics of frame objects. I've no idea, I'm just giving a case where I could have used the ability to create traceback objects even without the

[Python-Dev] Alternative forms [was: PEP 463: Exception-catching expressions]

2014-03-06 Thread Jim J. Jewett
The PEP currently says: > Alternative Proposals > = > Discussion on python-ideas brought up the following syntax suggestions:: >value = expr except default if Exception [as e] This one was rejected because of the out-of-order evaluation. Note, however, that the (fart

Re: [Python-Dev] Reference cycles in Exception.__traceback__

2014-03-06 Thread Yury Selivanov
But having exceptions without '__traceback__' affects not only the inspect module, but also lots of other code. It will make harder to write generic error reporting code, as you'd need to check for __traceback__ first, and then, if it's None, look for some other, asyncio specific attribute. I th

Re: [Python-Dev] Cherry-pick between Python 3.4 RC2 and final?

2014-03-06 Thread Ethan Furman
On 03/04/2014 06:46 PM, Larry Hastings wrote: On 03/04/2014 03:59 PM, Barry Warsaw wrote: I too would like an rc3, especially to see if issue 19021 can be fixed, which I suspect will hit a lot of people. I talked to the other guys on the 3.4 team, and we're all willing to do an rc3 this weeke

Re: [Python-Dev] Reference cycles in Exception.__traceback__

2014-03-06 Thread Guido van Rossum
But inspect is in the stdlib. Surely changing inspect.py is less controversial than amending the semantics of frame objects. On Thu, Mar 6, 2014 at 10:10 AM, Xavier Morel wrote: > On 2014-03-06, at 16:52 , Antoine Pitrou wrote: > > Le 06/03/2014 16:03, Yury Selivanov a écrit : > >> > >> On 2014

Re: [Python-Dev] Reference cycles in Exception.__traceback__

2014-03-06 Thread Xavier Morel
On 2014-03-06, at 16:52 , Antoine Pitrou wrote: > Le 06/03/2014 16:03, Yury Selivanov a écrit : >> >> On 2014-03-06, 8:42 AM, Antoine Pitrou wrote: >>> Le 05/03/2014 23:53, Nick Coghlan a écrit : __traceback__ wouldn't change [...] >>> >>> Uh, really? If you want to suppress all refer

Re: [Python-Dev] Reference cycles in Exception.__traceback__

2014-03-06 Thread Antoine Pitrou
Le 06/03/2014 16:03, Yury Selivanov a écrit : On 2014-03-06, 8:42 AM, Antoine Pitrou wrote: Le 05/03/2014 23:53, Nick Coghlan a écrit : __traceback__ wouldn't change [...] Uh, really? If you want to suppress all reference cycles, you *have* to remove __traceback__. The problem is to make c

Re: [Python-Dev] Reference cycles in Exception.__traceback__

2014-03-06 Thread Victor Stinner
2014-03-06 14:42 GMT+01:00 Antoine Pitrou : > Le 05/03/2014 23:53, Nick Coghlan a écrit : >> >> >> __traceback__ wouldn't change [...] > > > Uh, really? If you want to suppress all reference cycles, you *have* to > remove __traceback__. > > The problem is to make computation of the traceback summar

Re: [Python-Dev] Reference cycles in Exception.__traceback__

2014-03-06 Thread Yury Selivanov
On 2014-03-06, 8:42 AM, Antoine Pitrou wrote: Le 05/03/2014 23:53, Nick Coghlan a écrit : __traceback__ wouldn't change [...] Uh, really? If you want to suppress all reference cycles, you *have* to remove __traceback__. The problem is to make computation of the traceback summary lightwei

Re: [Python-Dev] Reference cycles in Exception.__traceback__

2014-03-06 Thread Antoine Pitrou
Le 05/03/2014 23:53, Nick Coghlan a écrit : __traceback__ wouldn't change [...] Uh, really? If you want to suppress all reference cycles, you *have* to remove __traceback__. The problem is to make computation of the traceback summary lightweight enough that it doesn't degrade performance i

Re: [Python-Dev] cpython (3.3): Make the various iterators' "setstate" sliently and consistently clip the

2014-03-06 Thread Serhiy Storchaka
05.03.14 17:24, kristjan.jonsson написав(ла): http://hg.python.org/cpython/rev/3b2c28061184 changeset: 89477:3b2c28061184 branch: 3.3 parent: 89475:24d4e52f4f87 user:Kristján Valur Jónsson date:Wed Mar 05 13:47:57 2014 + summary: Make the various iterators' "se