Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

zklaus
Copy link

@zklaus zklaus commented Aug 6, 2025

This adds a new sys.abi_info object 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_info and sys.int_info object as suggested in the discussion by @encukou.


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

@bedevere-app
Copy link

bedevere-app bot commented Aug 6, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@zklaus zklaus force-pushed the add-sys.abi_info branch from d572a62 to 8890dc5 Compare August 6, 2025 16:58
Copy link
Member

@encukou encukou left a 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...)

@zklaus zklaus force-pushed the add-sys.abi_info branch from ab093fc to defb2b2 Compare August 7, 2025 13:09
@zklaus
Copy link
Author

zklaus commented Aug 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
Copy link
Member

encukou commented Aug 7, 2025

Looks good now, thanks!
It does need a test. (Ideally comparing things to sys.maxsize and sysconfig.get_config_var, which should also serve as guide/validation for what the packaging tools will need to do for earlier Python versions.)

And, of course, it needs deciding on what should go here; but that's for the discussion thread.

@zklaus
Copy link
Author

zklaus commented Aug 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
Copy link
Author

zklaus commented Aug 12, 2025

Tests are in place and easily extendable. Let's focus on the discussion and get this in 💪.

@zklaus zklaus marked this pull request as ready for review August 12, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants