Duplicate options are allowed in sections of trac.ini — at Version 10
|Reported by:||Ryan J Ollos||Owned by:||Ryan J Ollos|
Description (last modified by )
The sections of trac.ini allow duplicate options, with later values overwriting those that come first. Two patterns that could lead to confusing behavior when the user doesn't realize that the option's value is being changed later in the file are:
- Duplicate sections with the same option.
[trac] default_handler = WikiModule ... [trac] default_handler = TicketModule
- Duplicate options within a section.
[trac] default_handler = WikiModule ... default_handler = TicketModule
While Python 3.x has a much improved configparser module with a
strict mode that raises an error when an option appears more than once, I'm not sure there is much we can do in Python 2.x using
SO:5396653 suggests using a
dict_type that allows multiple values with the same key, however
dict_type is only supported in Python 2.6, so we wouldn't be able to apply as
dict_type-based fix to 1.0-stable.
Change History (10)
comment:6 by , 20 months ago
|Milestone:||1.5.2 → 1.5.3|