Is your feature request related to a problem? Please describe.
#16748 introduced new behaviour whereby NVDA can be configured to report font attributes in speech, braille, both or not at all. This required the implementation of a new configuration key, documentFormatting.fontAttributeReporting. To avoid a breaking change to the API, aliasing code was introduced to ensure that these two configuration keys are kept in sync.
Describe the solution you'd like
Remove this code in release 2025.1.
Describe alternatives you've considered
Leave the code there. It already does version checking, so won't run if the version is not 2024.x.
Additional context
The only places that should need changing are:
|
# Alias [documentFormatting][reportFontAttributes] for backwards compatibility. |
|
# Todo: Remove in 2025.1. |
|
if version_year < 2025and NVDAState._allowDeprecatedAPI(): |
|
self._link_reportFontAttributes_and_fontAttributeReporting(key, val) |
|
|
|
def _link_reportFontAttributes_and_fontAttributeReporting(self, key, val): |
|
if not (self.path == ("documentFormatting",)): |
|
return |
|
if key == "fontAttributeReporting": |
|
key = "reportFontAttributes" |
|
val = bool(val) |
|
elif key == "reportFontAttributes": |
|
log.warning( |
|
"documentFormatting.reportFontAttributes is deprecated. Use documentFormatting.fontAttributeReporting instead.", |
|
# Include stack info so testers can report warning to add-on author. |
|
stack_info=True |
|
) |
|
key = "fontAttributeReporting" |
|
val = OutputMode.SPEECH_AND_BRAILLE if val else OutputMode.OFF |
|
else: |
|
# We don't care about other keys. |
|
return |
|
self._getUpdateSection()[key] = val |
|
self._cache[key] = val |
|
# Deprecated in 2025.1 |
|
reportFontAttributes = boolean(default=false) |
Is your feature request related to a problem? Please describe.
#16748 introduced new behaviour whereby NVDA can be configured to report font attributes in speech, braille, both or not at all. This required the implementation of a new configuration key,
documentFormatting.fontAttributeReporting. To avoid a breaking change to the API, aliasing code was introduced to ensure that these two configuration keys are kept in sync.Describe the solution you'd like
Remove this code in release 2025.1.
Describe alternatives you've considered
Leave the code there. It already does version checking, so won't run if the version is not 2024.x.
Additional context
The only places that should need changing are:
nvda/source/config/__init__.py
Lines 1287 to 1310 in 649c9e6
nvda/source/config/configSpec.py
Lines 208 to 209 in 649c9e6