Skip to content

Encapsulate registry keys more consistently#18608

Merged
SaschaCowley merged 15 commits into
masterfrom
regKeyRefactor
Aug 6, 2025
Merged

Encapsulate registry keys more consistently#18608
SaschaCowley merged 15 commits into
masterfrom
regKeyRefactor

Conversation

@seanbudd

@seanbudd seanbudd commented Aug 4, 2025

Copy link
Copy Markdown
Member

Link to issue number:

Prep work for #16304

Summary of the issue:

Registry keys are not consistently encapsulated in the NVDA code base.
When migrating to 64bit, we need to be able to fetch legacy 32bit versions of registry keys from the 64bit version.
Having more clear encapsulation of registry keys will make this easier.

Description of user facing changes:

Description of developer facing changes:

Deprecates easeOfAccess.RegistryKey for a more unified approach

Description of development approach:

  • Moved all major NVDA registry keys into config.RegistryKey. Create an x86 version of this for use in the 64bit migration.
  • Removed usages of the reserved 0 parameter. The magic number should either be documented as a constant or not used. it's available as winreg.REG_OPTION_RESERVED but this is not documented or part of the official python API. Rather than making a named constant, the value can only be the default value so it seems cleaner to drop it.

Testing strategy:

Ensure nothing breaks in smoke testing

Known issues with pull request:

None

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@coderabbitai summary

Comment thread source/config/__init__.py Outdated
@seanbudd

seanbudd commented Aug 4, 2025

Copy link
Copy Markdown
Member Author

pre-commit.ci run

Comment thread user_docs/en/changes.md Outdated
@seanbudd seanbudd marked this pull request as ready for review August 4, 2025 05:24
Copilot AI review requested due to automatic review settings August 4, 2025 05:24
@seanbudd seanbudd requested a review from a team as a code owner August 4, 2025 05:24
@seanbudd seanbudd requested a review from SaschaCowley August 4, 2025 05:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR encapsulates NVDA's Windows registry keys into a more unified and consistent approach. The main purpose is to consolidate registry key definitions into a single location to prepare for 64-bit migration, where legacy 32-bit registry keys will need to be accessed from 64-bit versions.

Key changes include:

  • Moving all major NVDA registry keys into config.registry.RegistryKey
  • Deprecating easeOfAccess.RegistryKey in favor of the unified approach
  • Removing usage of reserved 0 parameter in winreg.OpenKey() calls

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
user_docs/en/changes.md Documents deprecation of old RegistryKey classes
source/config/registry.py New unified registry key definitions with x86 variant for legacy access
source/config/init.py Updates deprecation warnings and removes old RegistryKey class
source/easeOfAccess.py Migrates to use new registry keys and provides backward compatibility
source/winVersion.py Uses centralized registry keys instead of hardcoded strings
source/systemUtils.py Uses centralized registry keys for system clock visibility check
source/mathType.py Removes reserved 0 parameter from winreg.OpenKey call
source/installer.py Updates all registry operations to use new centralized keys
source/_remoteClient/urlHandler.py Removes reserved 0 parameter from winreg.OpenKey call
source/_remoteClient/localMachine.py Uses centralized registry keys for policy system paths
source/NVDAState.py Updates imports to use new registry module
site_scons/site_tools/doxygen.py Removes reserved 0 parameter from winreg.OpenKey call
sconstruct Removes reserved 0 parameter from winreg.OpenKey call

Comment thread source/installer.py Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread source/easeOfAccess.py Outdated
@SaschaCowley SaschaCowley added this to the 2026.1 milestone Aug 4, 2025
Comment thread source/config/registry.py
Comment thread source/config/registry.py Outdated
Comment thread source/config/registry.py Outdated
Comment thread source/config/registry.py Outdated
Comment thread source/config/registry.py Outdated
Comment thread source/config/registry.py
Comment thread source/NVDAState.py
Comment thread source/_remoteClient/localMachine.py
Comment thread source/systemUtils.py
@seanbudd seanbudd removed this from the 2026.1 milestone Aug 4, 2025
@SaschaCowley SaschaCowley added this to the 2025.3 milestone Aug 4, 2025
@SaschaCowley SaschaCowley added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Aug 4, 2025
@seanbudd seanbudd requested a review from SaschaCowley August 6, 2025 01:36
@SaschaCowley SaschaCowley enabled auto-merge (squash) August 6, 2025 01:50
@SaschaCowley SaschaCowley merged commit a18a56c into master Aug 6, 2025
21 checks passed
@SaschaCowley SaschaCowley deleted the regKeyRefactor branch August 6, 2025 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants