We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We can slightly increase the information provided in warnings by adding which version the feature was deprecated in.
Python's warn() accepts instances of UserWarning, so we can customize the message without repeating the phrase "Deprecated in NEXT.VERSION" everywhere.
warn()
UserWarning
Steps:
version
message
PTBDeprecationWarning
__str__
"Depreacted in {self.version}: {self.message}"
Our call will now look like:
PTBDeprecationWarning("NEXT.VERSION", "msg")
Simply add the version information in the warning message, but then we'll have to keep repeating ourselves.
We can also do the same for PTBUserWarning and PTBRuntimeWarning.
PTBUserWarning
PTBRuntimeWarning
The text was updated successfully, but these errors were encountered:
@harshil21 We would need several version classes, no? We can deprecate in different (minor) versions before they vanish
Sorry, something went wrong.
We would need several version classes, no?
edited comment to better reflect what I meant
Successfully merging a pull request may close this issue.
What kind of feature are you missing? Where do you notice a shortcoming of PTB?
We can slightly increase the information provided in warnings by adding which version the feature was deprecated in.
Describe the solution you'd like
Python's
warn()
accepts instances ofUserWarning
, so we can customize the message without repeating the phrase "Deprecated in NEXT.VERSION" everywhere.Steps:
version
andmessage
toPTBDeprecationWarning
.__str__
to add the phrase"Depreacted in {self.version}: {self.message}"
Our call will now look like:
Describe alternatives you've considered
Simply add the version information in the warning message, but then we'll have to keep repeating ourselves.
Additional context
We can also do the same for
PTBUserWarning
andPTBRuntimeWarning
.The text was updated successfully, but these errors were encountered: