Cannot pickle cyclic ExceptionGroup
Đang mở
@serhiy-storchaka đang làm issue này rồi.
Từ ngày 18/8/2025.
stdlib
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:
Pickling an exception group with a cycle, like so...
import pickle
inner = Exception("Inner")
outer = ExceptionGroup("outer", [inner])
outer.exceptions[0].foo = outer
pickle.loads(pickle.dumps(outer))
...produces...
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
ValueError: second argument (exceptions) must be a non-empty sequence
Maybe BaseExceptionGroup needs a custom reducer that allows for two-phase initialization.
CPython versions tested on:
3.13
Operating systems tested on:
macOS
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á.