Commits

Olemis Lang committed 84d51cb

Trac #11148 : 'extends_with_prefix' only operates on Interface , moved outside 'Component' class

  • Participants
  • Parent commits 4eaeff5
  • 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 20:08:21 2013 -0500
-@@ -165,8 +165,16 @@
++++ b/trac/core.py	Thu Apr 18 21:56:04 2013 -0500
+@@ -165,8 +165,14 @@
  
          locals_.setdefault('_implements', []).extend(interfaces)
  
-+    @staticmethod
-+    def extends_with_prefix(prefix):
-+        def prefix_decorator(class_):
-+            class_._extends_with_prefix = prefix
-+            return class_
++implements = Component.implements
+ 
+-implements = Component.implements
++def extends_with_prefix(prefix):
++    def prefix_decorator(class_):
++        class_._extends_with_prefix = prefix
++        return class_
 +
-+        return prefix_decorator
- 
- implements = Component.implements
-+extends_with_prefix = Component.extends_with_prefix
++    return prefix_decorator
  
  
  class ComponentManager(object):
-@@ -236,3 +244,92 @@
+@@ -236,3 +242,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 20:08:21 2013 -0500
++++ b/trac/ticket/model.py	Thu Apr 18 21:56:04 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 20:08:21 2013 -0500
++++ b/trac/ticket/tests/model.py	Thu Apr 18 21:56:04 2013 -0500
 @@ -12,8 +12,8 @@
  from trac.core import TracError, implements
  from trac.resource import ResourceNotFound