#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
# include "pycore_gc.h"
# include "pycore_runtime.h"
#endif
#include "pycore_abstract.h"
#include "pycore_modsupport.h"
PyDoc_STRVAR(warnings_warn__doc__,
"warn($module, /, message, category=None, stacklevel=1, source=None, *,\n"
" skip_file_prefixes=<unrepresentable>)\n"
"--\n"
"\n"
"Issue a warning, or maybe ignore it or raise an exception.\n"
"\n"
" message\n"
" Text of the warning message.\n"
" category\n"
" The Warning category subclass. Defaults to UserWarning.\n"
" stacklevel\n"
" How far up the call stack to make this warning appear. A value of 2 for\n"
" example attributes the warning to the caller of the code calling warn().\n"
" source\n"
" If supplied, the destroyed object which emitted a ResourceWarning\n"
" skip_file_prefixes\n"
" An optional tuple of module filename prefixes indicating frames to skip\n"
" during stacklevel computations for stack frame attribution.");
#define WARNINGS_WARN_METHODDEF …
static PyObject *
warnings_warn_impl(PyObject *module, PyObject *message, PyObject *category,
Py_ssize_t stacklevel, PyObject *source,
PyTupleObject *skip_file_prefixes);
static PyObject *
warnings_warn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{ … }
PyDoc_STRVAR(warnings_warn_explicit__doc__,
"warn_explicit($module, /, message, category, filename, lineno,\n"
" module=<unrepresentable>, registry=None,\n"
" module_globals=None, source=None)\n"
"--\n"
"\n"
"Issue a warning, or maybe ignore it or raise an exception.");
#define WARNINGS_WARN_EXPLICIT_METHODDEF …
static PyObject *
warnings_warn_explicit_impl(PyObject *module, PyObject *message,
PyObject *category, PyObject *filename,
int lineno, PyObject *mod, PyObject *registry,
PyObject *module_globals, PyObject *sourceobj);
static PyObject *
warnings_warn_explicit(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{ … }
PyDoc_STRVAR(warnings_filters_mutated__doc__,
"_filters_mutated($module, /)\n"
"--\n"
"\n");
#define WARNINGS_FILTERS_MUTATED_METHODDEF …
static PyObject *
warnings_filters_mutated_impl(PyObject *module);
static PyObject *
warnings_filters_mutated(PyObject *module, PyObject *Py_UNUSED(ignored))
{ … }