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-88130: Document macOS library search limits for ctypes.CDLL by mesubash · Pull Request #161624 · python/cpython

Conversation

@mesubash

@mesubash mesubash commented Nov 8, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

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

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.

  • Issue: ctypes CDLL search path issue on MacOS #88130

Sorry, something went wrong.

Uh oh!

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

All reactions
@mesubash
pythongh-88130: Document macOS library search limits for ctypes.CDLL
01c97fb
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 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot added awaiting review docs Documentation in the Doc dir labels Nov 8, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Nov 8, 2026
ctypes CDLL search path issue on MacOS #88130
Open
Copilot AI reviewed Nov 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown

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.

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.

Sorry, something went wrong.

Uh oh!

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

All reactions
@github-project-automation github-project-automation Bot added this to Docs PRs Nov 8, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Nov 8, 2026
@read-the-docs-community

read-the-docs-community Bot commented Nov 8, 2026

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
All reactions

Sorry, something went wrong.

Uh oh!

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

@encukou encukou added the skip news label Nov 9, 2026
ZeroIntensity
ZeroIntensity requested changes Nov 11, 2026
View reviewed changes
Comment thread Misc/NEWS.d/next/Documentation/2026-11-08-16-26-47.gh-issue-88130.JVOGb1.rst

@ZeroIntensity ZeroIntensity Nov 11, 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.

Docs-only changes don't need changelog entries, so please remove this.

(This blurb section is badly named, sorry! It's meant for changes to the build script and such.)

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/library/ctypes.rst
Comment on lines +1587 to +1593
On macOS, a *name* that is not an absolute path may only be searched
for in system locations such as :file:`/usr/lib`. Libraries and
frameworks in folders like :file:`/usr/local/lib`, :file:`~/lib` or
:file:`~/Library/Frameworks` are then not found, so pass the full path.
Setting :envvar:`!DYLD_LIBRARY_PATH` or :envvar:`!DYLD_FRAMEWORK_PATH`
before starting Python adds search locations, but macOS ignores these
variables for some executables.

@ZeroIntensity ZeroIntensity Nov 11, 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.

I agree with Petr that we should be more explicit about the fact that ctypes.CDLL calls dlopen, and thus inherits any quirks from the system-level function. Once we've done that, I'm not sure it's necessary to document all the individual quirks of what a given OS does.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot removed the awaiting review label Nov 11, 2026
@bedevere-app

bedevere-app Bot commented Nov 11, 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.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot added the awaiting changes label Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@ZeroIntensity ZeroIntensity ZeroIntensity requested changes

Uh oh!

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

Assignees

No one assigned

Labels

awaiting changes docs Documentation in the Doc dir skip news

Projects

Docs PRs
Status: Todo

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.

4 participants

@mesubash @ZeroIntensity @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.