[Patches] [ python-Patches-1692335 ] Move initial args assignment to BaseException.__new__
SourceForge.net
noreply at sourceforge.net
Sun Apr 1 15:47:18 CEST 2007
Patches item #1692335, was opened at 2007-04-01 15:46
Message generated for change (Comment added) made by zseil
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1692335&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Žiga Seilnacht (zseil)
Assigned to: Nobody/Anonymous (nobody)
Summary: Move initial args assignment to BaseException.__new__
Initial Comment:
Pickling exceptions fails when an Exception class
requires an argument in the constructor, but doesn't
call its base class' constructor. See this mail
for details:
http://mail.python.org/pipermail/python-dev/2007-April/072416.html
This patch simply moves initial args assignment to
BaseException.__new__. This should fix most of the
problems, because it is very unlikely that an
exception overwrites the __new__ method; exceptions
used to be old style classes, which don't support
the __new__ special method.
The args attribute is still overwritten in all the
__init__ methods, so there shouldn't be any backward
compatibility problems.
----------------------------------------------------------------------
>Comment By: Žiga Seilnacht (zseil)
Date: 2007-04-01 15:47
Message:
Logged In: YES
user_id=1326842
Originator: YES
File Added: exc_args_25.diff
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1692335&group_id=5470
More information about the Patches
mailing list