New submission from Maxime Belanger <m...@dropbox.com>:

We have found `_PyErr_Display` to be quite helpful in embedding situations, in 
particular as a way to capture errors to a custom buffer rather than to 
`stderr`. Otherwise, embedders often have to replicate logic in `PyErr_Print`, 
etc. 

Since the header restructuring in Python 3.8+, that function is a bit harder to 
call. It's exported, but is considered "internal" and thus requires defining 
`Py_BUILD_CORE`.

I was wondering: why not expose it under "Include/cpython"? It seems like a 
generic-enough helper, similar to `_PyErr_WriteUnraisableMsg`.

----------
components: C API
messages: 387965
nosy: Maxime Belanger
priority: normal
severity: normal
status: open
title: _PyErr_Display should be available in the CPython-specific API
type: enhancement
versions: Python 3.10

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43377>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to