`deque_clear` clears `MemoryError`
Aperta
@rhettinger ci sta già lavorando.
Dal 26/6/2026.
extension-modules
type-bug
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
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():
https://github.com/python/cpython/blob/7928a8b730b0334c9f97c2144ab00fe0d88f1e97/Modules/_collectionsmodule.c#L749-L753
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
- gh-152018
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.