Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call sys.except_hook if exception occurs in __del__ #44788

Closed
jpe mannequin opened this issue Mar 30, 2007 · 3 comments
Closed

Call sys.except_hook if exception occurs in __del__ #44788

jpe mannequin opened this issue Mar 30, 2007 · 3 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@jpe
Copy link
Mannequin

jpe mannequin commented Mar 30, 2007

BPO 1691387
Nosy @bitdancer
Superseder
  • bpo-7317: Display full tracebacks when an error occurs asynchronously
  • 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 2013-03-18.20:39:04.745>
    created_at = <Date 2007-03-30.15:49:23.000>
    labels = ['interpreter-core', 'type-feature']
    title = 'Call sys.except_hook if exception occurs in __del__'
    updated_at = <Date 2013-03-18.20:39:04.743>
    user = 'https://bugs.python.org/jpe'

    bugs.python.org fields:

    activity = <Date 2013-03-18.20:39:04.743>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2013-03-18.20:39:04.745>
    closer = 'r.david.murray'
    components = ['Interpreter Core']
    creation = <Date 2007-03-30.15:49:23.000>
    creator = 'jpe'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 1691387
    keywords = []
    message_count = 3.0
    messages = ['55052', '109837', '184516']
    nosy_count = 3.0
    nosy_names = ['jpe', 'r.david.murray', 'BreamoreBoy']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '7317'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue1691387'
    versions = ['Python 3.2']

    @jpe
    Copy link
    Mannequin Author

    jpe mannequin commented Mar 30, 2007

    Is there a reason why sys.except_hook isn't called when __del__ returns with an exception? If not, I can write a patch to call sys.except_hook from PyErr_WriteUnraisable. The default of printing the full traceback should be possible in many situations.

    @jpe jpe mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement labels Mar 30, 2007
    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jul 10, 2010

    Please provide a patch.

    @bitdancer
    Copy link
    Member

    Re-reported and fixed in bpo-7317.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant