Conversation
|
Thanks @Wauplin! :) Which python version do you use? I added comments to the changes itself, as I'm not sure about the fix itself yet. |
deepkit/__init__.py
Outdated
|
|
||
| def __getattr__(self, name): | ||
| if name == "s": | ||
| super(StdHook, self).__getattr__(name) |
There was a problem hiding this comment.
shouldn't this have a return statement? Or what is this supposed to do? super(StdHook) doesn't look right to me since StdHook has no parent class? I'm not sure I understand this fix.
return super(StdHook, self).__getattr__(name)|
Hi @marcj, thanks for the quick feedback
I'm using Python 3.8.10 and I have to admit, I didn't try any other version.
Yes, my mistake.
I have changed a bit the fix and added some comments with some references to explain basically what's happening. In fact, |
Hi !
First of all, thanks a lot for this package and for the Deepkit software in general ! We are using it to share experiments internally in our team and it helps a lot 😃
I encountered an issue when trying to debug my code using pdb. It has to do with the terminal (stdout) that is catched around the
StdHookwrapper that logs messages to Deepkit. When I use pdb, I cannot use the arrows to retrieve previous expressions. It is the same issue as described in this issue (even though it's a different package and the source of the problem is different).I have made a workaround to redirect all calls to
StdHookobject to the inner objectself.s, except for thewritemethod which is the one that needs to be overloaded. Maybe this slight improvement can be useful for other people 🙂