pint.logging.showwarning

pint.logging.showwarning(message, category, filename, lineno, file=None, line=None)[source]

Function to allow loguru to capture warnings emitted by warnings.warn().

Also look at the existing warnings.filters to see if warnings should be ignored or only seen once (most messages are already filtered, but some aren’t, especially in older python)

See https://loguru.readthedocs.io/en/stable/resources/recipes.html#capturing-standard-stdout-stderr-and-warnings