Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-145410: Fix sysconfig.get_platform() on Windows when sys.version is truncated#145635

Open
04cb wants to merge 1 commit intopython:mainfrom
04cb:fix/sysconfig-platform-truncation
Open

gh-145410: Fix sysconfig.get_platform() on Windows when sys.version is truncated#145635
04cb wants to merge 1 commit intopython:mainfrom
04cb:fix/sysconfig-platform-truncation

Conversation

@04cb
Copy link

@04cb04cb commentedMar 8, 2026
edited by bedevere-appbot
Loading

Fixes#145410

The function was checking for 'amd64' in sys.version to detect 64-bit
Windows, but sys.version is truncated at a fixed width and may not
contain the architecture marker when the compiler version string is long.

Use platform.machine() instead, which reliably returns the machine
architecture on Windows regardless of the sys.version content.

The function was checking for 'amd64' in sys.version to detect 64-bitWindows, but sys.version is truncated at a fixed width and may notcontain the architecture marker when the compiler version string is long.Use platform.machine() instead, which reliably returns the machinearchitecture on Windows regardless of the sys.version content.Fixespython#145410
@04cb04cb requested a review fromFFY00 as acode ownerMarch 8, 2026 06:36
@bedevere-app
Copy link

Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply theskip news label instead.

@python-cla-bot
Copy link

python-cla-botbot commentedMar 8, 2026
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

@StanFromIrelandStanFromIreland changed the titleFix sysconfig.get_platform() on Windows when sys.version is truncatedgh-145410: Fix sysconfig.get_platform() on Windows when sys.version is truncatedMar 8, 2026
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@FFY00FFY00Awaiting requested review from FFY00FFY00 is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

sysconfig.get_platform() could return wrong value because sys.version is truncated

1 participant

@04cb

[8]ページ先頭

©2009-2026 Movatter.jp