Opened 19 years ago
Closed 17 years ago
#1992 closed enhancement (fixed)
Make trac more robust against plugin failure
Reported by: | anonymous | Owned by: | Christopher Lenz |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | general | Version: | devel |
Severity: | normal | Keywords: | plugin setuptools |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I recently installed the AccountManager plugin from Trac Hacks. After the changes to the ITemplateProvider interface in [2132] this plugin makes trac stop working for obvious reasons. My question now is: would it be possible to make trac more robust against such plugin failures. So that if a plugin fails to initialize, trac would still work, but with the plugin disabled?
I made this ticket an enhancement request, because it is the devel version I am using after all.
Attachments (0)
Change History (5)
comment:1 by , 19 years ago
comment:2 by , 18 years ago
Keywords: | setuptools added; robustness removed |
---|
Is this something that can be handled in 0.11?
comment:3 by , 18 years ago
Milestone: | → 2.0 |
---|
No, I don't think so, but it would be very useful to have this in the future.
comment:4 by , 17 years ago
Milestone: | 2.0 → 0.11 |
---|
Is there anything non-robust now as we have setuptools support integrated for 0.11? No plugin loading error for any reason will affect Trac as far as I know?
This should likely be set as 'fixed' for milestone 0.11?
comment:5 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Starting with 0.11, plugins can easily declare which Trac versions they're compatible with, in their setup.py file, see for example r6573 (once 0.11 is out, this needs to be adapted to a plain >=0.11
, I think).
See also: http://peak.telecommunity.com/DevCenter/setuptools#declaring-dependencies
While I'll leave this open as an enhancement request, I don't think this is possible.
The plugin interfaces and the available plugins are basically experimental at this point, and breakage is unavoidable until we release 0.9 final. However, we should be using the versioning features provided by Setuptools in the future, so that plugins can declare what versions of Trac they are compatible with. Incompatible plugins will not be loaded.
Also, the evolution of the plugin APIs will be more conservative. If a change to an interface needs to be made, we'll consider making a new interface instead of just updating the existing one.