Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-133143: Make information about the interpreter ABI more accessible#137476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
encukou left a comment
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.
This is a big PR!
I'll ask you to simplify (and, alas, throw a lot of the scaffolding work away...)
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
zklaus commentedAug 7, 2025
Thanks for your review,@encukou! I think I have addressed all of your comments and, as you anticipated, it simplifies things a great deal. Would you mind taking another look? |
encukou commentedAug 7, 2025
Looks good now, thanks! And, of course, it needs deciding on what should go here; but that's for the discussion thread. |
zklaus commentedAug 7, 2025
Agreed about the tests and further discussion. I just wanted to stabilize the implementation sufficiently to be sure to write meaningful tests. Thanks again! |
zklaus commentedAug 12, 2025
Tests are in place and easily extendable. Let's focus onthe discussion and get this in 💪. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
vstinner left a comment
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.
Can you also mention the new sys.abi_info in Doc/whatsnew/3.15.rst document? You should add a new "sys" section inhttps://docs.python.org/dev/whatsnew/3.15.html#improved-modules
Uh oh!
There was an error while loading.Please reload this page.
vstinner left a comment
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.
LGTM
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
zklaus commentedSep 4, 2025
With the latest addition of comments on the Windows side of things, I think I addressed all comments.@AA-Turner apologies again for the rebase snafu. I hope a review is still doable. |
bedevere-bot commentedSep 5, 2025
🤖 New build scheduled with the buildbot fleet by@encukou for commited7b6d9 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F137476%2Fmerge If you want to schedule another build, you need to add the🔨 test-with-buildbots label again. |
zklaus commentedSep 8, 2025
encukou commentedSep 8, 2025
Could you add semantic Sphinx syntax for With that, I consider this good to merge :) |
sys.abi_info: Use Sphinx markup for attributes
zklaus commentedSep 8, 2025
Done, thanks! |
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
AA-Turner commentedSep 8, 2025
oops, I meant to push to my own branch to propose a PR to@zklaus's repo, sorry. Given Petr has enabled auto-merge already I'll propose my changes in a follow-up. Separately, should we use a named type for ❯ .\python.bat>>>import sys>>> sys.abi_infonamespace(pointer_bits=64, free_threaded=False, debug=True, byteorder='little')A |
1acb718 intopython:mainUh oh!
There was an error while loading.Please reload this page.
vstinner commentedSep 8, 2025
I don't think that using namespace is a big deal here. |
vstinner commentedSep 8, 2025
Congrats@zklaus, your PR was merged :-) |
encukou commentedSep 8, 2025
|
AA-Turner commentedSep 8, 2025
I realised that one drawback of using A |
encukou commentedSep 8, 2025
No need. This is Python; consenting adults; you break it you get to keep the pieces; etc. You can already set |
| The available entries are the same on all platforms; | ||
| e.g. *pointer_size* is available even on 64-bit-only architectures. |
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.
e.g. would have been better spelled out asfor example
This makes information about the interpreter ABI more accessible.Co-authored-by: Petr Viktorin <encukou@gmail.com>Co-authored-by: Victor Stinner <vstinner@python.org>Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Uh oh!
There was an error while loading.Please reload this page.
This adds a new
sys.abi_infoobject to make basic abi information more readily accessible.The basic idea is to have not just flags as originally envisioned in#133143, but rather a more pythonic object with the required information, following the model of the
sys.thread_infoandsys.int_infoobject as suggested inthe discussion by@encukou.gh-133143
📚 Documentation preview 📚:https://cpython-previews--137476.org.readthedocs.build/