addonAPIVersion module
- addonAPIVersion.BACK_COMPAT_TO: Tuple[int, int, int] = (2024, 1, 0)
As BACK_COMPAT_TO is incremented, the changed / removed parts / or reasoning should be added below. These only serve to act as a reminder, the changelog should be consulted for a comprehensive listing. EG: (x, y, z): Large changes to speech.py — (2024, 1, 0): upgrade to python 3.11 (2023, 1, 0): speech as str was dropped in favor of only SpeechCommand, and security changes. (2022, 1, 0): various constants moved to enums, notably a controlTypes refactor. (2021, 1, 0): wxPython 4.1.1, SayAll / Speech re-arranged, removal of previously deprecated code. (2019, 3, 0): speech refactor, Python 3 (0, 0, 0): API version zero, used to signify addons released prior to API version checks.
- addonAPIVersion.ADDON_API_VERSION_REGEX: Pattern = re.compile('^(0|\\d{4})\\.(\\d)(?:\\.(\\d))?$')
Compiled regular expression to match an addon API version string. Supports year.major.minor versions (e.g. 2018.1.1). Although year and major are mandatory, minor is optional. Resulting match objects expose three groups reflecting: - release year - release major - release minor As minor is optional, the final group in the resulting match object may be None if minor is not provided in the original string. In this case it should be treated as being 0. See also: L{tests.unit.test_addonVersionCheck.TestGetAPIVersionTupleFromString}
- addonAPIVersion.getAPIVersionTupleFromString(version: str) Tuple[int, int, int]
Converts a string containing an NVDA version to a tuple of the form: (versionYear, versionMajor, versionMinor) @raises: ValueError when unable to parse version string. See also: L{tests.unit.test_addonVersionCheck.TestGetAPIVersionTupleFromString}
- addonAPIVersion.formatForGUI(versionTuple: Tuple[int, int, int]) str
Converts a version tuple to a string for displaying in the GUI Examples: - (2018, 1, 1) becomes “2018.1.1” - (2018, 1, 0) becomes “2018.1” - (0, 0, 0) becomes “0.0”