On Thu, Jan 27, 2011 at 9:43 AM, Jan-Wijbrand Kolman <span dir="ltr">&lt;<a href="mailto:janwijbrand@gmail.com">janwijbrand@gmail.com</a>&gt;</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>
&gt; I need to add : this is very important to me :)<br>
&gt;<br>
&gt; 2011/1/25 Souheil CHELFOUH&lt;<a href="mailto:trollfot@gmail.com">trollfot@gmail.com</a>&gt;:<br>
&gt;&gt; Hello Grok,<br>
&gt;&gt;<br>
&gt;&gt; Recently, as I tried to migrate Dolmen to Grok 1.3, I faced some problems.<br>
&gt;&gt; Two packages of Dolmen use class decorators and, especially in<br>
&gt;&gt; dolmen.menu, it creates problems with martian directives.<br>
&gt;&gt; In dolmen.menu, I try to access the directive value of the class being<br>
&gt;&gt; decorated. While it used to work on martian 0.11.x, it no longer<br>
&gt;&gt; works.<br>
&gt;&gt; We investigated the problem with J-W and Matthias and we concluded<br>
&gt;&gt; that Martian is not longer &quot;class decorated safe&quot;.<br>
&gt;&gt; It never claimed to be, obviously, but this is a real problem for me,<br>
&gt;&gt; as these packages are an important brick or the Dolmen stack, for me.<br>
&gt;&gt; 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>