[issue25731] Assigning and deleting __new__ attr on the class does not allow to create instances of this class
Bohuslav "Slavek" Kabrda
report at bugs.python.org
Mon Jan 18 12:11:09 EST 2016
Bohuslav "Slavek" Kabrda added the comment:
Hi, I'm maintainer of flexmock [1] and some users of my library have started hitting this bug [2] - when one tries to mock __new__ and then revert this mock at the end of testcase to the original one (either by deleting the mock __new__ or replacing mock __new__ by the old one), then one gets "TypeError: object() takes no parameters".
I think that solution proposed by Eryk is correct, but I don't have that much insight into Python internals to confirm that 100 %. I would appreciate this getting fixed. Thanks!
[1] https://github.com/bkabrda/flexmock
[2] https://github.com/bkabrda/flexmock/issues/13
----------
nosy: +bkabrda
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25731>
_______________________________________
More information about the Python-bugs-list
mailing list