GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-154199: Soft-deprecate `ctypes.util.find_msvcrt` by ZeroIntensity · Pull Request #154553 · python/cpython

Conversation

@ZeroIntensity

@ZeroIntensity ZeroIntensity commented Jul 23, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: ctypes.util.find_msvcrt() returns "msvcrt.dll" on clang-cl Windows builds, breaking ctypes.get_errno() #154199

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ZeroIntensity added 2 commits July 23, 2026 13:07
@ZeroIntensity
Soft-deprecate ctypes.util.find_msvcrt
3a1e11c
@ZeroIntensity
Add blurb.
6764e1c
@ZeroIntensity
ZeroIntensity requested a review from encukou July 23, 2026 17:10
@ZeroIntensity ZeroIntensity added the topic-ctypes label Jul 23, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Jul 23, 2026
ctypes.util.find_msvcrt() returns "msvcrt.dll" on clang-cl Windows builds, breaking ctypes.get_errno() #154199
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Jul 23, 2026
@read-the-docs-community

read-the-docs-community Bot commented Jul 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33732836 | 📁 Comparing b04411d against main (2b4e062)

  🔍 Preview build  

2 files changed
± library/ctypes.html
± whatsnew/changelog.html
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chris-eibl
chris-eibl reviewed Jul 23, 2026
View reviewed changes
Comment thread Lib/ctypes/util.py
if '_d.pyd' in importlib.machinery.EXTENSION_SUFFIXES:
clibname += 'd'
return clibname+'.dll'
"""Return the name of the VC runtime dll.

@chris-eibl chris-eibl Jul 23, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This renders _get_build_version unused. Can it be removed?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ZeroIntensity reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@encukou encukou Jul 27, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@ZeroIntensity, as you'll be doing this more often: consider doing deprecation periods for underscored API as well, if there's no harm in keeping things around for a few more years.
Most of the module predates clear docs on what the underscore means, so existing code might use such functions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ZeroIntensity ZeroIntensity Jul 27, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Ah, right, thanks for the reminder. I think this one is okay because I couldn't find any uses of it after a quick code search.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@encukou encukou Jul 28, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Yeah, this is more of a general reminder of what to keep in mind.
As for code searches, be careful -- this stuff also predates GitHub's hegemony.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chris-eibl and ZeroIntensity reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@chris-eibl

chris-eibl commented Jul 23, 2026

Copy link
Copy Markdown
Member

This supersedes #154209 which can now be closed?

ZeroIntensity reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ZeroIntensity ZeroIntensity mentioned this pull request Jul 23, 2026
gh-154199: Fix find_msvcrt() on builds with a truncated sys.version #154209
Closed
@ZeroIntensity
Remove _get_build_version
b04411d
chris-eibl
chris-eibl approved these changes Jul 25, 2026
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Jul 25, 2026
@ZeroIntensity
ZeroIntensity merged commit ada9da9 into python:main Jul 25, 2026
95 of 97 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ZeroIntensity
ZeroIntensity deleted the ctypes/no-more-find-msvcrt branch July 25, 2026 14:08
@bedevere-app bedevere-app Bot removed the awaiting merge label Jul 25, 2026
mbeijen pushed a commit to mbeijen/cpython that referenced this pull request Aug 14, 2026
@ZeroIntensity @mbeijen
pythongh-154199: Soft-deprecate ctypes.util.find_msvcrt (pythonGH-1…
854811a
…54553)
@chris-eibl chris-eibl mentioned this pull request Oct 8, 2026
gh-158948: Generate Modules/getbuildinfo.h #158951
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chris-eibl chris-eibl chris-eibl approved these changes
@encukou encukou Awaiting requested review from encukou

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

topic-ctypes

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@ZeroIntensity @chris-eibl @encukou
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 01402503 — 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.