Detailed description of the issue
In #16636 / d7facd1, config.ConfigManager.BASE_ONLY_SECTIONS underwent a mutation from a set to a frozenset.
Sadly, this modification hinders extensions from easily expanding this list.
There are perfectly legit scenarios where an extension’s settings should not be overridden by profiles. Take webAccess, for instance: https://github.com/accessolutions/WebAccessForNVDA/blob/4251aaef8809c658db35536dd7276e20c91121d0/addon/globalPlugins/webAccess/config.py
While we can work around this by doing something like:
config.ConfigManager.BASE_ONLY_SECTIONS = frozenset(config.ConfigManager.BASE_ONLY_SECTIONS | {"myTerrificSection"})
This approach feels inelegant and hacky compared to config.ConfigManager.BASE_ONLY_SECTIONS.add("myTerrificSection")
Is there a specific reason for this change? Is there a better way to achieve the same goal? Yes, I know, BASE_ONLY_SECTIONS is meant to be a constant, and here I am, looking to bend the rules a bit... :)
Thanks!
CC @seanbudd
Detailed description of the issue
In #16636 / d7facd1,
config.ConfigManager.BASE_ONLY_SECTIONSunderwent a mutation from a set to a frozenset.Sadly, this modification hinders extensions from easily expanding this list.
There are perfectly legit scenarios where an extension’s settings should not be overridden by profiles. Take webAccess, for instance: https://github.com/accessolutions/WebAccessForNVDA/blob/4251aaef8809c658db35536dd7276e20c91121d0/addon/globalPlugins/webAccess/config.py
While we can work around this by doing something like:
This approach feels inelegant and hacky compared to
config.ConfigManager.BASE_ONLY_SECTIONS.add("myTerrificSection")Is there a specific reason for this change? Is there a better way to achieve the same goal? Yes, I know, BASE_ONLY_SECTIONS is meant to be a constant, and here I am, looking to bend the rules a bit... :)
Thanks!
CC @seanbudd