Commits

Olemis Lang  committed 2fd5c1f

Trac #11148 : Open question : Move 'extends_with_prefix' to e.g. trac.util ?

  • Participants
  • Parent commits 84d51cb
  • Branches trac_t11148

Comments (0)

Files changed (1)

File t11148/t11148_r11782_IEntityChangeListener_extends_with_prefix.diff

 
 diff -r 8d0c3223a818 trac/core.py
 --- a/trac/core.py	Thu Apr 18 14:30:21 2013 +0000
-+++ b/trac/core.py	Thu Apr 18 21:56:04 2013 -0500
-@@ -165,8 +165,14 @@
++++ b/trac/core.py	Thu Apr 18 21:57:48 2013 -0500
+@@ -165,8 +165,15 @@
  
          locals_.setdefault('_implements', []).extend(interfaces)
  
 +implements = Component.implements
  
 -implements = Component.implements
++# FIXME : Move to e.g. trac.util ?
 +def extends_with_prefix(prefix):
 +    def prefix_decorator(class_):
 +        class_._extends_with_prefix = prefix
  
  
  class ComponentManager(object):
-@@ -236,3 +242,92 @@
+@@ -236,3 +243,92 @@
          with the given class will not be available.
          """
          return True
 +
 diff -r 8d0c3223a818 trac/ticket/model.py
 --- a/trac/ticket/model.py	Thu Apr 18 14:30:21 2013 +0000
-+++ b/trac/ticket/model.py	Thu Apr 18 21:56:04 2013 -0500
++++ b/trac/ticket/model.py	Thu Apr 18 21:57:48 2013 -0500
 @@ -25,7 +25,8 @@
  from trac.attachment import Attachment
  from trac import core
          """
 diff -r 8d0c3223a818 trac/ticket/tests/model.py
 --- a/trac/ticket/tests/model.py	Thu Apr 18 14:30:21 2013 +0000
-+++ b/trac/ticket/tests/model.py	Thu Apr 18 21:56:04 2013 -0500
++++ b/trac/ticket/tests/model.py	Thu Apr 18 21:57:48 2013 -0500
 @@ -12,8 +12,8 @@
  from trac.core import TracError, implements
  from trac.resource import ResourceNotFound