Skip to content

Docs: Clarify that ctypes.pythonapi *may* be None under a statically linked interpreter - #158624

Merged
ZeroIntensity merged 1 commit into
python:mainfrom
ZeroIntensity:ctypes/adjust-statically-linked-docs
Oct 4, 2026
Merged

ZeroIntensity merged 1 commit into
python:mainfrom
ZeroIntensity:ctypes/adjust-statically-linked-docs

Conversation

@ZeroIntensity

Copy link
Copy Markdown
Member

@ZeroIntensity

Copy link
Copy Markdown
Member Author

I'll have to manually cherry-pick this into #158307 for 3.15.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34906805 | 📁 Comparing 85e5b8e against main (20d5e67)

  🔍 Preview build  

1 file changed
± library/ctypes.html

Comment thread Doc/library/ctypes.rst
``None``, as ``dlopen`` is not possible in this case.
.. note::

If the Python interpreter is statically linked, this may be ``None``.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is fine but if you'd like you could say that in practice musl will return None but glibc won't.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think it's fine to leave it as-is. There are probably other cases we don't know about, so mentioning musl/glibc might be misleading.

@ZeroIntensity
ZeroIntensity merged commit a7b5fc5 into python:main Oct 4, 2026
47 checks passed
@ZeroIntensity
ZeroIntensity deleted the ctypes/adjust-statically-linked-docs branch October 4, 2026 21:09
@miss-islington-app

Copy link
Copy Markdown

Thanks @ZeroIntensity for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Oct 4, 2026

Copy link
Copy Markdown

GH-158807 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 4, 2026
ZeroIntensity added a commit to miss-islington/cpython that referenced this pull request Oct 4, 2026
ZeroIntensity added a commit that referenced this pull request Oct 4, 2026
…statically linked interpreter (GH-158624) (GH-158807)

(cherry picked from commit a7b5fc5)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants