Chris Nelson wrote:
> Is there something about Component that makes super() misbehave.

Yes, there is something special about Component in Trac. You should
never call super().__init__() in Component subclasses, because Trac's
component framework does it automagically for you.

If you want to know how it's done, see:

  http://trac.edgewall.org/browser//trunk/trac/core.py

And also:

  http://trac.edgewall.org/wiki/TracDev/ComponentArchitecture

More specifically, look at the ComponentMeta metaclass. Note that it has
changed between 0.12-stable and trunk.

Mmh, now that I re-read the code on trunk, I wonder if we haven't lost
that functionality (automatically calling the base class' __init__()) in
the refactoring...

Jun, would you mind checking that? I'm pretty sure that the
implementation in 0.12-stable automatically calls inherited
constructors, whereas this isn't the case anymore on trunk. That would
be a regression, and we should restore the functionality.

-- Remy

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to