You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At least on mkdocs 1.5. on my computer, calling mkdocs serve will produce a deprecation warning like:
INFO - DeprecationWarning: warning_filter doesn't do anything since MkDocs 1.2 and will be removed soon. All messages on the `mkdocs` logger get
counted automatically.
File "/Users/shuberty/github_repos/mkdocs-gallery/src/mkdocs_gallery/mkdocs_compatibility.py", line 12, in <module>
from mkdocs.utils import warning_filter
File "/Users/shuberty/github_repos/my_envs/my_website/lib/python3.11/site-packages/mkdocs/utils/__init__.py", line 453, in __getattr__
warnings.warn(
I think we could create a utility function to check the mkdocs version, and if it is greater than 1.2, skip the warnings_filterimport.
If this sounds OK I can open up a PR to fix the issue.
EDIT:
I forgot to mention, here are my versions for the relevant packages:
On a second thought, Since warning_filter has been a no-op since 1.2 (released two years ago), a second option would be to simply remove the use of warning_filter in mkdocs_gallery, assuming that it won't be useful for the vast majority of people, and replace it with the recommended logging plugin:
The mkdocs.utils.warning_filter is deprecated and now does nothing. Plugins should remove any reference to is as it may be deleted in a future release. To ensure any warnings get counted, simply log them to the mkdocs log (i.e.: mkdocs.plugins.pluginname).
In
mkdocs-gallery
,mkdocs.utils.warning_filter
is used here:mkdocs-gallery/src/mkdocs_gallery/mkdocs_compatibility.py
Line 12 in cc5c4ad
At least on mkdocs 1.5. on my computer, calling
mkdocs serve
will produce a deprecation warning like:I think we could create a utility function to check the
mkdocs
version, and if it is greater than 1.2, skip thewarnings_filter
import.If this sounds OK I can open up a PR to fix the issue.
EDIT:
I forgot to mention, here are my versions for the relevant packages:
The text was updated successfully, but these errors were encountered: