GeezerVison is showing github.com — gh-145410: Use _sysconfig.get_platform() in the platform module by vstinner · Pull Request #146148 · python/cpython
gh-145410: Use _sysconfig.get_platform() in the platform module
#146148
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.
The reason will be displayed to describe this comment to others. Learn more.
Until all support is entirely ripped out, it's still possible for someone to compile it. So we don't need it, but if someone out there needs it, we may as well leave it in until we're actively trying to prevent them doing their job (which, as a general rule, we don't do).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The reason will be displayed to describe this comment to others. Learn more.
This is the necessary condition for using _sysconfig.get_platform() - no change required, just pointing out why it's okay to assume that sys.executable is us.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
All reactions
# "file" command did not return anything; we'll try to provide
The reason will be displayed to describe this comment to others. Learn more.
We can't do this, because the current CPU can be different from the Python runtime. We have to query the OS specifically, we can't rely on compile-time.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
All reactions
# WOW64 processes mask the native architecture
try:
Expand All
@@ -811,6 +837,11 @@ def _get_machine_win32():
else:
if arch:
return arch
# Try to use the PROCESSOR_* environment variables
:mod:`platform`: On Windows, use the ``_sysconfig`` module to get the
architecture and the machine. Patch by Victor Stinner.
Loading
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.