Do not use .message attributes in exceptions, deprecated in 2.6

Bug #407836 reported by Fernando Perez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IPython
Confirmed
Medium
Unassigned

Bug Description

Running the test suite under 2.6 shows:

/home/fperez/usr/lib/python2.6/site-packages/IPython/kernel/error.py:127: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6

The code reads:

class CompositeError(KernelError):
    def __init__(self, message, elist):
        Exception.__init__(self, *(message, elist))
        self.message = message
        self.elist = elist

I don't want to change that for 0.10 because I'm pretty sure I'll break something. But for 0.11, we should clean this up.

Revision history for this message
Brian Granger (ellisonbg) wrote : Re: [Bug 407836] [NEW] Do not use .message attributes in exceptions, deprecated in 2.6

I will look at this for 0.11.

On Sat, Aug 1, 2009 at 4:09 PM, Fernando Perez <email address hidden> wrote:

> Public bug reported:
>
> Running the test suite under 2.6 shows:
>
> /home/fperez/usr/lib/python2.6/site-packages/IPython/kernel/error.py:127:
> DeprecationWarning: BaseException.message has been deprecated as of Python
> 2.6
>
> The code reads:
>
> class CompositeError(KernelError):
> def __init__(self, message, elist):
> Exception.__init__(self, *(message, elist))
> self.message = message
> self.elist = elist
>
> I don't want to change that for 0.10 because I'm pretty sure I'll break
> something. But for 0.11, we should clean this up.
>
> ** Affects: ipython
> Importance: Medium
> Status: Confirmed
>
> --
> Do not use .message attributes in exceptions, deprecated in 2.6
> https://bugs.launchpad.net/bugs/407836
> You received this bug notification because you are a member of IPython
> Developers, which is subscribed to IPython.
>
> Status in IPython - Enhanced Interactive Python: Confirmed
>
> Bug description:
> Running the test suite under 2.6 shows:
>
> /home/fperez/usr/lib/python2.6/site-packages/IPython/kernel/error.py:127:
> DeprecationWarning: BaseException.message has been deprecated as of Python
> 2.6
>
> The code reads:
>
> class CompositeError(KernelError):
> def __init__(self, message, elist):
> Exception.__init__(self, *(message, elist))
> self.message = message
> self.elist = elist
>
> I don't want to change that for 0.10 because I'm pretty sure I'll break
> something. But for 0.11, we should clean this up.
>

--
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
<email address hidden>
<email address hidden>

Revision history for this message
Fernando Perez (fdo.perez) wrote :

On Sat, Aug 1, 2009 at 11:09 PM, Brian Granger<email address hidden> wrote:
> I will look at this for 0.11.

Great, thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.