Skip to content

[3.14] gh-104612: Document linking embedders for several Python versions (GH-162498) - #162761

Merged
itamaro merged 1 commit into
python:3.14from
itamaro:backport-cb9d78f-3.14
Nov 27, 2026
Merged

itamaro merged 1 commit into
python:3.14from
itamaro:backport-cb9d78f-3.14

Conversation

@itamaro

@itamaro itamaro commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Add a section to the embedding guide that explains, for Linux, that linking with pythonX.Y-config --ldflags --embed ties an application to one minor version even when it only uses the Limited API, and how a single binary can instead load libpython3.so at run time. Mention renaming the dependency with patchelf as a packaging workaround, and list the limitations of both approaches.

Related discussion: https://discuss.python.org/t/on-embedders-and-stable-abi/110197
(cherry picked from commit cb9d78f)

Manual backport; the automated one hit a conflict in Doc/c-api/stable.rst, which is organized differently on 3.14:

  • The cross-reference to the new section is added after the "this document talks about extensions" paragraph, which is plain text on 3.14 and a note on main.
  • The limited-api-caveats label, which the new section links to, does not exist on 3.14, so it is added above the "Limited API Caveats" heading.

Doc/extending/embedding.rst applied cleanly and is identical to main. The docs build on this branch with --fail-on-warning.

🤖 Generated with Claude Code

… versions (pythonGH-162498)

Add a section to the embedding guide that explains, for Linux, that linking with `pythonX.Y-config --ldflags --embed` ties an application to one minor version even when it only uses the Limited API, and how a single binary can instead load `libpython3.so` at run time. Mention renaming the dependency with `patchelf` as a packaging workaround, and list the limitations of both approaches.

Related discussion: https://discuss.python.org/t/on-embedders-and-stable-abi/110197

(cherry picked from commit cb9d78f)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@itamaro
itamaro merged commit 6c0c015 into python:3.14 Nov 27, 2026
65 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant