Commits

fs  committed 867475d

Make the test suite compatible with Python 2.6: cls must be the first parameter when calling type's !__init__ in a metaclass

Patch by Toshio Kuratomi, imported from Fedora CVS, licensed under the same terms as CherryPy 2.3

  • Participants
  • Parent commits ecef7e8
  • Branches cherrypy-2.x

Comments (0)

Files changed (2)

File cherrypy/test/test_core.py

         and adds an instance of the subclass as an attribute of cherrypy.root.
         """
         def __init__(cls, name, bases, dct):
-            type.__init__(name, bases, dct)
+            type.__init__(cls, name, bases, dct)
             for value in dct.itervalues():
                 if isinstance(value, types.FunctionType):
                     value.exposed = True

File cherrypy/test/test_custom_filters.py

         and adds an instance of the subclass as an attribute of cherrypy.root.
         """
         def __init__(cls, name, bases, dct):
-            type.__init__(name, bases, dct)
+            type.__init__(cls, name, bases, dct)
             for value in dct.itervalues():
                 if isinstance(value, types.FunctionType):
                     value.exposed = True