Skip to content

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

Merged
zooba merged 1 commit into
python:3.9from
miss-islington:backport-2a3f489-3.9
Apr 23, 2021
Merged

[3.9] bpo-43284: Update platform.win32_ver to use _syscmd_ver instead of sys.getwindowsversion() (GH-25500)#25523
zooba merged 1 commit into
python:3.9from
miss-islington:backport-2a3f489-3.9

Conversation

@miss-islington

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

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

@miss-islington

Copy link
Copy Markdown
Contributor Author

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

1 similar comment
@miss-islington

Copy link
Copy Markdown
Contributor Author

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

@miss-islington

Copy link
Copy Markdown
Contributor Author

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

@zooba

zooba commented Apr 23, 2021

Copy link
Copy Markdown
Member

tkinter tests on Linux are not affected by this - guessing it's flakey.

@zooba zooba merged commit 52e9031 into python:3.9 Apr 23, 2021
@miss-islington miss-islington deleted the backport-2a3f489-3.9 branch April 23, 2021 18:09
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