cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-135944: Add a "Runtime Components" Section to the Execution Model Docs

Open ericsnowcurrently opened this issue 6 months ago • 2 comments

The section provides a brief overview of the Python runtime's execution environment.

This is meant to be implementation agnostic, If that doesn't hold true then we should take a different approach.

  • Issue: gh-135944

📚 Documentation preview 📚: https://cpython-previews--135945.org.readthedocs.build/

ericsnowcurrently avatar Jun 25 '25 15:06 ericsnowcurrently

FWIW, I'm going to open a DPO thread about this addition before merging, to make sure there's sufficient visibility.

ericsnowcurrently avatar Jun 27 '25 17:06 ericsnowcurrently

https://discuss.python.org/t/96922

ericsnowcurrently avatar Jun 27 '25 20:06 ericsnowcurrently

@gpshead, I've updated the PR to address your comments at https://discuss.python.org/t/proposal-add-text-to-the-language-reference-about-runtime-components/96922/2, Thanks!

ericsnowcurrently avatar Jun 30 '25 22:06 ericsnowcurrently

Thanks @ericsnowcurrently for giving this so much thought. All good by me. Ping me if I ought to signify this myself by resolving each.

jeff5 avatar Jul 01 '25 19:07 jeff5

FYI, given the nice break I had from this change, I came back to with fresh eyes and found ways I think it could be more clear.

ericsnowcurrently avatar Sep 25 '25 23:09 ericsnowcurrently

@ncoghlan, do you have any thoughts about this new section?

FWIW, my intent is to keep the section implementation-agnostic, even if some of the terminology comes from CPython. The described concepts are meant to be conceptual, even if they correspond closely to concrete implementation details.

ericsnowcurrently avatar Sep 29 '25 16:09 ericsnowcurrently

I have toyed with the idea of specifying what it means to "call into Python", but that can be addressed separately, if at all.

ericsnowcurrently avatar Sep 29 '25 16:09 ericsnowcurrently

I have toyed with the idea of specifying what it means to "call into Python", but that can be addressed separately, if at all.

If you tried to cover all the subtleties, I think you'd end up with something three times as long that was actually worse for the primary topic you're aiming to address (giving folks that aren't already familiar with the way threads and processes work in general the gist of how they work for Python in particular).

ncoghlan avatar Sep 30 '25 13:09 ncoghlan

This is really helpful to my understanding, especially of the possible multiplicity (or not) of relationships amongst the separate concepts. It's hard to express this kind of thing accurately and independent of a particular implementation, but I think you have. Thanks for the hard work.

jeff5 avatar Oct 02 '25 07:10 jeff5

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

miss-islington-app[bot] avatar Oct 02 '25 15:10 miss-islington-app[bot]

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

bedevere-app[bot] avatar Oct 02 '25 15:10 bedevere-app[bot]

GH-139510 is a backport of this pull request to the 3.13 branch.

bedevere-app[bot] avatar Oct 02 '25 15:10 bedevere-app[bot]