Show DeprecationWarnings as INFO messages#2907
Conversation
(previously they were not shown at all) This works for both extensions and plugins -- and for MkDocs itself. It will enable plugin developers to see warnings in advance. Or users to report such warnings to plugin developers.
ultrabug
left a comment
There was a problem hiding this comment.
Good job, I find that very elegant
|
Just to understand: the change basically makes sure warnings are shown to the user by logging them as INFO? If users already have warnings shown, will they see them twice (once as a regular warning and a second time as an info log)? Also, good call on making them INFO level and not WARNING 👍 |
This comment was marked as abuse.
This comment was marked as abuse.
|
Thanks, that answers my questions :) perfect. |
|
Actually I'm not sure if hiding regular warnings in favor of INFO logs is a good idea. I mean, maybe keeping the duplication would be better. In the common case, that's a few more lines of INFO logs few will read, in the worst case, users that were relying on regular warnings don't get their pytest run fail anymore, and I believe that's less chance these users will report these deprecations to the upstream packages. I hope I'm wrong though. The INFO logs are pretty visible so I guess it's fine. |
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
|
Hmmm yeah I don't think a lot of users/plugin developers run MkDocs commands through pytest with warnings enabled anyway 🤔 |
(previously they were not shown at all)
This works for both extensions and plugins -- and for MkDocs itself.
It will enable plugin developers to see warnings in advance. Or users to report such warnings to plugin developers.
Ref #2892, Python-Markdown/markdown#1277
Example session:
cc @ultrabug @pawamoy