https://github.com/python/cpython/commit/61a8bf28530558da239834785a0b590ae8900a16
commit: 61a8bf28530558da239834785a0b590ae8900a16
branch: main
author: sobolevn <[email protected]>
committer: sobolevn <[email protected]>
date: 2024-08-07T17:25:25+03:00
summary:
gh-122759: Remove `assert` from `RERAISE` error handling (#122760)
files:
M Python/bytecodes.c
M Python/generated_cases.c.h
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index e4c97dee1f80ea..d28cbd767e7878 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -1183,7 +1183,6 @@ dummy_func(
assert(!_PyErr_Occurred(tstate));
}
else {
- assert(PyLong_Check(lasti));
_PyErr_SetString(tstate, PyExc_SystemError, "lasti is not
an int");
ERROR_NO_POP();
}
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index e560372a5f983e..5890fcea8e64d5 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -5875,7 +5875,6 @@
assert(!_PyErr_Occurred(tstate));
}
else {
- assert(PyLong_Check(lasti));
_PyErr_SetString(tstate, PyExc_SystemError, "lasti is not
an int");
goto error;
}
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]