Skip to content

Commit 52ca2b6

Browse files
committed
MAINT: extend comment
1 parent 5428c12 commit 52ca2b6

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

tests/test_tags.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,22 @@
2929

3030

3131
def 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

0 commit comments

Comments
 (0)