gh-139806: Mention pickle error changes in What's New in 3.14#154020
gh-139806: Mention pickle error changes in What's New in 3.14#154020serhiy-storchaka wants to merge 1 commit into
Conversation
The pythongh-122311 changes made pickle.dump() and pickle.dumps() raise PicklingError for some failures that previously raised AttributeError, ImportError, ValueError or UnicodeEncodeError, depending on the implementation. Add an entry about this in the "Porting to Python 3.14" section. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@picnixz, I added a "Porting to Python 3.14" entry on your request. Is it fine to you? |
Documentation build overview
|
|
I think it's good enough to keep them here. The full changelog is quite long and it's easy to miss this kind of change. I should however say that I didn't consistently mention those changes in this section but pickle is quite used so I believe it's good to have this. Thanks! |
| :exc:`~pickle.PicklingError` for some failures that previously raised | ||
| :exc:`AttributeError`, :exc:`ImportError`, :exc:`ValueError`, | ||
| :exc:`UnicodeEncodeError` or :exc:`!PicklingError`, | ||
| depending on the implementation |
There was a problem hiding this comment.
It's a bit confusing to say that we raise PicklingError instead of... previously PicklingError. I think you can omit the second PicklingError.
There was a problem hiding this comment.
We should keep it for correctness. Depending on implementation, different types were raised, including PicklingError. And this was inconsistent -- for one kind of error you could get PicklingError in C and AttributeError in Python, for other -- UnicodeEncodeError in C and PicklingError in Python.
The gh-122311 changes made
pickle.dump()andpickle.dumps()raisePicklingErrorfor some failures that previously raisedAttributeError,ImportError,ValueErrororUnicodeEncodeError, depending on the implementation.Add an entry about this in the "Porting to Python 3.14" section.