diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2024-09-09 12:04:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-09 12:04:51 (GMT) |
commit | b2a8c38bb20e0a201bbc60f66371ee4e406f6dae (patch) | |
tree | 721276e0bdc3ad23a2a0d4d5e58c9b7de59b9423 /Lib/test/decimaltestdata/ddRemainder.decTest | |
parent | 32bc2d61411fb71bdc84eb29c6859517e7f25f36 (diff) | |
download | cpython-b2a8c38bb20e0a201bbc60f66371ee4e406f6dae.zip cpython-b2a8c38bb20e0a201bbc60f66371ee4e406f6dae.tar.gz cpython-b2a8c38bb20e0a201bbc60f66371ee4e406f6dae.tar.bz2 |
gh-122311: Improve and unify pickle errors (GH-122771)
* Raise PicklingError instead of UnicodeEncodeError, ValueError
and AttributeError in both implementations.
* Chain the original exception to the pickle-specific one as __context__.
* Include the error message of ImportError and some AttributeError in
the PicklingError error message.
* Unify error messages between Python and C implementations.
* Refer to documented __reduce__ and __newobj__ callables instead of
internal methods (e.g. save_reduce()) or pickle opcodes (e.g. NEWOBJ).
* Include more details in error messages (what expected, what got).
* Avoid including a potentially long repr of an arbitrary object in
error messages.
Diffstat (limited to 'Lib/test/decimaltestdata/ddRemainder.decTest')
0 files changed, 0 insertions, 0 deletions