8000 gh-119521: Rename IncompleteInputError to _IncompleteInputError and remove from stable ABI by pablogsal · Pull Request #119680 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-119521: Rename IncompleteInputError to _IncompleteInputError and remove from stable ABI #119680

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 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Don't export a public pointer
  • Loading branch information
encukou committed Jun 21, 2024
commit 2e904ca877c1005fa018c410c8da02cb2352e2e0
4 changes: 4 additions & 0 deletions Include/internal/pycore_pyerrors.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ void _PyErr_FormatNote(const char *format, ...);

Py_DEPRECATED(3.12) extern void _PyErr_ChainExceptions(PyObject *, PyObject *, PyObject *);

// implementation detail for the codeop module.
extern PyTypeObject _PyExc_IncompleteInputError;
#define PyExc_IncompleteInputError ((PyObject *)(&_PyExc_IncompleteInputError))

#ifdef __cplusplus
}
#endif
Expand Down
3 changes: 0 additions & 3 deletions Include/pyerrors.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ PyAPI_DATA(PyObject *) PyExc_NotImplementedError;
PyAPI_DATA(PyObject *) PyExc_SyntaxError;
PyAPI_DATA(PyObject *) PyExc_IndentationError;
PyAPI_DATA(PyObject *) PyExc_TabError;
#if !defined(Py_LIMITED_API)
PyAPI_DATA(PyObject *) PyExc_IncompleteInputError;
#endif
PyAPI_DATA(PyObject *) PyExc_ReferenceError;
PyAPI_DATA(PyObject *) PyExc_SystemError;
PyAPI_DATA(PyObject *) PyExc_SystemExit;
Expand Down
9 changes: 5 additions & 4 deletions Objects/exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ static PyTypeObject _PyExc_ ## EXCNAME = { \
PyObject *PyExc_ ## EXCNAME = (PyObject *)&_PyExc_ ## EXCNAME

#define MiddlingExtendsExceptionEx(EXCBASE, EXCNAME, PYEXCNAME, EXCSTORE, EXCDOC) \
static PyTypeObject _PyExc_ ## EXCNAME = { \
PyTypeObject _PyExc_ ## EXCNAME = { \
PyVarObject_HEAD_INIT(NULL, 0) \
# PYEXCNAME, \
sizeof(Py ## EXCSTORE ## Object), \
Expand All @@ -557,11 +557,12 @@ static PyTypeObject _PyExc_ ## EXCNAME = { \
(inquiry)EXCSTORE ## _clear, 0, 0, 0, 0, 0, 0, 0, &_ ## EXCBASE, \
0, 0, 0, offsetof(Py ## EXCSTORE ## Object, dict), \
(initproc)EXCSTORE ## _init, 0, 0, \
}; \
PyObject *PyExc_ ## EXCNAME = (PyObject *)&_PyExc_ ## EXCNAME
};

#define MiddlingExtendsException(EXCBASE, EXCNAME, EXCSTORE, EXCDOC) \
MiddlingExtendsExceptionEx(EXCBASE, EXCNAME, EXCNAME, EXCSTORE, EXCDOC)
static MiddlingExtendsExceptionEx( \
EXCBASE, EXCNAME, EXCNAME, EXCSTORE, EXCDOC); \
PyObject *PyExc_ ## EXCNAME = (PyObject *)&_PyExc_ ## EXCNAME

#define ComplexExtendsException(EXCBASE, EXCNAME, EXCSTORE, EXCNEW, \
EXCMETHODS, EXCMEMBERS, EXCGETSET, \
Expand Down
1 change: 1 addition & 0 deletions Parser/pegen.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <Python.h>
#include "pycore_ast.h" // _PyAST_Validate(),
#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_pyerrors.h" // PyExc_IncompleteInputError
#include <errcode.h>

#include "lexer/lexer.h"
Expand Down
Loading
0