enable_deprecations_as_exceptions¶
-
astropy.tests.helper.enable_deprecations_as_exceptions(include_astropy_deprecations=True, modules_to_ignore_on_import=[], warnings_to_ignore_entire_module=[], 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,AstropyDeprecationWarningandAstropyPendingDeprecationWarningare 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_entire_module : list of str
List of modules with deprecation warnings to ignore completely, not just during import. If
include_astropy_deprecations=Trueis given,AstropyDeprecationWarningandAstropyPendingDeprecationWarningare also ignored for the modules.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_pyvervalues).