#11023 closed enhancement (fixed)
Polymorphic access to section methods when calling Option accessor
Reported by: | 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__
.
Attachments (0)
Change History (6)
comment:1 by , 12 years ago
Cc: | added |
---|
comment:2 by , 12 years ago
Milestone: | → 1.0.2 |
---|
comment:3 by , 11 years ago
Cc: | removed |
---|---|
Owner: | set to |
Status: | new → assigned |
Okay, I think I understand now. Unit tests still pass with Python 2.5 and 2.7, and this doesn't seem to break anything. Changes have been prepared for commit in rjollos.git:t11023.
comment:4 by , 11 years ago
comment:5 by , 11 years ago
Owner: | changed from | to
---|
Looks harmless.