8000 gh-91102: Port 8-argument _warnings.warn_explicit to Argument Clinic by arhadthedev · Pull Request #92891 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-91102: Port 8-argument _warnings.warn_explicit to Argument Clinic #92891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 20, 2022
Prev Previous commit
Next Next commit
Apply Kumar's suggestion
  • Loading branch information
arhadthedev committed Jul 7, 2022
commit 7e2227aaf3980af07f0036ae8a99e497734b2f94
11 changes: 5 additions & 6 deletions Python/_warnings.c
Original file line number Diff line number Diff line change
Expand Up @@ -1033,12 +1033,11 @@ get_source_line(PyInterpreterState *interp, PyObject *module_globals, int lineno
/*[clinic input]
warn_explicit as warnings_warn_explicit

module as _module: object
message: object
category: object
filename: unicode
lineno: int
module: object = NULL
module as mod: object = NULL
registry: object = None
module_globals: object = None
source as sourceobj: object = None
Expand All @@ -1047,11 +1046,11 @@ Issue a warning, or maybe ignore it or raise an exception.
[clinic start generated code]*/

static PyObject *
warnings_warn_explicit_impl(PyObject *_module, PyObject *message,
warnings_warn_explicit_impl(PyObject *module, PyObject *message,
PyObject *category, PyObject *filename,
int lineno, PyObject *module, PyObject *registry,
int lineno, PyObject *mod, PyObject *registry,
PyObject *module_globals, PyObject *sourceobj)
/*[clinic end generated code: output=724ff9da85258808 input=b2771a0c4840a660]*/
/*[clinic end generated code: output=c49c62b15a49a186 input=df6eeb8b45e712f1]*/
{
PyObject *source_line = NULL;
PyObject *returned;
Expand All @@ -1075,7 +1074,7 @@ warnings_warn_explicit_impl(PyObject *_module, PyObject *message,
}
}
returned = warn_explicit(tstate, category, message, filename, lineno,
module, registry, source_line, sourceobj);
mod, registry, source_line, sourceobj);
Py_XDECREF(source_line);
return returned;
}
Expand Down
14 changes: 7 additions & 7 deletions Python/clinic/_warnings.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0