Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add more tests for pickle and fix error messages #122311

Copy link
Copy link
Closed
@serhiy-storchaka

Description

@serhiy-storchaka
Issue body actions

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:

  • NameError in formatting one of error messages.
  • "Can't pickle" in the error message during unpickling.
  • Error message including the repr of wrong object.
  • Some errors are only detected in one of implementations (Python or C).
  • Crash in untested corner case (Crash after error in PickleBuffer #122306).

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

Metadata

Metadata

Labels

3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixestestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

Status

Done
Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.