PyDocs

Python Runtime Services

warnings

Warning messages are typically issued in situations where it is useful to alert the user of some condition in a program, where that condition (normally) doesn’t warrant raising an exception and terminating the program. For example, one might want to issue a warning when a program uses an obsolete module.
Symbols in warnings

c

catch_warnings
A context manager that copies and restores the warnings filter upon exiting the context.

d

deprecated
Indicate that a class, function or overload is deprecated.

f

filterwarnings
Insert an entry into the list of warnings filters (at the front).
formatwarning
Function to format a warning the standard way.

r

resetwarnings
Clear the list of warning filters, so that no filters are active.

s

showwarning
Hook to write a warning to a file; replace if you like.
simplefilter
Insert a simple entry into the list of warnings filters (at the front).

w

warn
Issue a warning, or maybe ignore it or raise an exception.
warn_explicit
Issue a warning, or maybe ignore it or raise an exception.