gh-146636: PEP 803: add Py_TARGET_ABI3T and .abi3t.so extension (GH-146637)

- Add Py_TARGET_ABI3T macro.
- Add ".abi3t.so" to importlib EXTENSION_SUFFIXES.
- Remove ".abi3.so" from importlib EXTENSION_SUFFIXES on Free Threading.
- Adjust tests

This is part of the implementation for PEP-803.
Detailed documentation to come later.

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
This commit is contained in:
Petr Viktorin 2026-04-01 16:14:59 +02:00 committed by GitHub
parent 08c5d3d423
commit 2452324001
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 69 additions and 21 deletions

View file

@ -44,7 +44,10 @@ const char *_PyImport_DynLoadFiletab[] = {
#ifdef ALT_SOABI
"." ALT_SOABI ".so",
#endif
#ifndef Py_GIL_DISABLED
".abi" PYTHON_ABI_STRING ".so",
#endif /* Py_GIL_DISABLED */
".abi" PYTHON_ABI_STRING "t.so",
".so",
#endif /* __CYGWIN__ */
NULL,