[CherryPy] #959: python2.4/wspbus/ChannelFailure/__init__: calls to super raises with TypeError

3 views
Skip to first unread message

CherryPy

unread,
Sep 4, 2009, 10:54:19 AM9/4/09
to cherrypy...@googlegroups.com
#959: python2.4/wspbus/ChannelFailure/__init__: calls to super raises with
TypeError
-------------------------+--------------------------------------------------
Reporter: a...@xbits.de | Owner: fumanchu
Type: defect | Status: new
Priority: normal | Milestone: 3.2
Component: engine | Keywords:
-------------------------+--------------------------------------------------
Env: Cherrypy 3.2.0beta, Python 2.4.6

.... cherrypy.engine.start()

{{{
File "[...]/python2.4/site-packages/CherryPy-3.2.0beta-
py2.4.egg/cherrypy/process/wspbus.py", line 87, in __init__
super(ChannelFailures, self).__init__(*args, **kwargs)
TypeError: super() argument 1 must be type, not classobj

}}}

The error occurs with python 2.4.6, with python 2.5 it's gone. Reverting
last checkin in wspbus.py (diff r2443->r2442) makes the engine running
again under 2.4

--
Ticket URL: <http://www.cherrypy.org/ticket/959>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework

CherryPy

unread,
Sep 4, 2009, 5:08:27 PM9/4/09
to cherrypy...@googlegroups.com
#959: fixed: python2.4/wspbus/ChannelFailure/__init__: calls to super raises with
TypeError
-------------------------+--------------------------------------------------
Reporter: a...@xbits.de | Owner: fumanchu
Type: defect | Status: new
Priority: normal | Milestone: 3.2
Component: engine | Resolution:
Keywords: |
-------------------------+--------------------------------------------------
Changes (by a...@xbits.de):

* summary: python2.4/wspbus/ChannelFailure/__init__: calls to super
raises with TypeError => fixed:
python2.4/wspbus/ChannelFailure/__init__: calls
to super raises with TypeError

Comment:

I found the reason. Exception (the base class of class ChannelFailures) is
an old style class up to python2.4 and super only works for new style
classes.

Patch against trunk (also attached):

{{{
Index: cherrypy/process/wspbus.py
===================================================================
--- cherrypy/process/wspbus.py (Revision 2528)
+++ cherrypy/process/wspbus.py (Arbeitskopie)
@@ -84,7 +84,7 @@
delimiter = '\n'

def __init__(self, *args, **kwargs):
- super(ChannelFailures, self).__init__(*args, **kwargs)
+ Exception.__init__(self, *args, **kwargs)
self._exceptions = list()

def handle_exception(self):

CherryPy

unread,
Oct 3, 2009, 1:18:51 PM10/3/09
to cherrypy...@googlegroups.com
#959: fixed: python2.4/wspbus/ChannelFailure/__init__: calls to super raises with
TypeError
-------------------------+--------------------------------------------------
Reporter: a...@xbits.de | Owner: fumanchu
Type: defect | Status: closed
Priority: normal | Milestone: 3.2
Component: engine | Resolution: fixed
Keywords: |
-------------------------+--------------------------------------------------
Changes (by fumanchu):

* resolution: => fixed
* status: new => closed

Comment:

Fixed in trunk in [2540].
Reply all
Reply to author
Forward
0 new messages