Skip to content

Mark extensions as free-threading-compatible and build wheels #233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
- "3.11"
- "3.12"
- "3.13"
- "3.13t"
- "pypy-3.9"
- "pypy-3.10"
os: ["ubuntu-latest"]
Expand Down Expand Up @@ -215,6 +216,7 @@ jobs:
run: cibuildwheel --output-dir dist
env:
CIBW_SKIP: "*-win32 *-manylinux_i686 cp38-macosx_*arm64 cp39-macosx_*arm64" # Skip 32 bit and problematic mac builds.
CIBW_ENABLE: "cpython-freethreading"
CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs_linux }}
CIBW_BEFORE_ALL_LINUX: ${{ matrix.cibw_before_all_linux }}
# Fully test the build wheels again.
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ version 1.8.0-dev
+ Include test packages in the source distribution, so source distribution
installations can be verified.
+ Fix an issue where some tests failed because they ignored PYTHONPATH.
+ Enable support for free-threading and build free-threaded wheels for
CPython 3.13.

version 1.7.2
-----------------
Expand Down
5 changes: 5 additions & 0 deletions src/isal/_isalmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ PyInit__isal(void)
if (m == NULL) {
return NULL;
}

#ifdef Py_GIL_DISABLED
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
#endif

PyModule_AddIntMacro(m, ISAL_MAJOR_VERSION);
PyModule_AddIntMacro(m, ISAL_MINOR_VERSION);
PyModule_AddIntMacro(m, ISAL_PATCH_VERSION);
Expand Down
5 changes: 5 additions & 0 deletions src/isal/igzip_libmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,11 @@ PyInit_igzip_lib(void)
if (m == NULL)
return NULL;

#ifdef Py_GIL_DISABLED
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
#endif


IsalError = PyErr_NewException("igzip_lib.IsalError", NULL, NULL);
if (IsalError == NULL) {
return NULL;
Expand Down
4 changes: 4 additions & 0 deletions src/isal/isal_zlibmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2183,6 +2183,10 @@ PyInit_isal_zlib(void)
return NULL;
}

#ifdef Py_GIL_DISABLED
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
#endif

PyObject *igzip_lib_module = PyImport_ImportModule("isal.igzip_lib");
if (igzip_lib_module == NULL) {
return NULL;
Expand Down
Loading