]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-141004: Document `PyErr_WarnExplicitFormat` (GH-141187) main
authorPeter Bierma <zintensitydev@gmail.com>
Fri, 7 Nov 2025 16:19:14 +0000 (11:19 -0500)
committerGitHub <noreply@github.com>
Fri, 7 Nov 2025 16:19:14 +0000 (11:19 -0500)
Doc/c-api/exceptions.rst

index 9c75f66f6831958e0897dbc9cd9e684bfa809ef1..b6f9399337eb86c9f9b8ab5958cb969dfde3eb89 100644 (file)
@@ -394,6 +394,15 @@ an error value).
    .. versionadded:: 3.2
 
 
+.. c:function:: int PyErr_WarnExplicitFormat(PyObject *category, const char *filename, int lineno, const char *module, PyObject *registry, const char *format, ...)
+
+   Similar to :c:func:`PyErr_WarnExplicit`, but uses
+   :c:func:`PyUnicode_FromFormat` to format the warning message. *format* is
+   an ASCII-encoded string.
+
+   .. versionadded:: 3.2
+
+
 .. c:function:: int PyErr_ResourceWarning(PyObject *source, Py_ssize_t stack_level, const char *format, ...)
 
    Function similar to :c:func:`PyErr_WarnFormat`, but *category* is