Bug report
Bug description:
This is a sub-issue for gh-146102 with the gist here.
In the case that there is no memory, deque_clear calls PyErr_Clear():
|
b = newblock(deque); |
|
if (b == NULL) { |
|
PyErr_Clear(); |
|
goto alternate_method; |
|
} |
This was done to clear the error that newblock raises. However, if there was originally an exception, deque_clear clears it.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Bug report
Bug description:
This is a sub-issue for gh-146102 with the gist here.
In the case that there is no memory,
deque_clearcallsPyErr_Clear():cpython/Modules/_collectionsmodule.c
Lines 749 to 753 in 7928a8b
This was done to clear the error that
newblockraises. However, if there was originally an exception,deque_clearclears it.CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
deque_clearto no longer alters exceptions #152018