Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

winVersion: replace winVersion.winVersion/winVersionText with data coming from winVersion.WinVersion class #11933

Closed
josephsl opened this issue Dec 12, 2020 · 0 comments · Fixed by #11909
Milestone

Comments

@josephsl
Copy link
Collaborator

Hi,

Blocked by #11837

Is your feature request related to a problem? Please describe.

winVersion module includes two variables (more towards constants) that record Windows version information:

  • winVersion.winVersion: sys.getwindowsversion() tuple
  • winVersion.winVersionText: text representation of Windows version information for use at startup and update checks

As noted on #11837, winVersion.WinVersion class and helper functions (including winVersion.getWinVer function) will record Windows version information for the current system and other Windows releases. Also, new constants will be added to winVersion module that will represent all supported Windows releases (for example, winVersion.WIN7_SP1) which can be used to provide rich comparisons, replacing version.major/version.minor checks and so on. Therefore, if winVersion.winVersion/winVersionText is kept, it will confuse developers.

Describe the solution you'd like

Remove winVersion.winVersion and winVersion.winVersionText altogether in favor of using winVersion.WinVersion class, winVersion.getWinVer function, and using winVersion.WIN* constants.

Describe alternatives you've considered

Leave winVersion.winVersion/winVersionText alone.

Additional context

This issue is blocked by #11837 and will be done as part of PR #11909 based on deprecation/removal comments recorded in the pull request mentioned. However, to provide backward compatibility for update checks, contents of winVersion.winVersion/winVersionText will be transfered to update check module in order to build version text as is done in 2020.4 and earlier (build string, service pack if any, product type).

Thanks.

josephsl added a commit to josephsl/nvda that referenced this issue Dec 12, 2020
Recommended by Reef Turner (Nv Access): remove winVersion.winVersion/winVersionText to reduce confusion. In preparation for it, remove winVersion.winVersion/winVersionText calls from other modules, notably app modules, app module handler, UIA objects and places where winVersion.winVersion is used. Most are replaced by winVersion.getWinVer() function call, and in case build and other information must be retrieved, whatever winVersion.getWinVer returns will be used as a starting point.
feerrenrut pushed a commit that referenced this issue Mar 25, 2021
Convenience methods and types have been added to the winVersion module for getting and comparing Windows versions. 
  - isWin10 function found in winVersion module has been removed.
  - class winVersion.WinVersion is a comparable and order-able type encapsulating Windows version information.
  - Function winVersion.getWinVer has been added to get a winVersion.WinVersion representing the currently running OS.
  - Convenience constants have been added for known Windows releases, see winVersion.WIN* constants.

Closes #11795
Closes #11837
Closes #11933
Replaces #11796
Replaces #11799
@nvaccessAuto nvaccessAuto added this to the 2021.1 milestone Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants