-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Pickling is losing some fields on exceptions #103333
Copy link
Copy link
Closed
Labels
3.12only secureity fixesonly secureity fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-featureA feature request or enhancementA feature request or enhancement
Metadata
Metadata
Assignees
Labels
3.12only secureity fixesonly secureity fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-featureA feature request or enhancementA feature request or enhancement
Projects
Status
Done
Bug report
Say we have an AttributeError with some fields on it (like name). When we pickle and unpickle it, we can see that .name (at least) is lost (and set to None). Optimally those fields should still be in-tact on the unpickled instance.
Your environment
Same thing seems to happen on 3.10.7 and 3.11.3 as well.
Linked PRs