File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929
3030
3131def get_abi3_suffix ():
32- # EXTENSION_SUFFIXES are ordered in preference order, and more specific ABI is preferred.
33- # On free-threaded 3.15+, this will match ".abi3t" as the only supported stable ABI.
34- # On GIL-enabled 3.15+, it will match plain ".abi3" first, since that ABI is more specific.
32+ """Get the filename suffix identifying stable ABI extension modules."""
33+
34+ # EXTENSION_SUFFIXES is ordered from the more to the less specific ABI.
35+ # On Python 3.15 or later, this resolves to ``.abi3t-${arch}`` for
36+ # free-threaded builds and to ``.abi3-${arch}`` on regular builds.
37+ #
38+ # Older Python versions do not support a stable ABI for free-threaded
39+ # builds, and do not support a platform-specific filename suffix, and
40+ # this resolves to simply ``.abi3``.
41+ #
42+ # On Windows, Python does not use a dedicated filename suffix for stable
43+ # ABI extension modules, and this resolves to ``.pyd``.
3544 for suffix in importlib .machinery .EXTENSION_SUFFIXES :
36- if '.abi3' in suffix : # Unix
45+ if suffix . startswith ( '.abi3' ):
3746 return suffix
38- elif suffix == '.pyd' : # Windows
47+ if suffix == '.pyd' :
3948 return suffix
4049
4150
You can’t perform that action at this time.
0 commit comments