-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
bpo-45711: Remove type and traceback from exc_info #30122
bpo-45711: Remove type and traceback from exc_info #30122
Conversation
🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit 9b04160 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Include/internal/pycore_pyerrors.h
Outdated
@@ -114,6 +108,10 @@ PyAPI_FUNC(void) _Py_NO_RETURN _Py_FatalRefcountErrorFunc( | |||
|
|||
#define _Py_FatalRefcountError(message) _Py_FatalRefcountErrorFunc(__func__, message) | |||
|
|||
|
|||
/* number of items stored in the stack for each exception */ | |||
#define PY_EXC_INFO_STACK_SIZE 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary now?
I don't see why we would ever want to increase it, and I don't see how we could ever decrease it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name is probably weird now, but I think it helps readability to have a macro. If we remove this we should find another way to make the code (particularly in compile.c) clear about where exceptions are showing up. Figuring out where to use this macro was the hardest part of making this change (because when you get it wrong it just segfaults before you finish make regen-all).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought there is no point in a macro for this unless we all agree on some kind of convention because it probably won't be updated correctly when people make changes. So I'll remove it.
This is great. 🍾 Removes code, should make any exception handling code faster and reduces stack consumption; the perfect combination. |
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
The windows test failure is unrelated File "D:\a\cpython\cpython\Lib\test\support_init_.py", line 197, in _force_run |
Excellent. |
https://bugs.python.org/issue45711