classification
Title: Improve exception pickling support
Type: Stage:
Components: Interpreter Core Versions: Python 2.6
process
Status: closed Resolution:
Dependencies: Superseder: Fix exception pickling: Move initial args assignment to BaseException.__new__
View: 1692335
Assigned To: Nosy List: ehuss, georg.brandl, nnorwitz
Priority: normal Keywords: patch

Created on 2007-06-27 18:44 by ehuss, last changed 2007-08-23 17:28 by georg.brandl. This issue is now closed.

Files
File name Uploaded Description Edit
exception_pickle.patch ehuss, 2007-06-27 18:44 patch against trunk revision 56094
Messages (3)
msg52804 - (view) Author: Eric Huss (ehuss) Date: 2007-06-27 18:44
Due to various issues with how pickle works and new-style classes, pickling exception objects has been somewhat unreliable since Python 2.5.  See comments in patch #1692335 for more detail.  Attached is a patch that seems to improve pickling exceptions to support various different types of subclasses.

It has some limitations (exceptions that use __slots__, doesn't fully support SyntaxError, UnicodeError, SystemExit, or WindowsError).  However, it is an improvement for my situation.

msg52805 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2007-08-11 18:31
Eric, could you comment on the current version of the other patch?  Does that work for you?  Is that sufficient?  If not, how are they different?  Should they both be applied, in part or in whole?
msg55164 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-08-23 17:28
Closing in favor of #1692335.
History
Date User Action Args
2007-08-23 17:28:00georg.brandlsetstatus: open -> closed
superseder: Fix exception pickling: Move initial args assignment to BaseException.__new__
messages: + msg55164
nosy: + georg.brandl
2007-06-27 18:44:32ehusscreate