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 }}" 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", 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; }