Re: [Cython] Control Flow

2011-05-28 Thread Stefan Behnel
Stefan Behnel, 28.05.2011 18:06: Let's see how much of Sage we break. ... quite a bit. From a superficial glance, there seem to be some real bugs, but most of the failures and warnings are most likely just uninitialised variables that are expected to be None. https://sage.math.washington.ed

Re: [Cython] Redundant Cython exception message strings

2011-05-28 Thread Stefan Behnel
Robert Bradshaw, 28.05.2011 18:14: On Sat, May 28, 2011 at 1:15 AM, Vitja Makarov wrote: So maybe I should add functions like __Pyx_RaiseUnboundLocalError and __Pyx_RaiseClosureNameError that will use 3) way. How do you like put_error_if_unbound CCodeWriter method is that right place for it?

Re: [Cython] Redundant Cython exception message strings

2011-05-28 Thread Robert Bradshaw
On Sat, May 28, 2011 at 2:37 AM, Stefan Behnel wrote: > Robert Bradshaw, 28.05.2011 00:39: >> >> On Fri, May 27, 2011 at 3:32 PM, Stefan Behnel wrote: >>> >>> I recently stumbled over a tradeoff question with AttributeError, and now >>> found the same situation for UnboundLocalError in Vitja's con

Re: [Cython] Redundant Cython exception message strings

2011-05-28 Thread Robert Bradshaw
On Sat, May 28, 2011 at 1:15 AM, Vitja Makarov wrote: > 2011/5/28 Robert Bradshaw : >> On Fri, May 27, 2011 at 3:32 PM, Stefan Behnel wrote: >>> Hi, >>> >>> I recently stumbled over a tradeoff question with AttributeError, and now >>> found the same situation for UnboundLocalError in Vitja's cont

Re: [Cython] Control Flow

2011-05-28 Thread Stefan Behnel
Vitja, here are some more quirks, but they are minor issues. I'll commit my changes to lxml to keep it working, and then merge in the branch. It's certainly in a "good enough for a merge" state. I'm actually surprised how few problems I had to fix, given how old the code in lxml is by now. L

Re: [Cython] Control Flow

2011-05-28 Thread Stefan Behnel
Vitja Makarov, 28.05.2011 16:58: -Wextra enables "maybe uninitialized" warning and unused entry. Interesting: cdef int _raise_if_stored(self) except -1: if self._exc_info is None: return 0 type, value, traceback = self._exc_info self._exc_info = None

Re: [Cython] Control Flow

2011-05-28 Thread Stefan Behnel
Vitja Makarov, 28.05.2011 16:58: 2011/5/28 Stefan Behnel: Vitja Makarov, 28.05.2011 14:12: 2011/5/28 Stefan Behnel: Ok, I think we're done then, right? Anything else to do before merging it back? I hope so ;) I gave your branch a test with lxml and it spit out a couple of missing initial

Re: [Cython] Control Flow

2011-05-28 Thread Vitja Makarov
2011/5/28 Stefan Behnel : > Vitja Makarov, 28.05.2011 14:12: >> >> 2011/5/28 Stefan Behnel: >>> >>> Ok, I think we're done then, right? Anything else to do before merging it >>> back? >> >> I hope so ;) > > I gave your branch a test with lxml and it spit out a couple of missing > initialisation war

Re: [Cython] Control Flow

2011-05-28 Thread Stefan Behnel
Vitja Makarov, 28.05.2011 14:12: 2011/5/28 Stefan Behnel: Ok, I think we're done then, right? Anything else to do before merging it back? I hope so ;) I gave your branch a test with lxml and it spit out a couple of missing initialisation warnings. Most of them were due to the usage of C out

Re: [Cython] Control Flow

2011-05-28 Thread Vitja Makarov
2011/5/28 Stefan Behnel : > Vitja Makarov, 28.05.2011 13:48: >> >> 2011/5/28 Stefan Behnel: >>> >>> Vitja Makarov, 28.05.2011 11:48: 2011/5/28 Robert Bradshaw: > > On Fri, May 27, 2011 at 7:27 AM, Vitja Makarov wrote: >> >> I've recently fixed some issues: >> >>  -

Re: [Cython] Control Flow

2011-05-28 Thread Stefan Behnel
Vitja Makarov, 28.05.2011 13:48: 2011/5/28 Stefan Behnel: Vitja Makarov, 28.05.2011 11:48: 2011/5/28 Robert Bradshaw: On Fri, May 27, 2011 at 7:27 AM, Vitja Makarov wrote: I've recently fixed some issues: - closure variables were not tracked - scoped expression variables were initiali

Re: [Cython] Control Flow

2011-05-28 Thread Vitja Makarov
2011/5/28 Stefan Behnel : > Vitja Makarov, 28.05.2011 11:48: >> >> 2011/5/28 Robert Bradshaw: >>> >>> On Fri, May 27, 2011 at 7:27 AM, Vitja Makarov wrote: I've recently fixed some issues:  - closure variables were not tracked  - scoped expression variables were initialized

Re: [Cython] Control Flow

2011-05-28 Thread Stefan Behnel
Vitja Makarov, 28.05.2011 11:48: 2011/5/28 Robert Bradshaw: On Fri, May 27, 2011 at 7:27 AM, Vitja Makarov wrote: I've recently fixed some issues: - closure variables were not tracked - scoped expression variables were initialized to None So, I should fix broken tests, here are some of th

Re: [Cython] Control Flow

2011-05-28 Thread Vitja Makarov
2011/5/28 Robert Bradshaw : > On Fri, May 27, 2011 at 7:27 AM, Vitja Makarov > wrote: >> I've recently fixed some issues: >> >>  - closure variables were not tracked >>  - scoped expression variables were initialized to None >> >> So, I should fix broken tests, here are some of them: >> >> nogil

Re: [Cython] Redundant Cython exception message strings

2011-05-28 Thread Stefan Behnel
Robert Bradshaw, 28.05.2011 00:39: On Fri, May 27, 2011 at 3:32 PM, Stefan Behnel wrote: I recently stumbled over a tradeoff question with AttributeError, and now found the same situation for UnboundLocalError in Vitja's control flow branch. So here it is. When we raise an exception several tim

Re: [Cython] Redundant Cython exception message strings

2011-05-28 Thread Vitja Makarov
2011/5/28 Robert Bradshaw : > On Fri, May 27, 2011 at 3:32 PM, Stefan Behnel wrote: >> Hi, >> >> I recently stumbled over a tradeoff question with AttributeError, and now >> found the same situation for UnboundLocalError in Vitja's control flow >> branch. So here it is. >> >> When we raise an exce