Repository navigation
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.
gh-154199: Fix find_msvcrt() on builds with a truncated sys.version #154209
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
Uh oh!
There was an error while loading. Please reload this page.
gh-154199: Fix find_msvcrt() on builds with a truncated sys.version #154209
Changes from all commits
eb69633File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Python/getversion.c formats the compiler identification with \\%.80s\\, so the long banner emitted by clang-cl builds is cut off before the \\MSC v.\\ marker that _get_build_version() looks for. It then fell back to \\ eturn 6\\, i.e. 'assume MSVC 6', and find_msvcrt() handed out msvcrt.dll -- a CRT that does not share its errno with the ucrt that _ctypes is linked against, so ctypes.get_errno() silently returned stale values. Report the build version as unknown instead, so find_msvcrt() and find_library('c') return None exactly as they do on modern MSVC builds. Also handle a second truncation case found while fixing this one: when the cut lands inside the version number itself the marker is present but the digits are not, and the unpacking assignment raised ValueError out of find_library('c').Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.