#13233 closed defect (fixed)
FlexibleAssignToPlugin not compatible with Trac 1.2
| Reported by: | Jon Ashley | Owned by: | Ryan J Ollos |
|---|---|---|---|
| Priority: | normal | Component: | FlexibleAssignToPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 1.2 |
Description
FlexibleAssignToPlugin won't work with Trac 1.2, because the tuple _TRUE_VALUES has been removed from trac/config.py.
A simple fix is to declare a replacement for _TRUE_VALUES in the plugin itself.
Attachments (0)
Change History (11)
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
r16702 is untested. Please let me know if the change works for you.
comment:4 follow-up: 5 Changed 8 years ago by
Two review comments:
- The function
getbool()in flexibleassignto.py is now unused so should be deleted. - The __init__.py file needs to contain the statement
from flexibleassignto import *
or similar, otherwise the user-provided implementation ofIValidOwnerProvidercannot load.
comment:5 follow-up: 6 Changed 8 years ago by
Replying to Jon Ashley:
- The function
getbool()in flexibleassignto.py is now unused so should be deleted.
I realized it wasn't used but left it because removing it could break someone's IValidOwnerProvider implementation if they are using the function.
- The __init__.py file needs to contain the statement
from flexibleassignto import *or similar, otherwise the user-provided implementation ofIValidOwnerProvidercannot load.
I expected that a user would create a single-file plugin that uses the API rather than adding their code to this plugin and recompiling the egg/wheel. No problem to add it back, I suppose.
comment:6 follow-up: 7 Changed 8 years ago by
Replying to Ryan J Ollos:
I expected that a user would create a single-file plugin that uses the API rather than adding their code to this plugin and recompiling the egg/wheel. No problem to add it back, I suppose.
The way the plugin is used at my site is that the egg file is compiled from the plugin and placed in the Trac environment's plugin folder, then the LocalValidOwnerProvider.py file is also placed in the Trac environment's plugin folder. It's not managed as part of the plugin and doesn't end up in the egg file.
That sounds like the situation you are expecting, but that's what isn't working unless the IValidOwnerProvider name is exported in the __init__.py file.
comment:7 Changed 8 years ago by
Replying to Jon Ashley:
That sounds like the situation you are expecting, but that's what isn't working unless the
IValidOwnerProvidername is exported in the __init__.py file.
Yes, I see. Generally the * import isn't needed in __init__.py if you modify the entry point appropriately, but in this case if you expect to do flexibleassignto import IValidOwnerProvider rather than flexibleassignto.flexibleassignto import IValidOwnerProvider, the * import is needed.
comment:9 follow-up: 10 Changed 8 years ago by
This now works for me. I hadn't considered that other users of the plugin might be relying on getbool().
comment:10 Changed 8 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Replying to Jon Ashley:
This now works for me.
Thanks for the feedback!
I hadn't considered that other users of the plugin might be relying on
getbool().
I doubt it will affect anyone either way, but I considered it was just easier to be on the safe side of things.
comment:11 Changed 8 years ago by
| Owner: | set to Ryan J Ollos |
|---|



In 16702: