Improve warning suppression #14833
julian-smith-artifex-com
started this conversation in
Feature requests and ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
It looks like it is not possible to suppress some sphinx warnings, which makes it difficult to start to use
sphinx-build --fail-on-warningin an existing Sphinx project.For example
WARNING: duplicate object description of ... other instance in ..., use :no-index: for one of themis generated insphinx/domains/python/__init__.py:PythonDomain.note_object()with:This does not specify
<type>or<subtype>so we end up insphinx/util/logging.py:def is_suppressed_warning()withtype=Noneandsubtype=None, so the warning is never suppressed.I guess it would take a lot of effort to change all calls of
logger.warning()to specify<type>and<subtype>.So would it instead be feasible to allow suppression of warnings specified as regular expressions or callables that work on the warning text itself instead of
<type>and<subtype>?For example if we added a
<record>arg tois_suppressed_warning()it could do:Then conf.py could contain things like:
All reactions