Skip to content

Don't use exception hooks to shorten tracebacks [1/2]#10456

Merged
crusaderky merged 2 commits intodask:mainfrom
crusaderky:ipdb_except_hook
Aug 24, 2023
Merged

Don't use exception hooks to shorten tracebacks [1/2]#10456
crusaderky merged 2 commits intodask:mainfrom
crusaderky:ipdb_except_hook

Conversation

@crusaderky
Copy link
Copy Markdown
Collaborator

@crusaderky crusaderky commented Aug 22, 2023

Remove interpreter-level exception hooks.

Reattach hooks explicitly to

  • dask.compute
  • dask.persist
  • (dask collection).compute
  • (dask collection).persist

The latter two display a single spurious frame, which I decided to leave there for the sake of simplicity.

dask/distributed#8127 is the twin PR in distributed to reinsert the cleanup in

  • distributed.Future.result
  • distributed.Future.__await__
  • distributed.Client.gather

CC @jrbourbeau

@crusaderky crusaderky self-assigned this Aug 22, 2023
@crusaderky crusaderky marked this pull request as draft August 22, 2023 14:52
@crusaderky crusaderky force-pushed the ipdb_except_hook branch 3 times, most recently from 47d2fc9 to 479ff18 Compare August 23, 2023 11:11
@crusaderky crusaderky marked this pull request as ready for review August 24, 2023 11:22
@hendrikmakait hendrikmakait self-requested a review August 24, 2023 11:36
Copy link
Copy Markdown
Member

@hendrikmakait hendrikmakait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @crusaderky!

Co-authored-by: Hendrik Makait <hendrik@makait.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Importing dask breaks ipython's %pdb command

2 participants