Skip to content

Commit f918abd

Browse files
authored
Update test_wheel.WheelTestCase.test_abi for freethreading (#244)
1 parent 3230178 commit f918abd

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.github/workflows/package-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
os: [ubuntu-latest, macos-latest, windows-latest]
31-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-2.7', 'pypy-3.9']
31+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.13t', 'pypy-2.7', 'pypy-3.9', 'pypy-3.10', 'pypy-3.11']
3232
exclude:
3333
# macos-latest does not have Python 3.7
3434
- os: macos-latest

distlib/wheel.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ def _derive_abi():
7171
us = sysconfig.get_config_var('Py_UNICODE_SIZE')
7272
if us == 4 or (us is None and sys.maxunicode == 0x10FFFF):
7373
parts.append('u')
74+
if bool(sysconfig.get_config_var("Py_GIL_DISABLED")):
75+
parts.append('t')
7476
return ''.join(parts)
7577

7678
ABI = _derive_abi()

tests/test_wheel.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,8 @@ def test_abi(self):
719719
us = sysconfig.get_config_var('Py_UNICODE_SIZE')
720720
if us == 4 or (us is None and sys.maxunicode == 0x10FFFF):
721721
parts.append('u')
722+
if bool(sysconfig.get_config_var("Py_GIL_DISABLED")):
723+
parts.append('t')
722724
if vi < (3, 5):
723725
abi = ABI
724726
else:

0 commit comments

Comments
 (0)