Module warnings
[hide private]
[frames] | no frames]

Module warnings

Python part of the warnings subsystem.

Classes [hide private]
_OptionError
Exception used by option processing helpers.
Functions [hide private]
 
warn(message, category=None, stacklevel=1)
Issue a warning, or maybe ignore it or raise an exception.
 
warn_explicit(message, category, filename, lineno, module=None, registry=None, module_globals=None)
 
showwarning(message, category, filename, lineno, file=None)
Hook to write a warning to a file; replace if you like.
 
formatwarning(message, category, filename, lineno)
Function to format a warning the standard way.
 
filterwarnings(action, message='', category=<type 'exceptions.Warning'>, module='', lineno=0, append=0)
Insert an entry into the list of warnings filters (at the front).
 
simplefilter(action, category=<type 'exceptions.Warning'>, lineno=0, append=0)
Insert a simple entry into the list of warnings filters (at the front).
 
resetwarnings()
Clear the list of warning filters, so that no filters are active.
 
_processoptions(args)
 
_setoption(arg)
 
_getaction(action)
 
_getcategory(category)
Variables [hide private]
  filters = [('ignore', re.compile(r'(?i)'), <type 'exceptions.I...
  defaultaction = 'default'
  onceregistry = {}

Imports: sys, types, linecache


Function Details [hide private]

filterwarnings(action, message='', category=<type 'exceptions.Warning'>, module='', lineno=0, append=0)

 

Insert an entry into the list of warnings filters (at the front).

Use assertions to check that all arguments have the right type.

simplefilter(action, category=<type 'exceptions.Warning'>, lineno=0, append=0)

 

Insert a simple entry into the list of warnings filters (at the front).

A simple filter matches all modules and messages.


Variables Details [hide private]

filters

Value:
[('ignore',
  re.compile(r'(?i)'),
  <type 'exceptions.ImportWarning'>,
  re.compile(r'.*test.string_tests$'),
  0),
 ('ignore',
  re.compile(r'(?i)'),
  <type 'exceptions.ImportWarning'>,
...