Thanks for your notes, @mgorny!
- Sounds good. We’ll take the discussion about that feature in Add `sys.abi_features` to make information about the interpreter ABI more accessible and Add `sys.abi_features` to make information about the interpreter ABI more accessible · Issue #133143 · python/cpython · GitHub.
- The intended reference implementation determines the bitness by looking at the
PY_SSIZE_T_MAX
constant, though it was suggested to useSIZEOF_VOID_P
instead. Either way, you get the idea: we try to understand what is the pointer width. This is useful to know for example on Windows, where Scipy is not available for the widely used 32-bit variant due to lack of a suitable Fortran compiler toolchain. - You are right that strictly speaking at the moment not both are needed. It comes down to better expressiveness (are you interested in a feature that should generally work, except for one of the two something goes wrong? or are you rather explicitly targeting one of the two?) and possible future extensions with a third option (e.g.
sub-interpreters
).