diff options
| author | Victor Stinner <vstinner@python.org> | 2025-11-18 16:13:13 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-18 16:13:13 (GMT) |
| commit | 600f3feb234219c9a9998e30ea653a2afb1f8116 (patch) | |
| tree | e910ed068d5f0f7b02960514b450af73810f4c43 /Python/pythonrun.c | |
| parent | 4695ec109d07c9bfd9eb7d91d6285c974a4331a7 (diff) | |
| download | cpython-600f3feb234219c9a9998e30ea653a2afb1f8116.zip cpython-600f3feb234219c9a9998e30ea653a2afb1f8116.tar.gz cpython-600f3feb234219c9a9998e30ea653a2afb1f8116.tar.bz2 | |
gh-141070: Add PyUnstable_Object_Dump() function (#141072)
* Promote _PyObject_Dump() as a public function.
* Keep _PyObject_Dump() alias to PyUnstable_Object_Dump()
for backward compatibility.
* Replace _PyObject_Dump() with PyUnstable_Object_Dump().
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Diffstat (limited to 'Python/pythonrun.c')
| -rw-r--r-- | Python/pythonrun.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 49ce0a9..272be50 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1181,7 +1181,7 @@ fallback: } if (print_exception_recursive(&ctx, value) < 0) { PyErr_Clear(); - _PyObject_Dump(value); + PyUnstable_Object_Dump(value); fprintf(stderr, "lost sys.stderr\n"); } Py_XDECREF(ctx.seen); @@ -1199,14 +1199,14 @@ PyErr_Display(PyObject *unused, PyObject *value, PyObject *tb) PyObject *file; if (PySys_GetOptionalAttr(&_Py_ID(stderr), &file) < 0) { PyObject *exc = PyErr_GetRaisedException(); - _PyObject_Dump(value); + PyUnstable_Object_Dump(value); fprintf(stderr, "lost sys.stderr\n"); - _PyObject_Dump(exc); + PyUnstable_Object_Dump(exc); Py_DECREF(exc); return; } if (file == NULL) { - _PyObject_Dump(value); + PyUnstable_Object_Dump(value); fprintf(stderr, "lost sys.stderr\n"); return; } |
