Skip to content

Commit b749782

Browse files
committed
Mark extensions as free-threading-compatible and build wheels
1 parent 993f529 commit b749782

File tree

5 files changed

+18
-0
lines changed

5 files changed

+18
-0
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
- "3.11"
6060
- "3.12"
6161
- "3.13"
62+
- "3.13t"
6263
- "pypy-3.9"
6364
- "pypy-3.10"
6465
os: ["ubuntu-latest"]
@@ -215,6 +216,7 @@ jobs:
215216
run: cibuildwheel --output-dir dist
216217
env:
217218
CIBW_SKIP: "*-win32 *-manylinux_i686 cp38-macosx_*arm64 cp39-macosx_*arm64" # Skip 32 bit and problematic mac builds.
219+
CIBW_ENABLE: "cpython-freethreading"
218220
CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs_linux }}
219221
CIBW_BEFORE_ALL_LINUX: ${{ matrix.cibw_before_all_linux }}
220222
# Fully test the build wheels again.

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ version 1.8.0-dev
1616
+ Include test packages in the source distribution, so source distribution
1717
installations can be verified.
1818
+ Fix an issue where some tests failed because they ignored PYTHONPATH.
19+
+ Enable support for free-threading and build free-threaded wheels for
20+
CPython 3.13.
1921

2022
version 1.7.2
2123
-----------------

src/isal/_isalmodule.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ PyInit__isal(void)
3131
if (m == NULL) {
3232
return NULL;
3333
}
34+
35+
#ifdef Py_GIL_DISABLED
36+
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
37+
#endif
38+
3439
PyModule_AddIntMacro(m, ISAL_MAJOR_VERSION);
3540
PyModule_AddIntMacro(m, ISAL_MINOR_VERSION);
3641
PyModule_AddIntMacro(m, ISAL_PATCH_VERSION);

src/isal/igzip_libmodule.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,11 @@ PyInit_igzip_lib(void)
617617
if (m == NULL)
618618
return NULL;
619619

620+
#ifdef Py_GIL_DISABLED
621+
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
622+
#endif
623+
624+
620625
IsalError = PyErr_NewException("igzip_lib.IsalError", NULL, NULL);
621626
if (IsalError == NULL) {
622627
return NULL;

src/isal/isal_zlibmodule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2183,6 +2183,10 @@ PyInit_isal_zlib(void)
21832183
return NULL;
21842184
}
21852185

2186+
#ifdef Py_GIL_DISABLED
2187+
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
2188+
#endif
2189+
21862190
PyObject *igzip_lib_module = PyImport_ImportModule("isal.igzip_lib");
21872191
if (igzip_lib_module == NULL) {
21882192
return NULL;

0 commit comments

Comments
 (0)