[Checkins] SVN: grokcore.component/branches/jw-philipp-using-ndir-directives/src/grokcore/component/ Now that directives have a set() method, remove a hack that had to be introduced earlier.

Philipp von Weitershausen philikon at philikon.de
Sat May 3 07:39:38 EDT 2008


Log message for revision 86182:
  Now that directives have a set() method, remove a hack that had to be introduced earlier.

Changed:
  U   grokcore.component/branches/jw-philipp-using-ndir-directives/src/grokcore/component/meta.py
  U   grokcore.component/branches/jw-philipp-using-ndir-directives/src/grokcore/component/testing.py

-=-
Modified: grokcore.component/branches/jw-philipp-using-ndir-directives/src/grokcore/component/meta.py
===================================================================
--- grokcore.component/branches/jw-philipp-using-ndir-directives/src/grokcore/component/meta.py	2008-05-03 11:38:36 UTC (rev 86181)
+++ grokcore.component/branches/jw-philipp-using-ndir-directives/src/grokcore/component/meta.py	2008-05-03 11:39:38 UTC (rev 86182)
@@ -30,9 +30,6 @@
     check_module_component(factory, component, 'context', directive.context)
     return component
 
-def get_name_classname(factory):
-    return get_name(factory, factory.__name__.lower())
-
 def get_provides(factory):
     provides = directive.provides.get(factory)
 

Modified: grokcore.component/branches/jw-philipp-using-ndir-directives/src/grokcore/component/testing.py
===================================================================
--- grokcore.component/branches/jw-philipp-using-ndir-directives/src/grokcore/component/testing.py	2008-05-03 11:38:36 UTC (rev 86181)
+++ grokcore.component/branches/jw-philipp-using-ndir-directives/src/grokcore/component/testing.py	2008-05-03 11:39:38 UTC (rev 86182)
@@ -13,6 +13,7 @@
 ##############################################################################
 """Grok test helpers
 """
+import grokcore.component
 from zope.configuration.config import ConfigurationMachine
 from martian import scan
 from grokcore.component import zcml
@@ -174,10 +175,7 @@
 
     module = module_info.getModule()
     if context is not None:
-        # XXX this depends on the particular implementation of the
-        # directive storages :(
-        dotted_name = 'grokcore.component.directive.context'
-        setattr(module, dotted_name, context)
+        grokcore.component.context.set(module, context)
     if templates is not None:
         module.__grok_templates__ = templates
     config = ConfigurationMachine()



More information about the Checkins mailing list