enable_deprecations_as_exceptions¶
-
astropy.tests.helper.
enable_deprecations_as_exceptions
(include_astropy_deprecations=True, modules_to_ignore_on_import=[], warnings_to_ignore_by_pyver={})[source] [edit on github]¶ Turn on the feature that turns deprecations into exceptions.
Parameters: include_astropy_deprecations : bool
If set to
True
,AstropyDeprecationWarning
andAstropyPendingDeprecationWarning
are also turned into exceptions.modules_to_ignore_on_import : list of str
List of additional modules that generate deprecation warnings on import, which are to be ignored. By default, these are already included:
compiler
,scipy
,pygments
,ipykernel
, andsetuptools
.warnings_to_ignore_by_pyver : dict
Dictionary mapping tuple of
(major, minor)
Python version to a list of deprecation warning messages to ignore. This is in addition of those already ignored by default (see_warnings_to_ignore_by_pyver
values).