Skip to content

Conversation

@harshil21
Copy link
Member

@harshil21 harshil21 commented Jun 26, 2021

Adds the stacklevel parameter and details the warning message to set_new_attribute_deprecated so users can pinpoint where the warning originates from.

In response to https://t.me/pythontelegrambotgroup/491855

@Bibo-Joshi Bibo-Joshi self-requested a review June 28, 2021 06:59
@Bibo-Joshi
Copy link
Member

Ran a small test and noticed that it says e.g. "objects such as 'User'" instead of "objects such as 'telegram.User'" and for filters it will report name of the private class we use. I can live with both given that this warning will only be removed eventually and the latter is quite the edge case imo. Just wanted to note this before we go for merging … :)

Copy link
Member Author

@Bibo-Joshi Yep, the user would mostly likely understand which line the warning came from in either case

@Bibo-Joshi Bibo-Joshi merged commit fce2993 into master Jun 29, 2021
@Bibo-Joshi Bibo-Joshi deleted the add-stacklevel branch June 29, 2021 16:10
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2021
@Bibo-Joshi Bibo-Joshi added 🔌 bug pr description: bug and removed bug 🐛 labels Nov 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

🔌 bug pr description: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants