diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4320c656..e82cebfd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,10 +16,10 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - name: Set up Python 3.10 - uses: actions/setup-python@v5 + - name: Set up Python 3.11 + uses: actions/setup-python@v7 with: - python-version: "3.10" + python-version: "3.11" - name: Install tox run: pip install tox - name: Lint @@ -37,9 +37,9 @@ jobs: with: submodules: recursive - name: Set up Python 3.10 - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: - python-version: "3.10" + python-version: "3.11" - name: Install isal run: sudo apt-get install libisal-dev - name: Install tox and upgrade setuptools and pip @@ -54,28 +54,29 @@ jobs: strategy: matrix: python-version: - - "3.10" - "3.11" - "3.12" - "3.13" - "3.14" - "3.14t" - - "pypy-3.10" + - "3.15" + - "3.15t" - "pypy-3.11" + - "pypy-3.12" os: ["ubuntu-latest"] include: - os: "macos-15-intel" - python-version: "3.10" + python-version: "3.11" - os: "macos-latest" - python-version: "3.10" + python-version: "3.11" - os: "windows-latest" - python-version: "3.10" + python-version: "3.11" steps: - uses: actions/checkout@v4 with: submodules: recursive - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -106,7 +107,7 @@ jobs: strategy: matrix: python_version: - - "3.10" + - "3.11" steps: - uses: actions/checkout@v4 with: @@ -137,16 +138,13 @@ jobs: strategy: matrix: os: ["ubuntu-latest", "macos-15-intel", "windows-latest"] - python_version: [ "python" ] - include: - - os: "ubuntu-latest" - python_version: "pypy" + python_version: [ "python==3.11" ] steps: - uses: actions/checkout@v4 with: submodules: recursive - name: Install miniconda. - uses: conda-incubator/setup-miniconda@v3 # https://github.com/conda-incubator/setup-miniconda. + uses: conda-incubator/setup-miniconda@v4 # https://github.com/conda-incubator/setup-miniconda. with: channels: conda-forge,defaults - name: Install requirements (universal) @@ -195,7 +193,7 @@ jobs: with: submodules: recursive fetch-depth: 0 # Fetch everything to get accurately versioned tag. - - uses: actions/setup-python@v2 # Some issues where caused by higher versions. + - uses: actions/setup-python@v7 name: Install Python - name: Install cibuildwheel twine wheel run: python -m pip install cibuildwheel twine wheel diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2f4d3bb0..bcd8c197 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,6 +10,8 @@ Changelog version 1.8.1-dev ----------------- ++ Python 3.10 and PyPy 3.10 are no longer supported. Added support for PyPy + 3.12 and Python 3.15. + Restore PyPy wheel builds. + Fix zlib streams compressed with a preset dictionary so they can be decoded by standard zlib, including builds linked against older ISA-L releases. diff --git a/pyproject.toml b/pyproject.toml index c1cbce68..d1bbfb46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,11 +17,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/isal/igzip_libmodule.c b/src/isal/igzip_libmodule.c index d498145f..352de9f5 100644 --- a/src/isal/igzip_libmodule.c +++ b/src/isal/igzip_libmodule.c @@ -161,8 +161,10 @@ decompress_buf(IgzipDecompressor *self, Py_ssize_t max_length) self->avail_in_real += self->state.avail_in; - if (_PyBytes_Resize(&RetVal, self->state.next_out - - (uint8_t *)PyBytes_AS_STRING(RetVal)) != 0) + /* Prevent empty string object from being resized. */ + if (PyBytes_GET_SIZE(RetVal) != 0 && + _PyBytes_Resize(&RetVal, self->state.next_out - + (uint8_t *)PyBytes_AS_STRING(RetVal)) != 0) goto error; return RetVal;