winVersion.WinVersion: return "Windows 11 unknown" if an unknown build above 10.0.22000 is seen when instantiating#15993
Merged
seanbudd merged 6 commits intonvaccess:masterfrom Jan 2, 2024
Conversation
… unknown'. Re nvaccess#15992. Use structural pattern matching (match/case) when filling out Windows release names. For unknown builds above 10.0.22000, the uild is named 'Windows 11 unknoww'. The overall structural patern matching proceeds as follows: match (major, minor): * 6.3: Windows 8.1 * 10.0 and is a known build: retrieve release name from the private builds to release names map * 10.0 with unkonwn build >= 22000: Windows 11 unknown * 10.0: Windows 10 unknown * Everything else: Windows unknown release
Modernize type hints: * typing.Optional: type | None * typin.Dict: just use 'dict'
…own' test. Re nvaccess#15992. To test 'Windows 11 unknown' release name, use 10.0.25398 (Windows 11 Zinc/Server 23H2 (annual container release)) which is unkonwn to NVDA.
Minimum Windows version = 8.1, emoji panel introduced = Windows 10 Fall Creators Update (1709), done to avoid use of deprecated attributes.
See test results for failed build of commit 2efa7d0c09 |
CyrilleB79
reviewed
Jan 1, 2024
| return "Windows 8.1" | ||
| elif self.major == 10: | ||
| # From Version 1511 (build 10586), release Id/display version comes from Windows Registry. | ||
| match (self.major, self.minor): |
Contributor
There was a problem hiding this comment.
Nice to see this new structural pattern, and I agree with its use.
However, I remind here that the computation of the complexity of a function does not take it into account unfortunately with our tools; it becomes always more urgent to move to a new linting tool (or version) if we want to continue to check complexity correctly.
seanbudd
approved these changes
Jan 2, 2024
Nael-Sayegh
pushed a commit
to Nael-Sayegh/nvda
that referenced
this pull request
Feb 15, 2024
…d above 10.0.22000 is seen when instantiating (nvaccess#15993) Closes nvaccess#15992 Summary of the issue: When an unknown build above 10.0.22000 is instantiated, winVersion.WinVersion says "Windows 10 unknown". Description of user facing changes None Description of development approach Using structural pattern matching, say "Windows 11 unknown" if major == 10, minor == 0, build >= 22000 and the build is not recorded in builds to release names private map. This PR also includes modernized type hints and a unit test for this issue.
SaschaCowley
pushed a commit
to SaschaCowley/nvda
that referenced
this pull request
Feb 27, 2024
…d above 10.0.22000 is seen when instantiating (nvaccess#15993) Closes nvaccess#15992 Summary of the issue: When an unknown build above 10.0.22000 is instantiated, winVersion.WinVersion says "Windows 10 unknown". Description of user facing changes None Description of development approach Using structural pattern matching, say "Windows 11 unknown" if major == 10, minor == 0, build >= 22000 and the build is not recorded in builds to release names private map. This PR also includes modernized type hints and a unit test for this issue.
Adriani90
pushed a commit
to Adriani90/nvda
that referenced
this pull request
Mar 13, 2024
…d above 10.0.22000 is seen when instantiating (nvaccess#15993) Closes nvaccess#15992 Summary of the issue: When an unknown build above 10.0.22000 is instantiated, winVersion.WinVersion says "Windows 10 unknown". Description of user facing changes None Description of development approach Using structural pattern matching, say "Windows 11 unknown" if major == 10, minor == 0, build >= 22000 and the build is not recorded in builds to release names private map. This PR also includes modernized type hints and a unit test for this issue.
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.
Link to issue number:
Closes #15992
Summary of the issue:
When an unknown build above 10.0.22000 is instantiated, winVersion.WinVersion says "Windows 10 unknown".
Description of user facing changes
None
Description of development approach
Using structural pattern matching, say "Windows 11 unknown" if major == 10, minor == 0, build >= 22000 and the build is not recorded in builds to release names private map. This PR also includes modernized type hints and a unit test for this issue.
Testing strategy:
Manual and unit tests:
Known issues with pull request:
None
Code Review Checklist:
Note:
Changelog for this PR is listed under "changes for developers" section.
Thanks.