Bug tracking

Feed subscription: RSS or Atom.


#1232 – Invalid call to __new__ method for singleton classes
Date added: 2010-03-20 11:34:41 Type: Bug report
Status: Resolved Priority: Normal
Affected version: trunk Milestone: 0.4
Reported by: Assigned to: Not assigned yet!
Each singleton class in bluemindo calls the __new__ method of its parent, in order to forward arguments and keyword arguments.
However, it's broken, as it forwards them as a list, and a dict, instead of forwarding them as arguments and keyword arguments.
(cls.ref = super(ConfigLoader, cls).__new__(cls, *args, **kws) instead of cls.ref = super(ConfigLoader, cls).__new__(cls, args, kws) would do it)

Furthermore, each of these classes inherits only from object, that triggers a DeprecationWarning since python 2.6 if __new__ is called with arguments.
So, I would propose to replace all those overcomplicated calls by "cls.ref = object.__new__(cls)".
07_object_new.patch by ThibG
Added on 2010-03-20 11:35:00
ThibG edited this bug - 2010-03-20 11:35:00
  • Attached a file
xbright edited this bug - 2011-03-15 12:10:38
  • Milestone changed to 0.4
Fixed by r131 - 2011-09-11 03:30:58
Erwan Briand
This bug was fixed by the commit r131. This is an automatic fix.
This bug has been resolved.
Post to this thread

This bug report has been closed by a developer.
Being resolved or rejected, this report has been closed by a developer, thus you may not need to add an answer (even if you can do it anyway).



Authorized (X)HTML tags: a, img, abbr, blockquote, code, ul, ol, li, h3, h4, p, br, hr, strong, em, pre, sub, sup, table, caption, thead, tr, th, tfoot, tbody, td.

Captcha security:
In order to check you are not a robot, please answer to that simple question:
Please write the 1th character of Kundai.