Copy link
Copy Markdown
Member
Closes #2467
Notes:
-
Made
Telegram{User, Deprecation}Warningpublic and is accessible bytelegram.utils.deprecate. We can change it later depending on Clear up imports policy #2468. Edit: Review now made it accessible viatelegram.utils.warnings -
some warnings don't have stacklevels because they take place in another thread so its not possible to get the caller
-
update some warning messages to be more descriptive.
Copy link
Copy Markdown
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far! Comments:
- Even if import policy is changed in #2468, we should probably rename
utils.deprecatetoutils.warningsalready since that file is now no longer exclusively for deprecation - Just a thought: Maybe it's worth adding a function
utils.warnings.warn, which acts as a shortcut forwarnings.warnwith a defaultcategory=TelegramUserWarning? - Another thought: Maybe
PTB*Warningis better thanTG*Warningb/c the warnings are issued by PTB and not by TG?
Merged
4 tasks