-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Add more tests for pickle and fix error messages #122311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Jul 26, 2024
serhiy-storchaka
added a commit
that referenced
this issue
Jul 26, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 26, 2024
…GH-122312) (cherry picked from commit 7c29218) Co-authored-by: Serhiy Storchaka <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 26, 2024
…GH-122312) (cherry picked from commit 7c29218) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
that referenced
this issue
Jul 26, 2024
…2312) (GH-122315) (cherry picked from commit 7c29218) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
that referenced
this issue
Jul 26, 2024
…2312) (GH-122314) (cherry picked from commit 7c29218) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Jul 28, 2024
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Jul 28, 2024
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Jul 28, 2024
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Jul 28, 2024
serhiy-storchaka
added a commit
that referenced
this issue
Jul 28, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 28, 2024
(cherry picked from commit bc93923) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Jul 28, 2024
(cherry picked from commit bc93923) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
that referenced
this issue
Jul 28, 2024
(cherry picked from commit bc93923) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Jul 28, 2024
serhiy-storchaka
added a commit
that referenced
this issue
Jul 28, 2024
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Jul 29, 2024
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Jul 29, 2024
serhiy-storchaka
added a commit
that referenced
this issue
Jul 29, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 29, 2024
(cherry picked from commit 3b034d2) Co-authored-by: Serhiy Storchaka <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 29, 2024
(cherry picked from commit 3b034d2) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
that referenced
this issue
Jul 29, 2024
…22387) (cherry picked from commit 3b034d2) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
that referenced
this issue
Jul 29, 2024
…22388) (cherry picked from commit 3b034d2) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
that referenced
this issue
Jul 29, 2024
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Jul 29, 2024
serhiy-storchaka
added a commit
that referenced
this issue
Jul 29, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 29, 2024
(cherry picked from commit 68840e9) Co-authored-by: Serhiy Storchaka <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 29, 2024
(cherry picked from commit 68840e9) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
that referenced
this issue
Jul 29, 2024
(cherry picked from commit 68840e9) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
that referenced
this issue
Jul 29, 2024
(cherry picked from commit 68840e9) Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Aug 7, 2024
* 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.
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Aug 7, 2024
* 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.
serhiy-storchaka
added a commit
that referenced
this issue
Sep 9, 2024
* 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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Much error generating code in the
pickle
module is not tested at all. As result, not only exception types and messages can differ between Python and C implementations, but other bugs are left unnoticed:I am going to add more tests and fix the most odious errors. This will be backported to 3.12 and 3.13, but the backport to 3.12 will have more lenient variants of tests. Late, I will unify and improve other error messages (this is for main only).
Linked PRs
The text was updated successfully, but these errors were encountered: