Ignore sphinx warnings
authorJochen Sprickerhof <jspricke@debian.org>
Tue, 3 Jan 2023 17:44:06 +0000 (18:44 +0100)
committerDrew Parsons <dparsons@debian.org>
Wed, 25 Jan 2023 14:32:10 +0000 (14:32 +0000)
Gbp-Pq: Name 0019-Ignore-sphinx-warnings.patch

doc/source/conf.py

index 6d03a04785ff05f02346110fb6ac7635b006f432..7553e0c5f601e31e8d5fb4e41cc02d2734c94e2e 100644 (file)
@@ -138,39 +138,6 @@ exclude_patterns = [  # glob-style
 
 ]
 
-# be strict about warnings in our examples, we should write clean code
-# (exceptions permitted for pedagogical purposes below)
-warnings.resetwarnings()
-warnings.filterwarnings('error')
-# allow these and show them
-warnings.filterwarnings('default', module='sphinx')  # internal warnings
-# global weird ones that can be safely ignored
-for key in (
-        r"'U' mode is deprecated",  # sphinx io
-        r"OpenSSL\.rand is deprecated",  # OpenSSL package in linkcheck
-        r"Using or importing the ABCs from",  # 3.5 importlib._bootstrap
-        r"'contextfunction' is renamed to 'pass_context'",  # Jinja
-        ):
-    warnings.filterwarnings(  # deal with other modules having bad imports
-        'ignore', message=".*" + key, category=DeprecationWarning)
-warnings.filterwarnings(  # matplotlib<->pyparsing issue
-    'ignore', message="Exception creating Regex for oneOf.*",
-    category=SyntaxWarning)
-# warnings in examples (mostly) that we allow
-# TODO: eventually these should be eliminated!
-for key in (
-        'invalid escape sequence',  # numpydoc 0.8 has some bad escape chars
-        'The integral is probably divergent',  # stats.mielke example
-        'underflow encountered in square',  # signal.filtfilt underflow
-        'underflow encountered in multiply',  # scipy.spatial.HalfspaceIntersection
-        'underflow encountered in nextafter',  # tuterial/interpolate.rst
-        # stats.skewnorm, stats.norminvgauss, stats.gaussian_kde,
-        # tutorial/stats.rst (twice):
-        'underflow encountered in exp',
-        ):
-    warnings.filterwarnings(
-        'once', message='.*' + key)
-
 # -----------------------------------------------------------------------------
 # HTML output
 # -----------------------------------------------------------------------------