From a4274f3685d14afb39d66c78d1e67916ecc031fb Mon Sep 17 00:00:00 2001 From: mxmlnkn Date: Sun, 15 Sep 2024 21:08:24 +0200 Subject: [PATCH] [CI] Test with Python 3.13 and 3.14 --- .github/workflows/tests.yml | 11 ++++++++--- core/pyproject.toml | 28 ++++++++++++++++++++++++---- pyproject.toml | 28 ++++++++++++++++++++++++---- tests/runtests.sh | 10 ++++++++-- 4 files changed, 64 insertions(+), 13 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bbf4da82..4ba45383 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -69,12 +69,13 @@ jobs: strategy: matrix: - os: [macos-13, ubuntu-latest] + os: ['macos-13', 'ubuntu-latest'] # macos-13 / macos-latest does not work anymore because the dependencies don't have any wheels, # probably because it is M1 based. # ToDo: Add windows-latest but it requires a lot of setup of the dependencies! # Maybe only test ratarmount-core without most dependencies after I have split that off. # Oldest and newest versions should be enough. Python versions are supported 5 years from release date. + # https://endoflife.date/python # 3.5 was released 2015-09-13 and end-of-life was 2020-09-13 # 3.6 was released 2016-12-23 and end-of-life was 2021-12-23 # 3.7 was released 2018-06-27 and end-of-life was 2023-06-27 @@ -84,7 +85,11 @@ jobs: # 3.11 was released 2022-10-24 and end-of-life will be 2027-10 # 3.12 was released 2023-10-02 and end-of-life will be 2028-10 # 3.13 is to be released 2024-10 - python-version: ['3.8', '3.12'] + # 3.14 is to be released 2025-10 + python-version: ['3.8', '3.12', '3.13.0-rc.2'] + include: + - os: ubuntu-latest + python-version: '3.14.0-alpha.0' defaults: run: @@ -139,7 +144,7 @@ jobs: python3 -m pip install --upgrade pip python3 -m pip install --upgrade wheel python3 -m pip install --upgrade setuptools - python3 -m pip install --upgrade-strategy eager --upgrade cython twine build zstandard fusepy cffi + python3 -m pip install --upgrade-strategy eager --upgrade twine build - name: Test Startup With Only One Compression Dependency run: | diff --git a/core/pyproject.toml b/core/pyproject.toml index d74e30fa..bc701849 100644 --- a/core/pyproject.toml +++ b/core/pyproject.toml @@ -59,8 +59,18 @@ full = [ "PySquashfsImage == 0.9.0", "lz4 ~= 4.0.0", "python-lzo ~= 1.0", - "zstandard ~= 0.22.0", - "isal ~= 1.0", + # Need at least 0.23.0 for Python 3.13 support. + # https://github.com/indygreg/python-zstandard/issues/223 + # The old zstandard-python versions for Python < 3.8 are untested because they are EOL. + 'zstandard ~= 0.20.0; python_version == "3.6.0"', + 'zstandard ~= 0.21.0; python_version == "3.7.0"', + # With Python 3.14, I get ImportError: cannot import name 'ByteString' from 'typing' via + # zstandard/__init__.py:21. + # https://github.com/indygreg/python-zstandard/issues/238 + 'zstandard ~= 0.23.0; python_version >= "3.8.0, < 3.14.0"', + # With Python 3.14, when building the wheel, I get: + # /usr/bin/ld: cannot find /tmp/tmpcuw21d78/bin/isa-l.a: No such file or directory + 'isal ~= 1.0; python_version < "3.14.0"', 'pyfatfs ~= 1.0; python_version < "3.12.0"', ] bzip2 = ["rapidgzip >= 0.13.1"] @@ -71,8 +81,18 @@ squashfs = [ "PySquashfsImage == 0.9.0", "lz4 ~= 4.0.0", "python-lzo ~= 1.0", - "zstandard ~= 0.22.0", - "isal ~= 1.0", + # Need at least 0.23.0 for Python 3.13 support. + # https://github.com/indygreg/python-zstandard/issues/223 + # The old zstandard-python versions for Python < 3.8 are untested because they are EOL. + 'zstandard ~= 0.20.0; python_version == "3.6.0"', + 'zstandard ~= 0.21.0; python_version == "3.7.0"', + # With Python 3.14, I get ImportError: cannot import name 'ByteString' from 'typing' via + # zstandard/__init__.py:21. + # https://github.com/indygreg/python-zstandard/issues/238 + 'zstandard ~= 0.23.0; python_version >= "3.8.0, < 3.14.0"', + # With Python 3.14, when building the wheel, I get: + # /usr/bin/ld: cannot find /tmp/tmpcuw21d78/bin/isa-l.a: No such file or directory + 'isal ~= 1.0; python_version < "3.14.0"', ] xz = ["python-xz ~= 0.4.0"] zip = [] diff --git a/pyproject.toml b/pyproject.toml index e6fc67ac..792a30e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,8 +57,18 @@ full = [ "PySquashfsImage == 0.9.0", "lz4 ~= 4.0.0", "python-lzo ~= 1.0", - "zstandard ~= 0.22.0", - "isal ~= 1.0", + # Need at least 0.23.0 for Python 3.13 support. + # https://github.com/indygreg/python-zstandard/issues/223 + # The old zstandard-python versions for Python < 3.8 are untested because they are EOL. + 'zstandard ~= 0.20.0; python_version == "3.6.0"', + 'zstandard ~= 0.21.0; python_version == "3.7.0"', + # With Python 3.14, I get ImportError: cannot import name 'ByteString' from 'typing' via + # zstandard/__init__.py:21. + # https://github.com/indygreg/python-zstandard/issues/238 + 'zstandard ~= 0.23.0; python_version >= "3.8.0, < 3.14.0"', + # With Python 3.14, when building the wheel, I get: + # /usr/bin/ld: cannot find /tmp/tmpcuw21d78/bin/isa-l.a: No such file or directory + 'isal ~= 1.0; python_version < "3.14.0"', ] bzip2 = [] gzip = [] @@ -72,8 +82,18 @@ squashfs = [ "PySquashfsImage == 0.9.0", "lz4 ~= 4.0.0", "python-lzo ~= 1.0", - "zstandard ~= 0.22.0", - "isal ~= 1.0", + # Need at least 0.23.0 for Python 3.13 support. + # https://github.com/indygreg/python-zstandard/issues/223 + # The old zstandard-python versions for Python < 3.8 are untested because they are EOL. + 'zstandard ~= 0.20.0; python_version == "3.6.0"', + 'zstandard ~= 0.21.0; python_version == "3.7.0"', + # With Python 3.14, I get ImportError: cannot import name 'ByteString' from 'typing' via + # zstandard/__init__.py:21. + # https://github.com/indygreg/python-zstandard/issues/238 + 'zstandard ~= 0.23.0; python_version >= "3.8.0, < 3.14.0"', + # With Python 3.14, when building the wheel, I get: + # /usr/bin/ld: cannot find /tmp/tmpcuw21d78/bin/isa-l.a: No such file or directory + 'isal ~= 1.0; python_version < "3.14.0"', ] [project.scripts] diff --git a/tests/runtests.sh b/tests/runtests.sh index f36c808d..d2bdc95a 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -1985,6 +1985,14 @@ tests+=( c157a79031e1c40f85931829bc5fc552 tests/2k-recursive-tars.tar.bz2 mimi/foo ) +# https://github.com/indygreg/python-zstandard/issues/238 +if [[ -n "$python3MinorVersion" && "$python3MinorVersion" -ge 14 ]]; then +pytestedTests+=( + 2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.zstd.squashfs foo/fighter/ufo + 2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.zstd.squashfs foo/jet/ufo +) +fi + pytestedTests+=( 2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.gzip.squashfs foo/fighter/ufo 2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.lz4.squashfs foo/fighter/ufo @@ -1992,7 +2000,6 @@ pytestedTests+=( 2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.lzo.squashfs foo/fighter/ufo 2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.no-compression.squashfs foo/fighter/ufo 2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.xz.squashfs foo/fighter/ufo - 2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.zstd.squashfs foo/fighter/ufo 2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.gzip.squashfs foo/jet/ufo 2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.lz4.squashfs foo/jet/ufo @@ -2000,7 +2007,6 @@ pytestedTests+=( 2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.lzo.squashfs foo/jet/ufo 2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.no-compression.squashfs foo/jet/ufo 2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.xz.squashfs foo/jet/ufo - 2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.zstd.squashfs foo/jet/ufo 2709a3348eb2c52302a7606ecf5860bc tests/file-in-non-existing-folder.rar foo2/ufo 2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.rar foo/fighter/ufo