nvda
de187e79 - When pickling addon state use only builtin types, and add unit test for the pickling and unpickling process. (#15556)

Commit
2 years ago
When pickling addon state use only builtin types, and add unit test for the pickling and unpickling process. (#15556) Fixes #15554 Summary of the issue: When pickling add-ons state it is necessary to use only builtin types, so that it can be loaded in older versions of NVDA. IN PR #15439 the backCompatToVersion was mistakenly pickled as a custom named tuple MajorMinorPatch. This means it is impossible to start older versions of NVDA with the config from the latest beta NVDA crashes on startup. Description of user facing changes It should be once again possible to start older versions of NVDA with the config used with the latest beta. Description of development approach The manualOverridesAPIVersion is pickled as a standard tuple. To make sure similar regressions are not introduced I have added unit test covering various scenarios of converting state to, and loading it from, pickled data. Note that I have intentionally not used pickle files, since when the given custom data type is added to NVDA it will always be unpickled successfully.
Author
Parents
Loading