-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix TypeError while unpickling TelegramError (and children) #2106
Fix TypeError while unpickling TelegramError (and children) #2106
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.