Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 243802 - app-office/taskcoach calls object.__init__ with arguments, which fails in python-2.6
Summary: app-office/taskcoach calls object.__init__ with arguments, which fails in pyt...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Vlastimil Babka (Caster) (RETIRED)
URL: https://sourceforge.net/tracker2/?fun...
Whiteboard:
Keywords:
Depends on:
Blocks: python-2.6
  Show dependency tree
 
Reported: 2008-10-24 08:48 UTC by Andrey
Modified: 2009-04-03 05:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey 2008-10-24 08:48:36 UTC
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
Comment 1 Mike Auty (RETIRED) gentoo-dev 2008-10-25 11:38:18 UTC
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.
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2008-10-31 23:50:41 UTC
Thanks, reported to upstream for now. I don't have python 2.6 unmasked to test.
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2008-11-12 10:26:11 UTC
Should be fixed by upstream in 0.71.3 I just committed. Can anyone please test?
Comment 4 Andrey 2008-11-12 16:42:09 UTC
(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
Comment 5 Daniel Black (RETIRED) gentoo-dev 2009-02-04 12:35:10 UTC
(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
Comment 6 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-04-02 21:57:25 UTC
Could anyone try taskcoach-0.72.3 with python 2.6 as I don't see the problematic line there anymore?
Comment 7 Andrey 2009-04-02 22:27:30 UTC
(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
Comment 8 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-04-03 05:31:32 UTC
Thanks :) Closing then.