Fix TypeError while unpickling TelegramError (and children)#2106
Fix TypeError while unpickling TelegramError (and children)#2106Bibo-Joshi merged 5 commits intopython-telegram-bot:masterfrom Delgan:GH-2105-fix-exception-pickling
Conversation
Bibo-Joshi
left a comment
There was a problem hiding this comment.
Hi. Thanks for the quick PR! I left two comments for you.
|
@Bibo-Joshi If we ever introduce a new exception which inherits from Maybe we also need a unitests which looks at |
It wouldn't. But we might not be directly inheriting from TGError, so we would need a recursive loop. Should be doable, just not with parametrize. I can have a look, when I'm back at a keyboard and had some sleep :D |
|
@Bibo-Joshi A basic and very naive unitest, yet serving the purpose would use the subclasses method in order to retrieve a list of methods and compare it to a pre-known const. Basically the idea is to make us remember that we need to implement un/pickling... |
|
Added the "meta-test" and in the process found that there is a |
|
Thank your for your contribution @Delgan :) |
Hi.
This is a possible fix for #2105.
Let me know if you think this can be improved in any way.