Patches item #1104669, was opened at 2005-01-18 13:09 Message generated for change (Comment added) made by mcherm You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1104669&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 2.5 Status: Open Resolution: None Priority: 5 Submitted By: Michael Hudson (mwh) Assigned to: Nobody/Anonymous (nobody) Summary: new-style exceptions Initial Comment: This patch allows new-style exceptions and makes Exception a new-style class. The test suite runs, apart from failures in test_tempfile (will dig, but doubt this is my fault) and test__locale (known OS X problem). ---------------------------------------------------------------------- >Comment By: Michael Chermside (mcherm) Date: 2005-12-12 12:00 Message: Logged In: YES user_id=99874 I haven't tried out the patch, I just want to chime in to say how VERY much I would like to have this. I'm ready NOW to completely give up using old-style classes, but because of exceptions I'm not allowed to. This would fix that for me. If Python had a "vote for your favorite bugs" list, I'd be voting for this one. ---------------------------------------------------------------------- Comment By: Nick Coghlan (ncoghlan) Date: 2005-12-10 12:19 Message: Logged In: YES user_id=1038590 New patch worked fine on Ubuntu 5.10 (all tests in 'make test' passed, aside from the skips due to the various extension modules I can't build) ---------------------------------------------------------------------- Comment By: Michael Hudson (mwh) Date: 2005-12-05 17:17 Message: Logged In: YES user_id=6656 Here's a patch updated to SVN HEAD (the PEP 342 implementation meant this wasn't quite trivial). ---------------------------------------------------------------------- Comment By: Michael Hudson (mwh) Date: 2005-02-15 14:37 Message: Logged In: YES user_id=6656 > Is it worth adding a comment on parsing precedence? I've been studiously avoiding thinking about that :) > Making something both an instance and a subclass of > anything besides object might be weird enough that you > don't *want* to document the results yet. Quite. What happens, happens IMHO. I'm prepared to be argued into a different position on this, but I do think the only reason someone would do this is curiousity :) ---------------------------------------------------------------------- Comment By: Jim Jewett (jimjjewett) Date: 2005-02-15 12:51 Message: Logged In: YES user_id=764593 Is it worth adding a comment on parsing precedence? An object can be both an instance and a class, which puts some ambiguity between "raise class" and "raise classinstance". Assuming the class seems sensible; I'm just wondering whether it should be made explicit. (Making something both an instance and a subclass of anything besides object might be weird enough that you don't *want* to document the results yet.) ---------------------------------------------------------------------- Comment By: Michael Hudson (mwh) Date: 2005-02-15 12:39 Message: Logged In: YES user_id=6656 Jim: Yes. It looks like I ran delete-trailing-whitespace on the file at some point. I could redo the diff without them, but it would be tedious... Tim: thanks! ---------------------------------------------------------------------- Comment By: Jim Jewett (jimjjewett) Date: 2005-02-15 12:34 Message: Logged In: YES user_id=764593 Several lines near the end of errors.c had no visible change. Was this a whitespace cleanup, or is this a risk of tab/space mixing? ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2005-02-15 11:17 Message: Logged In: YES user_id=31435 FYI, there's nothing special about PicklingError in the pickletools doctest, it's just aiming at an example of an instance -- that it's also an exception instance is irrelevant to what the test is aiming at. Tell you what: I'll check in a suitable change to pickletools.py, so that the example it uses stops interfering with this patch. ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2005-02-15 11:03 Message: Logged In: YES user_id=31435 FYI, there's nothing special about PicklingError in the pickletools doctest, it's just aiming at an example of an instance -- that it's also an exception instance is irrelevant to what the test is aiming at. Tell you what: I'll check in a suitable change to pickletools.py, so that the example it uses stops interfering with this patch. ---------------------------------------------------------------------- Comment By: Michael Hudson (mwh) Date: 2005-02-15 10:40 Message: Logged In: YES user_id=6656 I found the final wart (caught by test_tempfile of all things). I think the attached is good to go. Issues remaining: test_pickletools fails, because PickleError is now new- style and thus pickles differently. Docs. ---------------------------------------------------------------------- Comment By: Michael Hudson (mwh) Date: 2005-02-09 09:18 Message: Logged In: YES user_id=6656 New patch attached. Did this a while ago, don't actually remember the details of what's new :-/ The problem with the previous patch was that one of my exception- checking macros had the side-effect of clearing any pending exception... ---------------------------------------------------------------------- Comment By: Michael Hudson (mwh) Date: 2005-01-19 08:25 Message: Logged In: YES user_id=6656 You're right! Odd. No time to fix it today, I'm afraid. ---------------------------------------------------------------------- Comment By: Simon Percivall (percivall) Date: 2005-01-18 14:47 Message: Logged In: YES user_id=329382 One thing: Raising an old-style class/instance doesn't give a traceback or populate sys.last_*. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1104669&group_id=5470 _______________________________________________ Patches mailing list [email protected] http://mail.python.org/mailman/listinfo/patches
