suppress_deprecations

lsst.utils.suppress_deprecations(category: ~typing.Type[Warning] = <class 'FutureWarning'>) Iterator[None]

Suppress warnings generated by deprecated.sphinx.deprecated.

Naively, one might attempt to suppress these warnings by using catch_warnings. However, deprecated attempts to install its own filter, overriding that. This convenience method works around this and properly suppresses the warnings by providing a mock simplefilter for deprecated to call.

Parameters:
categoryWarning or subclass

The category of warning to suppress.