Skip to content
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

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

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 shreyan.avigyan@gmail.com

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 <shreyan.avigyan@gmail.com>
@miss-islington
Copy link
Contributor Author

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

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

zooba
zooba approved these changes Apr 22, 2021
@miss-islington
Copy link
Contributor Author

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

@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
14 checks passed
@miss-islington miss-islington deleted the backport-2a3f489-3.8 branch Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants