Opened 16 years ago
Last modified 11 years ago
#9091 new enhancement
Use RawConfigParser instead of ConfigParser in the Configuration component
| Reported by: | John Hampton | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | next-major-releases |
| Component: | general | Version: | 0.12dev |
| Severity: | normal | Keywords: | config needmajor |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
The use of ConfigParser in the configuration layer causes issues when using %(foo)s values in the config file. The th:IrcLogsPlugin does this and causes a traceback when trying to write the sample config during upgrade.
Trac itself doesn't use the interpolation feature of the ConfigParser nor do we advertize the interpolation feature of the ConfigParser.
As the interpolation feature is of dubious value, I think that we should replace ConfigParser with RawConfigParser. This should also give us case sensitivity in the section fields.
Attachments (0)
Change History (7)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
I have to look at the details of the raw config parser, but it won't be hard to make it either case sensitive or case insensitive.
[OT] BTW, the iPhone keyboard sucks due to lack of back-ticks
comment:4 by , 16 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
Now that I'm on my plane, I was able to play around with RawConfigParser a bit. It appears that section values are case sensitive, but not options. So [Components] and [components] are different sections, but
trac.web.web_ui = Enabled
and
Trac.WeB.web_ui = Enabled
are the same.
Next question is: Do we want section names to be case-sensitive?
comment:5 by , 16 years ago
| Keywords: | config needmajor added |
|---|---|
| Milestone: | 0.12 → next-major-0.1X |
| Version: | → 0.12dev |
You're welcome to move back the milestone to 0.12 if you finish this earlier, but this ticket is not necessary for the release.
(it probably needs to be done for a major release though, because of the potential breakage)
comment:6 by , 15 years ago
| Type: | defect → enhancement |
|---|
comment:7 by , 11 years ago
| Owner: | removed |
|---|---|
| Status: | assigned → new |



Making the configuration file keys case-sensitive could break many configurations out there. Typically in the
[components]section, if individual classes are specified.