Closed max-sixty closed 6 months ago
Overriding a system library completely is a dangerous practice. The safer way in a runtime-only override. That's achieved by adding import pdbp
to an __init__.py
file for pdbp
. That should be enough to get the same results without completely overriding the system library.
Overriding a system library completely is a dangerous practice. The safer way in a runtime-only override. That's achieved by adding
import pdbp
to an__init__.py
file forpdbp
.
Right. I agree with the tradeoff, and admire that you are defaulting to the conservative choice.
I guess we weigh the tax of adding that code to each non-personal project differently. There's no other tool for which I need to maintain uncommitted changes in every project, and can no longer run git commit -am
...
Any thoughts on the pytest capture question?
It seems like
--capture=tee-sys
is discussed in, but I would note that neitherpdb
norpdbpp
require this — are we confident it's not possible to avoid it?
Thanks again!
There might be another pytest
way of handling --capture=tee-sys
, but it might be a question for pytest
maintainers.
I do know that you can use a pytest.ini
file for reusable options.
OK — though neither pdb
nor pdbpp
require that arg in pytest — so it doesn't seem like a pytest issue...
Thanks...
Thanks a lot for
pdbp
! I've already started using it lots, gradually replacingpdbpp
.Running
pdbpp
within pytest seems more complicated than previous alternatives, particularly in a project where we don't want to change the python code, or when recommending it to others who just want a simple command.Currently I'm doing:
--capture=tee-sys
is discussed in https://github.com/mdmintz/pdbp/issues/57, but I would note that neitherpdb
norpdbpp
require this — are we confident it's not possible to avoid it?--pdbcls=pdbp:Pdb
is a pytest frailty from https://github.com/pytest-dev/pytest/issues/5498. But would it be worth documenting it?I appreciate the sentiments behind not blindly overriding pdb, relative to pdbpp's practice. But would there be any interest in
pip install pdbp[pdb]
, which would overridepdb
likepdbpp
does? While your approach is purer, thepdbpp
override was overall a better experience on that dimension.