Skip to content

Importing dask breaks ipython's %pdb command #10450

Closed
dask/distributed
#8127

Description

@laurence-kobold

Describe the issue:

In an ipython shell, running the %pdb command turns on automatic pdb calling. If any later commands cause an exception to be raised, the debugger should be entered after the traceback is printed. If dask is imported, the debugger is no longer entered.

Minimal Complete Verifiable Example:

In an ipython shell:

In [1]: %pdb
Automatic pdb calling has been turned ON

In [2]: import dask

In [3]: raise ValueError("foo")
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[3], line 1
----> 1 raise ValueError("foo")

ValueError: foo

In [4]:

If dask is not imported, the debugger is entered as expected:

In [1]: %pdb
Automatic pdb calling has been turned ON

In [2]: raise ValueError("foo")
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[2], line 1
----> 1 raise ValueError("foo")

ValueError: foo
> <ipython-input-2-66d99343b0b5>(1)<module>()
----> 1 raise ValueError("foo")

ipdb>

Anything else we need to know?:

Environment:

  • Dask version: This happens with versions 2023.6.1, 2023.7.0 and 2023.7.1. This does not happen with 2023.6.0
  • Python version: 3.11.4
  • Operating System: Debian Bookworm (in python:3.11.4 docker container running on macOS 13.5)
  • Install method (conda, pip, source): pip

Activity

  1. added
    needs triage
    on Aug 17, 2023
  2. jrbourbeau commented on Aug 17, 2023

    @jrbourbeau
    Member

    Thanks @laurence-kobold for the issue. I'm able to reproduce and it looks like #10354 is where behavior started to change. @crusaderky do you have bandwidth to look into this?

  3. added
    bug
    and removed
    needs triage
    on Aug 17, 2023
  4. self-assigned this
    on Aug 21, 2023
  5. crusaderky commented on Aug 24, 2023

    @crusaderky
    Collaborator

    PRs are ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions