pudb icon indicating copy to clipboard operation
pudb copied to clipboard

How do I prevent the 'safely_stringify_for_pudb' attribute tests when inspecting code?

Open emehrkay opened this issue 8 years ago • 7 comments

Python 3.6 (2.7 is okay)

My object is setup to capture all __getattr__ requests and build other objects from it. So when I am inspecting my code, pudb is always running this check and messing things up.

The only solution that I could come up with was to add a method like this:

    def safely_stringify_for_pudb(self):
        return None

There is a better way right?

emehrkay avatar Oct 01 '17 19:10 emehrkay

I'd be happy to take a patch that either makes a global setting to turn this off or that turns this off for objects that override __getattr__.

inducer avatar Oct 01 '17 19:10 inducer

It would probably make more sense as a global setting. I'll take a look through the code and see if I can come up with anything.

emehrkay avatar Oct 01 '17 22:10 emehrkay

This attribute causes an exception in my code that uses suds, so I can't use pudb with it.

offero avatar May 11 '18 18:05 offero

I'd be happy to consider a patch that makes your life better.

inducer avatar May 11 '18 18:05 inducer

version 2017.1.2 works well pip3 install -U --user pudb==2017.1.2

lega911 avatar May 22 '18 21:05 lega911

How is 2018.1 (just released)? (with #276)

inducer avatar May 24 '18 11:05 inducer

2018.1 seems works fine, tested on python 3.6

lega911 avatar May 24 '18 12:05 lega911