NVDA 2026.1 compatibility and remove legacy compatibility#64
Draft
NVDA 2026.1 compatibility and remove legacy compatibility#64
Conversation
Member
AAClause
commented
Feb 17, 2026
- Replace controlTypes.ROLE_* and STATE_* constants with Role.* and State.* enums
- Use .displayString property instead of roleLabels/stateLabels dict lookups
- Remove six library usage (iteritems, text_type, string_types, moves.queue)
- Replace deprecated imp module with types.ModuleType
- Update hasCustomModule() to use find_spec for Python 3.12+ compatibility
- Remove try/except blocks for NVDA < 2018.3 and < 2021.1 compatibility
- Fix REASON_CARET compatibility wrapper (no longer needed)
512afd3 to
d747345
Compare
- Replace controlTypes.ROLE_* and STATE_* constants with Role.* and State.* enums - Use .displayString property instead of roleLabels/stateLabels dict lookups - Remove six library usage (iteritems, text_type, string_types, moves.queue) - Replace deprecated imp module with types.ModuleType - Update hasCustomModule() to use find_spec for Python 3.12+ compatibility - Remove try/except blocks for NVDA < 2018.3 and < 2021.1 compatibility - Fix REASON_CARET compatibility wrapper (no longer needed)
- Use NVDAHelper.localLib.VBuf_getTextInRange with fallback for older versions - Replace nvdaControls.TabbableScrolledPanel with wx.lib.scrolledpanel.ScrolledPanel fallback
- Remove NVDA version checks (buildVersion / NVDA_VERSION < "2023.2") - Remove dead code for NVDA 2014.4 (searchTag_2014, nextTag, previousTag, searchTag wrapper) - Remove Python version_info < 9 guards, use collections.abc directly - Remove unnecessary try/except imports (json, VBuf_getTextInRange) - Remove hasattr guard for addon.isDisabled (available since NVDA 2016.3) - Clean up unused imports (sys, virtualBuffers, NVDAHelper, buildVersion)
d747345 to
baaa9d0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.