Skip to content

gh-157763: Fix ctypes.util.test() on Windows - #157770

Closed
lazerg wants to merge 1 commit into
python:mainfrom
lazerg:fix-issue-157763
Closed

lazerg wants to merge 1 commit into
python:mainfrom
lazerg:fix-issue-157763

Conversation

@lazerg

@lazerg lazerg commented Sep 18, 2026

Copy link
Copy Markdown

The Windows branch of ctypes.util.test() calls cdll.load("msvcrt"), but LibraryLoader has no load method, so the call ends up in __getattr__ and raises AttributeError: load.

Use LoadLibrary, which is what every other branch of the same function already does.

@ZeroIntensity ZeroIntensity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This function is untested, hardly used, and doesn't seem particularly useful to anyone. I think we should just soft-deprecate it rather than take on maintenance.

@bedevere-app

bedevere-app Bot commented Sep 18, 2026

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@lazerg

lazerg commented Sep 19, 2026

Copy link
Copy Markdown
Author

Closing in favor of #157776. Removing the function is better than fixing the call in it.

@lazerg lazerg closed this Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants