Skip to content

4.4.0 regression for pdbcls #5039

@JBKahn

Description

@JBKahn

In my code I'm trying to define my own debugger class, which in this case is a bit of a hack to use ipdb I have a file with:

class Debugger(object):
    quitting = None

    def set_trace(self, frame):
        import ipdb  # noqa

        return ipdb.set_trace(frame)  # noqa

    def reset(self, *args, **kwargs):
        from ipdb.__main__ import _init_pdb

        pdb_obj = _init_pdb()
        pdb_obj.botframe = None  # not sure. exception otherwise at quit
        return pdb_obj.reset(*args, **kwargs)

    def interaction(self, *args, **kwargs):
        from ipdb.__main__ import _init_pdb

        pdb_obj = _init_pdb()
        pdb_obj.botframe = None  # not sure. exception otherwise at quit
        return pdb_obj.interaction(*args, **kwargs)

The code is now unable to import any class in my codebase at that step. I just get No module name X for every module in my local repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: debuggingrelated to the debugging builtin plugintype: regressionindicates a problem that was introduced in a release which was working previously

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions