`deque_clear` clears `MemoryError`
Đang mở
@rhettinger đang làm issue này rồi.
Từ ngày 26/6/2026.
extension-modules
type-bug
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.