From 3834e9ab15c1da0df59fa2cb74d3340e26c2a9f2 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Tue, 3 Nov 2026 19:38:58 +0100 Subject: [PATCH 1/4] Add extra pypy version, remove redundant sdist build --- .github/workflows/ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec279fb..b6edc07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,7 +61,7 @@ jobs: - "3.15" - "3.15t" - "pypy-3.11" - - "pypy-3.11" + - "pypy-3.12" os: ["ubuntu-latest"] include: - os: "macos-latest" # For m1 macos @@ -302,10 +302,6 @@ jobs: PYTHON_ZLIB_NG_BUILD_CACHE=True PYTHON_ZLIB_NG_BUILD_CACHE_FILE=${{ runner.temp }}/build_cache CFLAGS="-O3 -DNDEBUG" - - name: Build sdist - if: ${{runner.os == 'Linux' && matrix.cibw_archs_linux == 'x86_64'}} - run: - python -m build --sdist - uses: actions/upload-artifact@v7 with: name: "cibw-${{ runner.os }}-${{ runner.arch }}-${{ matrix.cibw_archs_linux }}" From dade485dce233c1d06623f84133e2e01032fe6fb Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Tue, 3 Nov 2026 19:43:16 +0100 Subject: [PATCH 2/4] Support newer python versions --- CHANGELOG.rst | 2 ++ pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0bf5722..94f1052 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,6 +9,8 @@ Changelog version 1.0.1-dev ----------------- ++ Python 3.10 and PyPy 3.10 are no longer supported. Added support for PyPy + 3.12 and Python 3.15. + Update included zlib-ng distribution to 2.3.3. + Fix BrokenPipeError when piping ``python -m isal.igzip`` into ``head``, ``less`` or similar programs. diff --git a/pyproject.toml b/pyproject.toml index 531017a..65409e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,11 +15,11 @@ requires-python = ">=3.9" # Because of setuptools version classifiers = [ "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Programming Language :: C", From 459fa5c06d1cb6961ee96e643986c81283ffc21a Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Tue, 3 Nov 2026 16:45:07 +0100 Subject: [PATCH 3/4] Fix asan environment --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index dfefd90..1eb5fe9 100644 --- a/tox.ini +++ b/tox.ini @@ -21,6 +21,8 @@ commands = coverage xml -i [testenv:asan] +# Use debug python as default python gives address sanitization errors. +basepython=python3d setenv= PYTHONDEVMODE=1 PYTHONUNBUFFERED=1 From d3ad519a4afbf9c594b3bbeaae9794771d510652 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Tue, 3 Nov 2026 19:52:11 +0100 Subject: [PATCH 4/4] Prevent the empty string object from being resized --- src/zlib_ng/zlib_ngmodule.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/zlib_ng/zlib_ngmodule.c b/src/zlib_ng/zlib_ngmodule.c index 59233e5..d2b5e79 100644 --- a/src/zlib_ng/zlib_ngmodule.c +++ b/src/zlib_ng/zlib_ngmodule.c @@ -1183,8 +1183,10 @@ decompress_buf(ZlibDecompressor *self, Py_ssize_t max_length) self->avail_in_real += self->zst.avail_in; - if (_PyBytes_Resize(&return_value, self->zst.next_out - - (uint8_t *)PyBytes_AS_STRING(return_value)) != 0) { + /* Prevent empty string object from being resized. */ + if (PyBytes_GET_SIZE(return_value) != 0 && + _PyBytes_Resize(&return_value, self->zst.next_out - + (uint8_t *)PyBytes_AS_STRING(return_value)) != 0) { goto error; }