diff options
| author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2022-10-25 23:56:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-25 23:56:59 +0100 |
| commit | 7cfbb49fcd4c85f9bab3797302eadf93df490344 (patch) | |
| tree | a20c316c8296dbe3e327e7fcf19925e8090ee267 /Include/cpython | |
| parent | 1f737edb67e702095feb97118a911afb569f5705 (diff) | |
| download | cpython-git-7cfbb49fcd4c85f9bab3797302eadf93df490344.tar.gz | |
gh-91058: Add error suggestions to 'import from' import errors (#98305)
Diffstat (limited to 'Include/cpython')
| -rw-r--r-- | Include/cpython/pyerrors.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Include/cpython/pyerrors.h b/Include/cpython/pyerrors.h index f33d3caaa2..1413416677 100644 --- a/Include/cpython/pyerrors.h +++ b/Include/cpython/pyerrors.h @@ -37,6 +37,7 @@ typedef struct { PyObject *msg; PyObject *name; PyObject *path; + PyObject *name_from; } PyImportErrorObject; typedef struct { @@ -176,4 +177,11 @@ PyAPI_FUNC(void) _Py_NO_RETURN _Py_FatalErrorFormat( const char *format, ...); +extern PyObject *_PyErr_SetImportErrorWithNameFrom( + PyObject *, + PyObject *, + PyObject *, + PyObject *); + + #define Py_FatalError(message) _Py_FatalErrorFunc(__func__, (message)) |
