Skip to content

Commit

Permalink
[CI] Test with Python 3.13 and 3.14
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmlnkn committed Sep 15, 2024
1 parent 8b3ca1a commit a4274f3
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 13 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down
28 changes: 24 additions & 4 deletions core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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 = []
Expand Down
28 changes: 24 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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]
Expand Down
10 changes: 8 additions & 2 deletions tests/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1985,22 +1985,28 @@ 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
2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.lzma.squashfs foo/fighter/ufo
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
2709a3348eb2c52302a7606ecf5860bc tests/folder-symlink.lzma.squashfs foo/jet/ufo
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
Expand Down

0 comments on commit a4274f3

Please sign in to comment.