@@ -419,7 +419,6 @@ Available Functions
419419 .. versionchanged :: 3.6
420420 Added *source * parameter.
421421
422-
423422.. function :: warn_explicit(message, category, filename, lineno, module=None, registry=None, module_globals=None, source=None)
424423
425424 This is a low-level interface to the functionality of :func: `warn `, passing in
@@ -439,6 +438,25 @@ Available Functions
439438 *source *, if supplied, is the destroyed object which emitted a
440439 :exc: `ResourceWarning `.
441440
441+ .. function :: warn_explicit_with_fix(message, fix, category, filename, lineno, module=None, registry=None, module_globals=None, source=None)
442+
443+ This is a low-level interface to the functionality of :func: `warn `, passing in
444+ explicitly the message, fix, category, filename and line number, and optionally the
445+ module name and the registry (which should be the ``__warningregistry__ ``
446+ dictionary of the module). The module name defaults to the filename with
447+ ``.py `` stripped; if no registry is passed, the warning is never suppressed.
448+ *message * must be a string and *category * a subclass of :exc: `Warning ` or
449+ *message * may be a :exc: `Warning ` instance, in which case *category * will be
450+ ignored.
451+
452+ *module_globals *, if supplied, should be the global namespace in use by the code
453+ for which the warning is issued. (This argument is used to support displaying
454+ source for modules found in zipfiles or other non-filesystem import
455+ sources).
456+
457+ *source *, if supplied, is the destroyed object which emitted a
458+ :exc: `ResourceWarning `.
459+
442460 .. versionchanged :: 3.6
443461 Add the *source * parameter.
444462
@@ -454,6 +472,17 @@ Available Functions
454472 try to read the line specified by *filename * and *lineno *.
455473
456474
475+ .. function :: showwarningwithfix(message, fix, category, filename, lineno, file=None, line=None)
476+
477+ Write a warning to a file. The default implementation calls
478+ ``formatwarningwithfix(message, fix, category, filename, lineno, line) `` and writes the
479+ resulting string to *file *, which defaults to :data: `sys.stderr `. You may replace
480+ this function with any callable by assigning to ``warnings.showwarning ``.
481+ *line * is a line of source code to be included in the warning
482+ message; if *line * is not supplied, :func: `showwarning ` will
483+ try to read the line specified by *filename * and *lineno *.
484+
485+
457486.. function :: formatwarning(message, category, filename, lineno, line=None)
458487
459488 Format a warning the standard way. This returns a string which may contain
@@ -463,6 +492,15 @@ Available Functions
463492 *lineno *.
464493
465494
495+ .. function :: formatwarningwithfix(message, fix, category, filename, lineno, line=None)
496+
497+ Format a warning the standard way. This returns a string which may contain
498+ embedded newlines and ends in a newline. *line * is a line of source code to
499+ be included in the warning message; if *line * is not supplied,
500+ :func: `formatwarning ` will try to read the line specified by *filename * and
501+ *lineno *.
502+
503+
466504.. function :: filterwarnings(action, message='', category=Warning, module='', lineno=0, append=False)
467505
468506 Insert an entry into the list of :ref: `warnings filter specifications
0 commit comments