Edgewall Software

Opened 11 years ago

Last modified 10 years ago

#11023 closed enhancement

Polymorphic access to section methods when calling Option accessor — at Initial Version

Reported by: Olemis Lang <olemis+trac@…> Owned by:
Priority: normal Milestone: 1.0.2
Component: general Version: 1.0-stable
Severity: minor Keywords: bloodhound configuration option descriptor polymorphism
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Subclasses of trac.config.Configuration have been implemented for Apache™ Bloodhound multi-product support . They store settings in the database instead of .ini files . They satisfy expected behavior since [ Trac config tests will pass]. Nonetheless some errors have been detected while using them together with Option descriptors .

The root cause is that trac.config.Option.accessor is set to unbound method trac.config.Section.get . This very same method is overriden by our sub-classes. Therefore Option.__get__ under the new circumstances will always fail because the more specialized method is never invoked.

Hence I'm proposing this patch to be committed upstream in order to enable method polymorphism on Section instances as a consequence of invoking Option.__get__ .

Change History (0)

Note: See TracTickets for help on using tickets.