8000 bpo-40459: Fix NameError in platform.py by sweeneyde · Pull Request #19855 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-40459: Fix NameError in platform.py #19855

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 8 commits into from
May 5, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Better NEWS entry
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
  • Loading branch information
sweeneyde and corona10 authored May 3, 2020
commit 29143c0ada5e89646bd3bbe87815c0639bf177ce
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Fix undefined HKEY_LOCAL_MACHINE name in platform.py
Fix :exc:`NameError` caused from :func:`platform.win32_ver`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The NEWS entry doesn't really explain the behavior change for users.

It seems like previously, ptype was always an empty string. ptype is now filled with the value of the "SOFTWARE\Microsoft\Windows NT\CurrentVersion" registry entry.

Can someone test on Windows to see how this string look like? I'm curious :-)

The documentation says:

As a hint: ptype is 'Uniprocessor Free' on single processor NT machines and 'Multiprocessor Free' on multi processor machines. The ‘Free’ refers to the OS version being free of debugging code. It could also state ‘Checked’ which means the OS version uses debugging code, i.e. code that checks arguments, ranges, etc.

https://docs.python.org/dev/library/platform.html#platform.win32_ver

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain that this change fix the ptype part of :func:platform.win32_ver result.

0