Modify ↓
#14389 closed defect (fixed)
Refactor for Trac 1.6/Python 3
| Reported by: | Rob Hills | Owned by: | Rob Hills |
|---|---|---|---|
| Priority: | normal | Component: | ComponentDependencyPlugin |
| Severity: | blocker | Keywords: | |
| Cc: | Trac Release: | 1.6 |
Description
This plugin failed to load when used in Trac 1.6
Attachments (0)
Change History (5)
comment:1 Changed 4 months ago by
comment:2 Changed 4 months ago by
We could use relative imports.
-from componentdependency import * -from interface import * -from test import * +from .componentdependency import * +from .interface import * +from .test import *
comment:3 Changed 4 months ago by
So something like this works better?
diff --git a/componentdependencies/__init__.py b/componentdependencies/__init__.py
index 409b576..4c937bb 100644
--- a/componentdependencies/__init__.py
+++ b/componentdependencies/__init__.py
@@ -1,4 +1,4 @@
#
-from componentdependency import *
-from interface import *
-from test import *
+from .componentdependency import *
+from .interface import *
+from .test import *
diff --git a/setup.py b/setup.py
index f8d58d5..7d5088a 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ from setuptools import find_packages, setup
setup(name='TracComponentDependency',
- version='0.3',
+ version='0.4',
description="allows plugins to depend on other components being enabled",
author='Jeff Hammel',
author_email='jhammel@openplans.org',
comment:4 Changed 4 months ago by
| Owner: | set to Jun Omae |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
In 18701:
comment:5 Changed 4 months ago by
| Owner: | changed from Jun Omae to Rob Hills |
|---|
Note: See
TracTickets for help on using
tickets.



Proposed patch - fixes the issue in my test Trac 1.6:
diff --git a/componentdependencies/__init__.py b/componentdependencies/__init__.py index 409b576..6cbe07f 100644 --- a/componentdependencies/__init__.py +++ b/componentdependencies/__init__.py @@ -1,4 +1,4 @@ # -from componentdependency import * -from interface import * -from test import * +from componentdependencies.componentdependency import * +from componentdependencies.interface import * +from componentdependencies.test import * diff --git a/setup.py b/setup.py index f8d58d5..7d5088a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import find_packages, setup setup(name='TracComponentDependency', - version='0.3', + version='0.4', description="allows plugins to depend on other components being enabled", author='Jeff Hammel', author_email='jhammel@openplans.org',