bpdb: fix TypeError with pdbpp's __init__
#639
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using bpdb together with pdb++ [1], using
debug …
will cause aTypeError, because pdbpp passes in a
Config
kwarg [2].This patch fixes bpdb to accept and pass on any args/kwargs.
For reference, this is the stacktrace when pdb++ gets instantiated:
File "…/venv/lib/python3.5/site-packages/pytestbpdb/ptbpdb.py", line 50, in set_trace
pdb.BPdb().set_trace(frame)
File "…/venv/lib/python3.5/site-packages/bpdb/debugger.py", line 33, in init
pdb.Pdb.init(self)
File "…/venv/lib/python3.5/site-packages/pdb.py", line 198, in init
print(traceback.print_stack())
1: https://pypi.python.org/pypi/pdbpp/
2: https://bitbucket.org/antocuni/pdb/src/cf937bbd910a8f7fe2b84af7cf5ee9dc96c2fe25/pdb.py?fileviewer=file-view-default#pdb.py-633