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

Provide an interface consistent with pdb so that pudb can be used by pytest #221

Closed
anntzer opened this issue Feb 3, 2017 · 4 comments
Closed

Comments

@anntzer
Copy link
Contributor

anntzer commented Feb 3, 2017

pytest provides the switch --pdb in order to enter a debugger whenever a test fails. In pytest-dev/pytest#1712 I added the --pdbcls flag to pytest so that one can specify an arbitrary Pdb subclass; e.g. one can call py.test --pdbcls=IPython.core.debugger:Pdb --pdb to use the ipython debugger instead.

Unfortunately it is currently not possible to pass in pudb (py.test --pdbcls=pudb.debugger:Debugger --pdb) because the Debugger.interaction method has a completely different signature than Pdb.interaction (which is the entry point used), leading to a crash of pytest. Specifically, the signatures are

pdb.Pdb.interaction(self, frame, traceback)

and

pudb.debugger.Debugger.interaction(self, frame, exc_tuple=None, show_exc_dialog=True)

Would it be possible to modify the signature of Debugger.interaction so that the second argument becomes, say, exc_tuple_or_traceback (to maintain backcompatibility and also be compatible with pytest)?

@asmeurer
Copy link
Collaborator

asmeurer commented Feb 3, 2017

It sounds good to me. Have you tested it to see if there are any other compatibility issues that pop up?

@anntzer
Copy link
Contributor Author

anntzer commented Feb 3, 2017

Well, I haven't implemented anything and am not so familiar with pudb's internals so I can't tell.

@inducer
Copy link
Owner

inducer commented Feb 3, 2017

Likewise, sounds good to me. Try it out and send a PR if it turns out to work.

@anntzer
Copy link
Contributor Author

anntzer commented Oct 21, 2021

Closed by #224, IIRC.

@anntzer anntzer closed this as completed Oct 21, 2021
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

No branches or pull requests

3 participants