Skip to content

[3.8] bpo-43284: Update platform.win32_ver to use _syscmd_ver instead of sys.getwindowsversion() (GH-25500) #25524

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 1 commit into from
Apr 22, 2021

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Apr 22, 2021

The sys module uses the kernel32.dll version number, which can vary from the "actual" Windows version.
Since the best option for getting the version is WMI (which is expensive), we switch back to launching cmd.exe (which is also expensive, but a lot less code on our part).
sys.getwindowsversion() is not updated to avoid launching executables from that module.
(cherry picked from commit 2a3f489)

Co-authored-by: Shreyan Avigyan [email protected]

https://bugs.python.org/issue43284

…s.getwindowsversion() (pythonGH-25500)

The sys module uses the kernel32.dll version number, which can vary from the "actual" Windows version.
Since the best option for getting the version is WMI (which is expensive), we switch back to launching cmd.exe (which is also expensive, but a lot less code on our part).
sys.getwindowsversion() is not updated to avoid launching executables from that module.
(cherry picked from commit 2a3f489)

Co-authored-by: Shreyan Avigyan <[email protected]>
@miss-islington
Copy link
Contributor Author

@shreyanavigyan and @zooba: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@shreyanavigyan and @zooba: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit ef63328 into python:3.8 Apr 22, 2021
@miss-islington miss-islington deleted the backport-2a3f489-3.8 branch April 22, 2021 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants