Orbits
1
|
Classes | |
class | _OptionError |
class | WarningMessage |
class | catch_warnings |
Functions | |
def | warnpy3k |
def | _show_warning |
def | formatwarning |
def | filterwarnings |
def | simplefilter |
def | resetwarnings |
def | _processoptions |
def | _setoption |
def | _getaction |
def | _getcategory |
def | warn |
def | warn_explicit |
Variables | |
list | __all__ |
showwarning = _show_warning | |
_warnings_defaults = False | |
defaultaction = default_action | |
onceregistry = once_registry | |
list | filters = [] |
list | silence = [ImportWarning, PendingDeprecationWarning] |
bytes_warning = sys.flags.bytes_warning | |
string | bytes_action = "error" |
Python part of the warnings subsystem.
|
private |
|
private |
|
private |
|
private |
|
private |
Hook to write a warning to a file; replace if you like.
def warnings.filterwarnings | ( | action, | |
message = "" , |
|||
category = Warning , |
|||
module = "" , |
|||
lineno = 0 , |
|||
append = 0 |
|||
) |
Insert an entry into the list of warnings filters (at the front). 'action' -- one of "error", "ignore", "always", "default", "module", or "once" 'message' -- a regex that the warning message must match 'category' -- a class that the warning must be a subclass of 'module' -- a regex that the module name must match 'lineno' -- an integer line number, 0 matches all warnings 'append' -- if true, append to the list of filters
def warnings.formatwarning | ( | message, | |
category, | |||
filename, | |||
lineno, | |||
line = None |
|||
) |
Function to format a warning the standard way.
def warnings.resetwarnings | ( | ) |
Clear the list of warning filters, so that no filters are active.
def warnings.simplefilter | ( | action, | |
category = 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. 'action' -- one of "error", "ignore", "always", "default", "module", or "once" 'category' -- a class that the warning must be a subclass of 'lineno' -- an integer line number, 0 matches all warnings 'append' -- if true, append to the list of filters
def warnings.warn | ( | message, | |
category = None , |
|||
stacklevel = 1 |
|||
) |
Issue a warning, or maybe ignore it or raise an exception.
def warnings.warn_explicit | ( | message, | |
category, | |||
filename, | |||
lineno, | |||
module = None , |
|||
registry = None , |
|||
module_globals = None |
|||
) |
def warnings.warnpy3k | ( | message, | |
category = None , |
|||
stacklevel = 1 |
|||
) |
Issue a deprecation warning for Python 3.x related changes. Warnings are omitted unless Python is started with the -3 option.
list warnings.__all__ |
warnings._warnings_defaults = False |
string warnings.bytes_action = "error" |
warnings.bytes_warning = sys.flags.bytes_warning |
string warnings.defaultaction = default_action |
list warnings.filters = [] |
dictionary warnings.onceregistry = once_registry |
warnings.showwarning = _show_warning |
list warnings.silence = [ImportWarning, PendingDeprecationWarning] |
Copyright 2014 Google Inc. All rights reserved.