Running taskcoach results in $ taskcoach /usr/lib64/python2.6/site-packages/taskcoachlib/domain/date/date.py:29: DeprecationWarning: object.__init__() takes no parameters super(RealDate, self).__init__(year, month, day) Traceback (most recent call last): File "/usr/bin/taskcoach", line 52, in <module> start() File "/usr/bin/taskcoach", line 42, in start app = application.Application(options, args) File "/usr/lib64/python2.6/site-packages/taskcoachlib/application/application.py", line 38, in __init__ self.init(**kwargs) File "/usr/lib64/python2.6/site-packages/taskcoachlib/application/application.py", line 82, in init self.mainwindow = gui.MainWindow(self.io, self.taskFile, settings, splash) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/mainwindow.py", line 207, in __init__ self.createWindowComponents() File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/mainwindow.py", line 236, in createWindowComponents self.settings, self.taskFile.categories(), self.taskFile.efforts()) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/viewerfactory.py", line 31, in addTaskViewers 'task', settings) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/viewerfactory.py", line 47, in _addViewers viewerInstance = viewerClass(viewerContainer.containerWidget, *viewerArgs, **viewerKwArgs) File "/usr/lib64/python2.6/site-packages/taskcoachlib/patterns/metaclass.py", line 33, in __call__ instance = super(NumberedInstances, class_).__call__(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/viewer.py", line 1476, in __init__ super(TaskTreeListViewer, self).__init__(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/viewer.py", line 1341, in __init__ super(TaskViewerWithColumns, self).__init__(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/viewer.py", line 1092, in __init__ super(TaskViewer, self).__init__(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/viewer.py", line 92, in __init__ super(FilterableViewerForTasks, self).__init__(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/viewer.py", line 228, in __init__ super(SortableViewer, self).__init__(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/viewer.py", line 829, in __init__ super(UpdatePerSecondViewer, self).__init__(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/viewer.py", line 908, in __init__ super(ViewerWithColumns, self).__init__(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/viewer.py", line 694, in __init__ super(TreeViewer, self).__init__(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/viewer.py", line 460, in __init__ self.widget = self.createWidget() File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/viewer.py", line 1487, in createWidget self.createTaskPopupMenu(), self.createColumnPopupMenu(), File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/viewer.py", line 1242, in createTaskPopupMenu self) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/menu.py", line 689, in __init__ settings=settings), File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/uicommand.py", line 1609, in __init__ *args, **kwargs) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/uicommand.py", line 1590, in __init__ bitmap='attachment', *args, **kwargs) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/uicommand.py", line 283, in __init__ super(ViewerCommand, self).__init__(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/uicommand.py", line 177, in __init__ super(SettingsCommand, self).__init__(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/taskcoachlib/gui/uicommand.py", line 65, in __init__ super(UICommand, self).__init__(*args, **kwargs) TypeError: object.__init__() takes no parameters The simple change --- /usr/lib64/python2.6/site-packages/taskcoachlib/gui/uicommand.py.old 2008-10-24 03:45:46.000000000 -0500 +++ /usr/lib64/python2.6/site-packages/taskcoachlib/gui/uicommand.py 2008-10-24 03:45:35.000000000 -0500 @@ -62,7 +62,7 @@ def __init__(self, menuText='?', helpText='', bitmap='nobitmap', kind=wx.ITEM_NORMAL, id=None, bitmap2=None, *args, **kwargs): - super(UICommand, self).__init__(*args, **kwargs) + super(UICommand, self).__init__() self.menuText = menuText self.helpText = helpText self.bitmap = bitmap The problem appeared after updating wxpython to use python 2.6 Reproducible: Always
This is a known change in python-2.6 (and isn't related to wxpython). From the "what's new in python 2.6" page: object.__init__() previously accepted arbitrary arguments and keyword arguments, ignoring them. In Python 2.6, this is no longer allowed and will result in a TypeError. This will affect __init__() methods that end up calling the corresponding method on object (perhaps through using super()). See issue 1683368 for discussion.
Thanks, reported to upstream for now. I don't have python 2.6 unmasked to test.
Should be fixed by upstream in 0.71.3 I just committed. Can anyone please test?
(In reply to comment #3) > Should be fixed by upstream in 0.71.3 I just committed. Can anyone please test? > works for me. only shows DeprecationWarning: /usr/lib64/python2.6/site-packages/taskcoachlib/domain/date/date.py:29: DeprecationWarning: object.__init__() takes no parameters super(RealDate, self).__init__(year, month, day) though it is strange that it shows only DeprecationWarning but not TypeError now
(In reply to comment #4) > /usr/lib64/python2.6/site-packages/taskcoachlib/domain/date/date.py:29: > DeprecationWarning: object.__init__() takes no parameters > super(RealDate, self).__init__(year, month, day) going off http://docs.python.org/library/datetime.html#datetime.date you probably should just assign the values to year,month and day rather than depending on a constructor. No upstream patch/bug exists
Could anyone try taskcoach-0.72.3 with python 2.6 as I don't see the problematic line there anymore?
(In reply to comment #6) > Could anyone try taskcoach-0.72.3 with python 2.6 as I don't see the > problematic line there anymore? > Python: 2.6.1, taskcoach: 0.72.3 Result: everything is fine, no warning line
Thanks :) Closing then.