[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-23 Thread Steve Dower
Steve Dower added the comment: New changeset 52e9031fbd23c10668badc2a72ee5c203d6902c7 by Miss Islington (bot) in branch '3.9': bpo-43284: Update platform.win32_ver to use _syscmd_ver instead of sys.getwindowsversion() (GH-25500)

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-23 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: @steve.dower Would you mind merging the backport of the PR to the 3.9 branch manually? Apparently there seems to a test failure. I'm not sure why. But it reports that test has been failing recently. -- ___

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-22 Thread miss-islington
miss-islington added the comment: New changeset ef63328b46fe7402794cde51008a47e79f37b153 by Miss Islington (bot) in branch '3.8': bpo-43284: Update platform.win32_ver to use _syscmd_ver instead of sys.getwindowsversion() (GH-25500)

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-22 Thread Steve Dower
Steve Dower added the comment: Thanks for doing the patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +24244 pull_request: https://github.com/python/cpython/pull/25524 ___ Python tracker ___

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-22 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +24243 pull_request: https://github.com/python/cpython/pull/25523 ___ Python tracker

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-22 Thread Steve Dower
Steve Dower added the comment: New changeset 2a3f4899c63806439e5bcea0c30f7e6a6295a763 by Shreyan Avigyan in branch 'master': bpo-43284: Update platform.win32_ver to use _syscmd_ver instead of sys.getwindowsversion() (GH-25500)

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-21 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: PR opened against master branch. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-21 Thread Shreyan Avigyan
Change by Shreyan Avigyan : -- keywords: +patch pull_requests: +24220 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25500 ___ Python tracker

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-20 Thread Steve Dower
Steve Dower added the comment: Opening a PR against the master branch would be ideal. (Make sure you forked from that branch too, or you may see lots of irrelevant changes, which will make it impossible to review.) -- ___ Python tracker

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-20 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: I have a patch for this issue. Should I attach it or should I directly open a PR? -- ___ Python tracker ___

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-20 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: For Windows 10.0.17134 (1803) or above why don't we use the format "maj.min.build.ubr" in platform._norm_version (the function that post-processes the version string and then returns the version string in the format "maj.min.build")? --

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-20 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: I would like to help to write the fix for this issue. -- ___ Python tracker ___ ___

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-19 Thread Steve Dower
Steve Dower added the comment: > In that case, would you want to deprecate > sys.getwindowsversion().platform_version? Yeah, but I'm not so concerned about raising a warning on use. Just in the docs will be fine. We should also add a mention that it is extracting the value from efficient

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-19 Thread Eryk Sun
Eryk Sun added the comment: > If we're going to launch cmd.exe, I'd prefer to only do that in the > platform module and not the sys function. Nothing in sys should > start a subprocess (if we can at all avoid it). In that case, would you want to deprecate

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-19 Thread Steve Dower
Steve Dower added the comment: Python is a volunteer built project, so someone will need to volunteer to write the fix. Until there is a volunteer, there is no plan. (One of the core devs might volunteer, but there's no guarantee of that.) If we're going to launch cmd.exe, I'd prefer to

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-19 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Ok. So are you planning to implement this fix? -- ___ Python tracker ___ ___ Python-bugs-list

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-19 Thread Eryk Sun
Eryk Sun added the comment: > But isn't calling CMD's VER command risky? A process can overwrite its > PEB OSMajorVersion, OSMinorVersion, and OSBuildNumber. As long as VER is executed without quotes, the shell will not search for an external command. CMD is not going to intentionally

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-19 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: But isn't calling CMD's VER command risky? A process can overwrite its PEB OSMajorVersion, OSMinorVersion, and OSBuildNumber. If the cmd has been set to compatibility mode somehow then the same problem will occur since it will then overwrite its PEB

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-18 Thread Eryk Sun
Eryk Sun added the comment: > But kernel32.dll (since it's of a different version) isn't > accurate at all right? To clarify, CMD's VER command calls GetVersion(). It has nothing to do with the file version of any system DLL. Because CMD is a system component, the GetVersion() call

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-18 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: But kernel32.dll (since it's of a different version) isn't accurate at all right? To find the accurate result we have to use the CurrentBuildNumber registry key. I think this key will not be removed so easily by Microsoft. This key have been in existence

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-18 Thread Eryk Sun
Eryk Sun added the comment: The "CurrentBuild" and "CurrentVersion" values go back to the first release of Windows NT 3.1 in 1993 (build 511, which was quickly replaced by build 528). In NT 3.1 (build 528), the "CurrentBuild" value was "1.528.1 () (July 1993)". In NT 3.5, this awkward

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-18 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: I researched a little more and found that before Vista the winver command used the CurrentBuildNumber key instead of CurrentBuild key. In fact before Vista CurrentBuild was marked as obsolete by Microsoft. But that changed in Vista, when Microsoft started

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-18 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: @eryksun described "Apparently the developers do not want to guarantee that the version information on any particular system DLL can be used to get the system version. Apparently they also do not want to officially sanction using the

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-16 Thread Eryk Sun
Eryk Sun added the comment: > shouldn't the documentation provide the information that > sys.getwindowsversion().platform_version returns the > kernel32.dll version? platform_version is documented as an "accurate major version, minor version and build number of the current operating

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-16 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: When we're talking about version are we talking about the kernel32.dll version or the Windows version? If we're talking about Windows version then why not use the return value of sys.getwindowsversion() itself? How is that function getting the Windows

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-16 Thread Shreyan Avigyan
Change by Shreyan Avigyan : -- nosy: +shreyanavigyan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-16 Thread Eryk Sun
Change by Eryk Sun : -- stage: -> needs patch title: Inability to fetch build 20H2 -> sys.getwindowsversion().platform_version is incorrect versions: +Python 3.10 ___ Python tracker