• Home
  • Raw
  • Download

Lines Matching full:warning

11     """Hook to write a warning to a file; replace if you like."""
16 """Function to format a warning the standard way."""
32 # the file (probably stderr) is invalid - this warning gets lost.
44 # When a warning is logged during Python shutdown, linecache
57 # Logging a warning should not raise a new exception:
68 # When a warning is logged during Python shutdown, tracemalloc
97 """Hook to write a warning to a file; replace if you like."""
118 """Function to format a warning the standard way."""
130 def filterwarnings(action, message="", category=Warning, module="", lineno=0,
136 'message' -- a regex that the warning message must match
137 'category' -- a class that the warning must be a subclass of
146 assert issubclass(category, Warning), "category must be a Warning subclass"
165 def simplefilter(action, category=Warning, lineno=0, append=False):
171 'category' -- a class that the warning must be a subclass of
196 """Clear the list of warning filters, so that no filters are active."""
253 return Warning
266 raise _OptionError("unknown warning category: %r" % (category,)) from None
267 if not issubclass(cat, Warning):
268 raise _OptionError("invalid warning category: %r" % (category,))
288 """Issue a warning, or maybe ignore it or raise an exception."""
289 # Check if message is already a Warning object
290 if isinstance(message, Warning):
295 if not (isinstance(category, type) and issubclass(category, Warning)):
296 raise TypeError("category must be a Warning subclass, "
301 # If frame is too small to care or if the warning originated in
340 if isinstance(message, Warning):
441 action=None, category=Warning, lineno=0, append=False):
532 # enabled and tracking where the coroutine was created, the warning will
543 # - a compiled regex that must match the warning message
544 # - a class representing the warning category
546 # - a line number for the line being warning, or 0 to mean any line
571 # Several warning categories are ignored by default in regular builds