Skip to content

new-style exceptions #41459

Closed
Closed

Description

@mwhudson
BPO 1104669
Nosy @mwhudson, @tim-one, @brettcannon, @ncoghlan, @simonpercivall
Files
  • new-new-new-new-new-style-exceptions.diff: mwh's attempt Update Python Software Foundation Copyright Year. #4
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2006-03-01.04:35:57.000>
    created_at = <Date 2005-01-18.18:09:36.000>
    labels = ['interpreter-core']
    title = 'new-style exceptions'
    updated_at = <Date 2006-03-01.04:35:57.000>
    user = 'https://github.com/mwhudson'

    bugs.python.org fields:

    activity = <Date 2006-03-01.04:35:57.000>
    actor = 'brett.cannon'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2005-01-18.18:09:36.000>
    creator = 'mwh'
    dependencies = []
    files = ['6445']
    hgrepos = []
    issue_num = 1104669
    keywords = ['patch']
    message_count = 15.0
    messages = ['47572', '47573', '47574', '47575', '47576', '47577', '47578', '47579', '47580', '47581', '47582', '47583', '47584', '47585', '47586']
    nosy_count = 7.0
    nosy_names = ['mwh', 'tim.peters', 'brett.cannon', 'mcherm', 'jimjjewett', 'ncoghlan', 'simon.percivall']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1104669'
    versions = ['Python 2.5']

    Activity

    1. mwhudson commented on Jan 18, 2005

      @mwhudson
      Author

      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).

    2. simonpercivall commented on Jan 18, 2005

      simonpercivallmannequin
      Mannequin

      Logged In: YES
      user_id=329382

      One thing: Raising an old-style class/instance doesn't give a traceback or
      populate sys.last_*.

    3. mwhudson commented on Jan 19, 2005

      @mwhudson
      Author

      Logged In: YES
      user_id=6656

      You're right! Odd. No time to fix it today, I'm afraid.

    4. mwhudson commented on Feb 9, 2005

      @mwhudson
      Author

      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...

    5. mwhudson commented on Feb 15, 2005

      @mwhudson
      Author

      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.

    6. tim-one commented on Feb 15, 2005

      @tim-one
      Member

      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.

    7. tim-one commented on Feb 15, 2005

      @tim-one
      Member

      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.

    8. jimjjewett commented on Feb 15, 2005

      jimjjewettmannequin
      Mannequin

      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?

    9. mwhudson commented on Feb 15, 2005

      @mwhudson
      Author

      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!

    10. jimjjewett commented on Feb 15, 2005

      jimjjewettmannequin
      Mannequin

      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.)

    11. mwhudson commented on Feb 15, 2005

      @mwhudson
      Author

      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 :)

    12. mwhudson commented on Dec 5, 2005

      @mwhudson
      Author

      Logged In: YES
      user_id=6656

      Here's a patch updated to SVN HEAD (the PEP-342 implementation meant this
      wasn't quite trivial).

    13. ncoghlan commented on Dec 10, 2005

      @ncoghlan
      Contributor

      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)

    14. mcherm commented on Dec 12, 2005

      mchermmannequin
      Mannequin

      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.

    15. brettcannon commented on Mar 1, 2006

      @brettcannon
      Member

      Logged In: YES
      user_id=357491

      Rev. 42711 has the patch with the requisite tweaks for it to
      work for PEP-352.

      Thanks, Michael!

    16. transferred this issue fromon Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      interpreter-core(Objects, Python, Grammar, and Parser dirs)

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions