The Python warnings
package is part of the Python standard library and used to alert
the user of a problem.
Typically these warnings are logged to the log file, but the warnings module can be configured to elevate these warnings to exceptions or to ignore them completely.
For full details of the warnings
package please see the Python documentation
here `https://docs.python.org/3/library/warnings.html`_.
The warnings
package can be configured in the [LOG]
section of the PyXLL config file
with the following options.
capture_warnings
Write warnings to the log file.
If this is set to 0 then warnings will not be captured and written to the log file.
Defaults to 1.
warnings_filters
Warnings filters to control whether warnings are ignored, dispayed, or turned into errors.
Multiple warning filters can be configured on multiple lines.
Individual warnings filters are specified as a sequence of fields separated by colons:
action:message:category:module:line
Example:
[LOG]
warnings_filters =
default::DeprecationWarning:__main__
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
ignore::ImportWarning
ignore::ResourceWarning