| msg52602 - (view) |
Author: wpy (wpy) |
Date: 2007-05-06 18:41 |
| The patch modify the raise statement, according to PEP 3109 and script fix_raise.py (available in sandbox directory of SVN). Compile all ok, but it's not complete: now, exiting from Python interpreter, there is Segmentation fault. I think to work on this problem in next days. |
|
|
| msg52603 - (view) |
Author: wpy (wpy) |
Date: 2007-05-07 17:06 |
| With compiler (GCC) options "-g3 -ggdb3" there isn't Segmentation fault. With default option "-g" yes.... |
|
|
| msg52604 - (view) |
Author: wpy (wpy) |
Date: 2007-05-07 17:56 |
| File Added: pep3109-2.patch |
|
|
| msg52605 - (view) |
Author: wpy (wpy) |
Date: 2007-05-08 14:12 |
| I have correct all errors. I hope that it is useful. File Added: pep3109.patch |
|
|
| msg52606 - (view) |
Author: Guido van Rossum (gvanrossum) *  |
Date: 2007-05-09 00:10 |
| Collin, can you review this? |
|
|
| msg52607 - (view) |
Author: Collin Winter (collinwinter) *  |
Date: 2007-05-11 05:14 |
| Issues: 0) The patch does not apply cleanly; please update it. 1) The patch is incorrect. It does not address the fact that compiling a 2-arg assert statement emits "RAISE_VARARGS 2". 2) The patch is spectacularly untested: because of (1), the interpreter crashes almost immediately when running regrtest.py. 3) Even if you fix (1), the patch is not refcount-correct: regrtest.py crashes after test_dict due to a refcounting error. Also: the patch implements the "e.__traceback__ = T" implicit assignment. The last I knew, there had never been a formal decision on whether to go ahead with that part of the PEP (there having been quite an uproar and whatnot). Guido: we may have kicked this particular can as far down the road as it's going to go. As soon as we come to a final decision on this, I have a tested, refcount-safe implementation that I'll put up on SF. |
|
|
| msg52608 - (view) |
Author: wpy (wpy) |
Date: 2007-05-11 09:24 |
| OK, today I will work on this problems. I hope to release a new patch in short time. |
|
|
| msg52609 - (view) |
Author: wpy (wpy) |
Date: 2007-05-11 15:08 |
| I have corrected the patch. 1) In the patch, I would to put also the modifications to .py files of distribution? I don't thought... So the patch become very big!!! If you want, I do it. The patch concerns to implementation (C source files) only!... 2) In the new patch I dropped the code for "__traceback__ part" of the PEP 3109. Therefore, after application of the fix_raise.py script to library some modules not works whatever. File Added: pep3109-2.patch |
|
|
| msg52610 - (view) |
Author: Collin Winter (collinwinter) *  |
Date: 2007-05-11 16:40 |
| The patch to Python/compile.c is still obviously incorrect, even more so than before. Try this: >>> assert True is False >>> And of course, this little gem: >>> assert True is False, "um really?" Traceback (most recent call last): TypeError: exceptions must derive from BaseException >>> Your unwillingness, inability or disinclination to properly test your patch is wasting my time. |
|
|
| msg52611 - (view) |
Author: Guido van Rossum (gvanrossum) *  |
Date: 2007-07-11 12:39 |
| Closing this for lack of progress. (Collin, how's your own version coming along?) |
|
|