Skip to content

Commit f15f2dd

Browse files
committed
gh-119521: Rename IncompleteInputError to _IncompleteInputError and remove from stable ABI
1 parent b407ad3 commit f15f2dd

File tree

7 files changed

+6
-7
lines changed

7 files changed

+6
-7
lines changed

Doc/data/stable_abi.dat

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/pyerrors.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ PyAPI_DATA(PyObject *) PyExc_NotImplementedError;
108108
PyAPI_DATA(PyObject *) PyExc_SyntaxError;
109109
PyAPI_DATA(PyObject *) PyExc_IndentationError;
110110
PyAPI_DATA(PyObject *) PyExc_TabError;
111+
#if !defined(Py_LIMITED_API)
111112
PyAPI_DATA(PyObject *) PyExc_IncompleteInputError;
113+
#endif
112114
PyAPI_DATA(PyObject *) PyExc_ReferenceError;
113115
PyAPI_DATA(PyObject *) PyExc_SystemError;
114116
PyAPI_DATA(PyObject *) PyExc_SystemExit;

Lib/codeop.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def _maybe_compile(compiler, source, filename, symbol):
6565
try:
6666
compiler(source + "\n", filename, symbol)
6767
return None
68-
except IncompleteInputError as e:
68+
except _IncompleteInputError as e:
6969
return None
7070
except SyntaxError as e:
7171
pass

Lib/test/exception_hierarchy.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ BaseException
4545
├── StopAsyncIteration
4646
├── StopIteration
4747
├── SyntaxError
48-
│ └── IncompleteInputError
48+
│ └── _IncompleteInputError
4949
│ └── IndentationError
5050
│ └── TabError
5151
├── SystemError

Lib/test/test_pickle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def test_exceptions(self):
569569
EncodingWarning,
570570
BaseExceptionGroup,
571571
ExceptionGroup,
572-
IncompleteInputError):
572+
_IncompleteInputError):
573573
continue
574574
if exc is not OSError and issubclass(exc, OSError):
575575
self.assertEqual(reverse_mapping('builtins', name),

Misc/stable_abi.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2480,8 +2480,6 @@
24802480
[function._Py_SetRefcnt]
24812481
added = '3.13'
24822482
abi_only = true
2483-
[data.PyExc_IncompleteInputError]
2484-
added = '3.13'
24852483
[function.PyList_GetItemRef]
24862484
added = '3.13'
24872485
[typedef.PyCFunctionFast]

Objects/exceptions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3675,7 +3675,7 @@ static struct static_exception static_exceptions[] = {
36753675

36763676
// Level 4: Other subclasses
36773677
ITEM(IndentationError), // base: SyntaxError(Exception)
3678-
ITEM(IncompleteInputError), // base: SyntaxError(Exception)
3678+
{&_PyExc_IncompleteInputError, "_IncompleteInputError"}, // base: SyntaxError(Exception)
36793679
ITEM(IndexError), // base: LookupError(Exception)
36803680
ITEM(KeyError), // base: LookupError(Exception)
36813681
ITEM(ModuleNotFoundError), // base: ImportError(Exception)

0 commit comments

Comments
 (0)