WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
179344
[Win] The way to detect Windows 10 is wrong
https://bugs.webkit.org/show_bug.cgi?id=179344
Summary
[Win] The way to detect Windows 10 is wrong
Basuke Suzuki
Reported
2017-11-06 14:08:02 PST
It falls always 'future'.
Attachments
patch
(1.14 KB, patch)
2017-11-10 15:59 PST
,
Basuke Suzuki
no flags
Details
Formatted Diff
Diff
fix
(2.85 KB, patch)
2017-12-08 17:07 PST
,
Basuke Suzuki
no flags
Details
Formatted Diff
Diff
fix test
(6.60 KB, patch)
2017-12-08 20:58 PST
,
Basuke Suzuki
no flags
Details
Formatted Diff
Diff
add test and changelog
(7.75 KB, patch)
2017-12-08 21:10 PST
,
Basuke Suzuki
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Basuke Suzuki
Comment 1
2017-11-06 14:20:33 PST
> $ python2 > ActivePython 2.7.13.2716 (ActiveState Software Inc.) based on > Python 2.7.13 (default, Jun 26 2017, 14:28:43) [MSC v.1500 64 bit (AMD64)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import sys > >>> sys.getwindowsversion() > sys.getwindowsversion(major=6, minor=2, build=9200, platform=2, service_pack='')
Windows python2 doesn't return correct information :( (It should be major=10, minor=10, build=1xxxx). python3 returns correct information.
Fujii Hironori
Comment 2
2017-11-09 21:25:48 PST
This issue has been addressed in Python 2.
https://hg.python.org/cpython/rev/d8453733cc0c
We need to use platform.version() instead of sys.getwindowsversion().
> C:\>ver > > Microsoft Windows [Version 10.0.14393] > > C:\>python > ActivePython 2.7.13.2716 (ActiveState Software Inc.) based on > Python 2.7.13 (default, Jun 26 2017, 14:28:43) [MSC v.1500 64 bit (AMD64)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import sys > >>> sys.getwindowsversion() > sys.getwindowsversion(major=6, minor=2, build=9200, platform=2, service_pack='') > >>> import platform > >>> platform.version() > '10.0.14393' > >>>
Basuke Suzuki
Comment 3
2017-11-10 15:59:16 PST
Created
attachment 326646
[details]
patch
Basuke Suzuki
Comment 4
2017-11-10 16:00:45 PST
platform.release() seems more straightforward to me.
https://docs.python.org/2/library/platform.html?highlight=platform%20release#platform.release
WebKit Commit Bot
Comment 5
2017-11-10 18:35:56 PST
Comment on
attachment 326646
[details]
patch Clearing flags on attachment: 326646 Committed
r224720
: <
https://trac.webkit.org/changeset/224720
>
WebKit Commit Bot
Comment 6
2017-11-10 18:35:58 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7
2017-11-15 09:42:25 PST
<
rdar://problem/35562264
>
Basuke Suzuki
Comment 8
2017-12-08 16:45:30 PST
Windows 10 is not detected correctly again after Version standardize refactoring. The issue is getwindowsversion() doesn't return correct answer on Python2.7 on Windows. We should use win32_ver()[1] which is same result with `ver` command.
Basuke Suzuki
Comment 9
2017-12-08 17:07:30 PST
Created
attachment 328890
[details]
fix use win32_ver() instead of getwindowsversion()
Basuke Suzuki
Comment 10
2017-12-08 20:58:09 PST
Created
attachment 328900
[details]
fix test modify test
Basuke Suzuki
Comment 11
2017-12-08 21:10:23 PST
Created
attachment 328902
[details]
add test and changelog
WebKit Commit Bot
Comment 12
2017-12-08 23:39:50 PST
Comment on
attachment 328902
[details]
add test and changelog Clearing flags on attachment: 328902 Committed
r225722
: <
https://trac.webkit.org/changeset/225722
>
WebKit Commit Bot
Comment 13
2017-12-08 23:39:52 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug