From: Jochen Sprickerhof Date: Tue, 3 Jan 2023 17:44:06 +0000 (+0100) Subject: Ignore sphinx warnings X-Git-Tag: archive/raspbian/1.8.1-21+rpi1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2eed64d948e1f067741c1b2635e82e30de64eb91;p=scipy.git Ignore sphinx warnings Gbp-Pq: Name 0019-Ignore-sphinx-warnings.patch --- diff --git a/doc/source/conf.py b/doc/source/conf.py index 6d03a047..7553e0c5 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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 # -----------------------------------------------------------------------------