On Thu, Jan 27, 2011 at 9:43 AM, Jan-Wijbrand Kolman <span dir="ltr"><<a href="mailto:janwijbrand@gmail.com">janwijbrand@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On 1/26/11 14:08 PM, Souheil CHELFOUH wrote:<br>
> I need to add : this is very important to me :)<br>
><br>
> 2011/1/25 Souheil CHELFOUH<<a href="mailto:trollfot@gmail.com">trollfot@gmail.com</a>>:<br>
>> Hello Grok,<br>
>><br>
>> Recently, as I tried to migrate Dolmen to Grok 1.3, I faced some problems.<br>
>> Two packages of Dolmen use class decorators and, especially in<br>
>> dolmen.menu, it creates problems with martian directives.<br>
>> In dolmen.menu, I try to access the directive value of the class being<br>
>> decorated. While it used to work on martian 0.11.x, it no longer<br>
>> works.<br>
>> We investigated the problem with J-W and Matthias and we concluded<br>
>> that Martian is not longer "class decorated safe".<br>
>> It never claimed to be, obviously, but this is a real problem for me,<br>
>> as these packages are an important brick or the Dolmen stack, for me.<br>
>> What should we do ?<br>
<br>
</div>The more I think about this, the less I see a solution: directives do<br>
their work at import-time as do class decorators. In other words, like<br>
it is not possible to get values through a directive in another<br>
directive (as the import-time has not finished yet), class decorators<br>
cannot get values through directives either.<br>
<br>
After import-time comes grokking-time. During grokking-time, annotations<br>
left by the directives can be read from the grokked components.<br>
<br>
So *maybe* there is a solution, being, have the class decorators<br>
annotate the decorated components and use a grokker (registered for a<br>
very generic component type, `object` perhaps, would that work?) read<br>
that information and do the registrations.<br>
<br>
Would this provide a way forward?<br>
<br>
regards, jw<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div><br>Hi,<br>
<br>
Maybe <a href="http://pypi.python.org/pypi/venusian">http://pypi.python.org/pypi/venusian</a><br>
can help here?<br>
<br>
Regards<br clear="all">Vincent<br></div></div>