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

Closed
ipython opened this Issue May 10, 2010 · 3 comments

Projects

None yet

2 participants

@ipython
ipython commented May 10, 2010

Original Launchpad bug 407836: https://bugs.launchpad.net/ipython/+bug/407836
Reported by: fdo.perez (Fernando Perez).

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.

@ipython
ipython commented May 10, 2010

[ LP comment 1 by: Brian Granger, on 2009-08-02 06:09:51+00:00 ]

I will look at this for 0.11.

On Sat, Aug 1, 2009 at 4:09 PM, Fernando Perez fperez.net@gmail.com 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
bgranger@calpoly.edu
ellisonbg@gmail.com

@ipython
ipython commented May 10, 2010

[ LP comment 2 by: Fernando Perez, on 2009-08-02 06:33:24+00:00 ]

On Sat, Aug 1, 2009 at 11:09 PM, Brian Grangerellisonbg@gmail.com wrote:

I will look at this for 0.11.

Great, thanks!

@fperez
Member
fperez commented Mar 13, 2011

This has been long fixed in 0.11, closing now.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment