Ticket #3037 (reopened defect)
Multiple bugs in trac.config
| Reported by: | athomas | Owned by: | athomas |
|---|---|---|---|
| Priority: | low | Milestone: | 0.13 |
| Component: | general | Version: | devel |
| Severity: | minor | Keywords: | global config |
| Cc: |
Description
While testing some global configuration changes, I noticed they weren't working with InterTrac. After some investigation it seems there are a few problems with the current config module:
- Section.__contains__() does not use the global config, nor does Section.get()
- ConfigParser ignores case, but config.Configuration._defaults does not.
- ConfigParser.read() overlays previous configuration. The issue with this is that we use read() when a configuration modification is detected. Deleted options are not removed.
The attached patch fixes the first two issues. It also updates one of the config unit tests, as it can now fail if a global configuration file has entries (NB. I'm not sure whether the fix in the unit test is too hackish?)
The third issue would require some kind of dirty configuration list, for both the site and env configs. I'm not sure the issue is bad enough to warrant the ugliness.


