Skip to content

gh-88130: Document macOS library search limits for ctypes.CDLL - #161624

Open
mesubash wants to merge 1 commit into
python:mainfrom
mesubash:gh-88130-ctypes-macos-docs
Open

mesubash wants to merge 1 commit into
python:mainfrom
mesubash:gh-88130-ctypes-macos-docs

Conversation

@mesubash

@mesubash mesubash commented Nov 8, 2026 •

Copy link
Copy Markdown

On macOS, CDLL with a relative name may only search system locations such as /usr/lib, so libraries in /usr/local/lib, ~/lib or ~/Library/Frameworks are not found. This adds a short note under CDLL saying to pass the full path, and that DYLD_LIBRARY_PATH / DYLD_FRAMEWORK_PATH help only for some executables.

The test results behind each sentence are in my comment on the issue: #88130 (comment)

I left out find_library(). It found the library in every test, but the docs call it soft deprecated. Happy to add a mention if you think it belongs here.

Copilot AI balanced review requested due to automatic review settings November 8, 2026 16:29
@python-cla-bot

python-cla-bot Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app bedevere-app Bot added awaiting review docs Documentation in the Doc dir labels Nov 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35735913 | 📁 Comparing 01c97fb against main (7271803)

  🔍 Preview build  

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants