[Grok-dev] The grokking process

Fernando Correa Neto fcdoth at gmail.com
Mon Oct 8 23:45:13 EDT 2007


Hello everyone,

After some more investigation, I hooked up my pdb into martian to
check how things were going in there during the grokking process.
And here is what I found:

(Pdb) pprint(grokkers)
[(<grok.meta.DefinePermissionGrokker object at 0x36f7f10>,
  'groktemplates.app',
  <module 'groktemplates.app' from
'/Users/fcorrea/groktemplates/src/groktemplates/app.pyc'>),
 (<grok.meta.FilesystemPageTemplateGrokker object at 0x36f7f30>,
  'groktemplates.app',
  <module 'groktemplates.app' from
'/Users/fcorrea/groktemplates/src/groktemplates/app.pyc'>),
 (<grok.meta.ApplicationGrokker object at 0x36f7ed0>,
  'groktemplates',
  <class 'groktemplates.app.groktemplates'>),
 (<grok.meta.SiteGrokker object at 0x3705090>,
  'groktemplates',
  <class 'groktemplates.app.groktemplates'>),
 (<megrok.buffet.grokker.BuffetViewGrokker object at 0x37051f0>,
  'Index',
  <class 'groktemplates.app.Index'>),
 (<grok.meta.AdapterDecoratorGrokker object at 0x36f7e90>,
  'groktemplates.app',
  <module 'groktemplates.app' from
'/Users/fcorrea/groktemplates/src/groktemplates/app.pyc'>),
 (<grok.meta.GlobalUtilityDirectiveGrokker object at 0x36f7f50>,
  'groktemplates.app',
  <module 'groktemplates.app' from
'/Users/fcorrea/groktemplates/src/groktemplates/app.pyc'>),
 (<grok.meta.StaticResourcesGrokker object at 0x37050b0>,
  'groktemplates.app',
  <module 'groktemplates.app' from
'/Users/fcorrea/groktemplates/src/groktemplates/app.pyc'>),
 (<grok.meta.SubscriberGrokker object at 0x37050d0>,
  'groktemplates.app',
  <module 'groktemplates.app' from
'/Users/fcorrea/groktemplates/src/groktemplates/app.pyc'>),
 (<grok.meta.ViewGrokker object at 0x3705110>,
  'Index',
  <class 'groktemplates.app.Index'>),
 (<grok.meta.ContainerGrokker object at 0x36f7ef0>,
  'groktemplates',
  <class 'groktemplates.app.groktemplates'>)]

It is clear that megrok.buffet.grokker.BuffetViewGrokker was picked
earlier than grok.meta.ViewGrokker and that's what I wanted. The
problem is that all the grokkers in the list are going to be grokked.
When it happens, the grok.meta.ViewGrokker and the
megrok.buffet.grokker.BuffetViewGrokker will conflict because both
defines a checker for the same factory and thus raising a
DuplicationError.

I am just trying to subclass a grok.View and defining a new grokker
for it and I got stuck on it.
Any possible clue on how to prevent it and have both grok.View and
megrok.Buffet.View working side-by-side without further problems?

Regards,
Fernando


More information about the Grok-dev mailing list