Patches item #1713889, was opened at 2007-05-06 14:41 Message generated for change (Comment added) made by collinwinter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1713889&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core (C code) Group: Python 3000 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Alessio G. B. (wpy) Assigned to: Collin Winter (collinwinter) Summary: Patch for PEP 3109 Initial Comment: 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. ---------------------------------------------------------------------- >Comment By: Collin Winter (collinwinter) Date: 2007-05-11 12:40 Message: Logged In: YES user_id=1344176 Originator: NO 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. ---------------------------------------------------------------------- Comment By: Alessio G. B. (wpy) Date: 2007-05-11 11:08 Message: Logged In: YES user_id=1373701 Originator: YES 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 ---------------------------------------------------------------------- Comment By: Alessio G. B. (wpy) Date: 2007-05-11 05:24 Message: Logged In: YES user_id=1373701 Originator: YES OK, today I will work on this problems. I hope to release a new patch in short time. ---------------------------------------------------------------------- Comment By: Collin Winter (collinwinter) Date: 2007-05-11 01:14 Message: Logged In: YES user_id=1344176 Originator: NO 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. ---------------------------------------------------------------------- Comment By: Guido van Rossum (gvanrossum) Date: 2007-05-08 20:10 Message: Logged In: YES user_id=6380 Originator: NO Collin, can you review this? ---------------------------------------------------------------------- Comment By: Alessio G. B. (wpy) Date: 2007-05-08 10:12 Message: Logged In: YES user_id=1373701 Originator: YES I have correct all errors. I hope that it is useful. File Added: pep3109.patch ---------------------------------------------------------------------- Comment By: Alessio G. B. (wpy) Date: 2007-05-07 13:56 Message: Logged In: YES user_id=1373701 Originator: YES File Added: pep3109-2.patch ---------------------------------------------------------------------- Comment By: Alessio G. B. (wpy) Date: 2007-05-07 13:06 Message: Logged In: YES user_id=1373701 Originator: YES With compiler (GCC) options "-g3 -ggdb3" there isn't Segmentation fault. With default option "-g" yes.... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1713889&group_id=5470 _______________________________________________ Patches mailing list Patches@python.org http://mail.python.org/mailman/listinfo/patches