Repository navigation
Introduce winVersion.WinVersion class to record Windows version information, removing winVersion.isWin10 function #11909
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
120d7d4
WinVersion: update copyright header, add Bill Dengler as author
josephsl a00e1b4
WinVersion: introduce WinVersion class. Re #11837.
josephsl c3db97c
WinVersion: introduce winVersion.getWinVer function. Re #11837.
josephsl 56c8a1a
WinVersion: introduce winVersion.getWinVerFromVersionText function. R…
josephsl 298dd3a
Merge branch 'master' into WinVersionClass
josephsl e746b02
winVersion.WinVersion: add unit test cases. Re #11837.
josephsl 9194536
winVersion unittests: lint and additional test on operators (specific…
josephsl 7f60f80
winVersion: convert Windows 10 releases to build map into str:int dic…
josephsl 62f6273
winVersion.WinVersion: transfer isWin10 function to WinVersion class.…
josephsl 4826b54
winVersion.isWin10: deprecated, call winVersion.getWinVer().isWin10 i…
josephsl 52c8841
winVersion unittest: test winVersion.WinVersion.isWin10. Re #11837.
josephsl 3107312
winVersion unittest: lint
josephsl 3bd9ba2
winVersion unittest: fix spelling error in comment
josephsl c3d41f9
winVersion unittests/operator check: test with 'Windows 8' instead of…
josephsl 5ee0dec
Merge branch 'master' into WinVersionClass
josephsl a917764
winVersion: add module header/description.
josephsl e2bd2f0
winVersion: record Windows releases to WinVersion instance mappings. …
josephsl 45e33e9
winVersion.getWinVer: call sys.getwindowsversion function inside getW…
josephsl 989d741
winVersion: compare getWinVer with release constants when checking fo…
josephsl 5be0182
Replace winVersion.isWin10 function call with constant checks. Re #11…
josephsl ee93632
winVersion: remove isWin10 function and test suite for it. Re #11837.
josephsl 1149105
winVersion.WinVersion class: simplify class constructor. Re #11837.
josephsl b207ef5
winVersion: rename Windows 10 version map to 'release name to builds'…
josephsl a1dd33d
winVersion.WinVersion class: add two static methods to return WinVers…
josephsl 79db425
winVersion.WinVersion: add repr method. Re #11837.
josephsl e9d4a10
winVersion unit tests: test WinVersion.fromReleaseName functions.
josephsl 0d44de2
Remove winVersion.winVersion call. Re #11933.
josephsl ba3ef2f
Update check: transfer winVersion.winversionText construction routine…
josephsl b23e44d
winVersion.WinVersion: put version major.minor.build inside parentehs…
josephsl 187e8c7
Startup: report winVersion.getWinVer function output for Windows vers…
josephsl 8e681a8
winVersion: remove winVersion.winVersion/winVersionText. Re #11837.
josephsl 117b6b8
winVersion.WinVersion: say 'Windows 10 prerelease' for builds not inc…
josephsl b76ff33
winVersion.WinVersion: do not include product type string if not defi…
josephsl 4cbcbdf
Merge branch 'master' into WinVersionClass
josephsl b3102b2
Update copyright year
josephsl dd5a55a
winVersion/Windows release: shorten unknown Windows release error mes…
josephsl f2798a8
Merged master, temporarily use master version of NVDAObjects/IAccessi…
josephsl eb9820e
winVersion: general lint (E302, E305)
josephsl 6683cae
winVersion: remove unused winUser module import
josephsl 83f1da5
NVDAObjects/IAccessible/winConsole: restore getWinVer/WIN10_1607 afte…
josephsl 1996143
Merge branch 'master' into WinVersionClass
josephsl cea3d97
Modern keyboard: typo.
josephsl 4398293
WinVersion: remove 'canRunVc2010Builds' function as it is no longer u…
josephsl 2f40832
Modern keyboard: lint and update copyright header
josephsl 46256fa
Merge branch 'master' into WinVersionClass
josephsl 74a0e4a
Merge branch 'master' into WinVersionClass
josephsl 81a1046
Edge Sp[artan (classic Edge): pre-gap removal = build < 15048. Re #11795
josephsl 0888963
Modern keyboard/emoji panel: define variables to hold classi emoji pa…
josephsl e320820
WinVersion: remove fromReleaseName and fromVersionText static methods…
josephsl 55d6231
WinVersion tests: remove tests that relied on removed static methods,…
josephsl 66e1d5e
Merge branch 'master' into WinVersionClass
josephsl c3e7ae5
Merge branch 'master' into WinVersionClass
josephsl bcea799
Merge branch 'master' into WinVersionClass
josephsl abf4a04
Modern keyboard and unit tests: update copyright header
josephsl d9c2d52
Modern keyboard/emoji panel: use comparisons rather than builds list.
josephsl 6df58da
Unit tests: add comment on Flake8 F841.
josephsl 7a5073f
Update changes file for PR #11909
feerrenrut File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,25 +22,10 @@ def test_getWinVer(self): | |
| winVerPython[:3] | ||
| ) | ||
|
|
||
| def test_specificWinVer(self): | ||
| # Try detecting Windows 8.1 or later. | ||
| win81 = winVersion.WinVersion.fromReleaseName("8.1") | ||
| self.assertTupleEqual( | ||
| (win81.major, win81.minor, win81.build), | ||
| (6, 3, 9600) | ||
| ) | ||
|
|
||
| def test_getWinVerFromVersionText(self): | ||
| # Windows 10 1507 is in fact Windows 10 initial release. | ||
| winTenInitial = winVersion.WinVersion.fromVersionText("10.0.10240") | ||
| self.assertEqual( | ||
| winTenInitial, winVersion.WIN10_1507 | ||
| ) | ||
|
|
||
| def test_getWinVerFromNonexistentRelease(self): | ||
| def test_getWinVerFromNonExistentRelease(self): | ||
| # Test the fact that there is no Windows 10 2003 (2004 exists, however). | ||
| with self.assertRaises(ValueError): | ||
| winVersion.WinVersion.fromReleaseName("2003") | ||
| with self.assertRaises(AttributeError): | ||
| may2020Update = winVersion.WIN10_2003 # NOQA: F841 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a comment above this line to specify what F841 is. |
||
|
|
||
| def test_moreRecentWinVer(self): | ||
| # Specifically to test operators. | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may be misunderstanding (I'm not that familiar with the timeline of the emoji panel), but wouldn't this be more accurate as a comparison for a range of values eg
emojiPanelInitial <= winVersion.getWinVer() <= emojiPanelWindowOpenEvent. Or is it actually accurate that only for these two precise builds this alternative behavior was required.I think generally it would be safer to do these comparisons as ranges with limits where MS made / removed things.
I ask because there are other "release" builds between, but also in case there could have been (or even could still be) people running insider builds that may still benefit from this that don't exactly equal any of the reference build numbers listed in the constants. For instance running 17763: https://blogs.windows.com/windows-insider/2018/09/18/announcing-windows-10-insider-preview-build-17763/