Skip to content

Comments

NVDA 2026.1 compatibility and remove legacy compatibility#64

Draft
AAClause wants to merge 3 commits intodevelopfrom
NVDA-2026.1
Draft

NVDA 2026.1 compatibility and remove legacy compatibility#64
AAClause wants to merge 3 commits intodevelopfrom
NVDA-2026.1

Conversation

@AAClause
Copy link
Member

  • 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)

- 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant